Project

General

Profile

New-LogSmtpAppender


function global:New-LogSmtpAppender( [String] $LayoutPattern,
                                     [string] $Name,
                                     [log4net.Core.ITriggeringEventEvaluator] $Evaluator,
                                       #the e-mail address of the sender.
                                     [String] $From,
                                     [String] $Subject, 
                                       #a semicolon-delimited list of recipient e-mail addresses.
                                     [String] $To,
                                     [String] $Username=[String]::Empty,                                     
                                     [String] $Password=[String]::Empty,
                                       #Size of event number
                                     [Int32] $BufferSize=512,
                                     [int32] $Port=25, 
                                     [System.Net.Mail.MailPriority] $Priority=[System.Net.Mail.MailPriority]::Normal, 
                                     [String] $SmtpHost, 
                                     [log4net.Appender.SmtpAppender+SmtpAuthentication] $Authentication=
                                      [log4net.Appender.SmtpAppender+SmtpAuthentication]::None)


Crée un appender SMTP, permet d'envoyer certains logs($Evaluator) par mail.