aspNetEmail

EmailMessage.LogOverwrite Property

Overwrite the log file during each program execution.

public bool LogOverwrite {get; set;}

Remarks

If Logging to a text file (by setting a value for LogPath), LogOverwrite will overwrite the log file for each new MailMessage Object, when set to true. If set to false, each mail message log will be appended to the LogPath file.

Example

[C#]
		EmailMessage msg = new EmailMessage( "mail.MyCompany.com" );
		msg.FromAddress = "me@MyCompany.com";
		msg.To = "you@YourCompany.com";
		msg.LogOverwrite = false;
		msg.Subject = "Daily Newsletter";
		msg.Body = "Here is our daily newsletter.....";
		msg.Send();
		
[Visual Basic]
		Dim msg As New EmailMessage("mail.MyCompany.com")
		msg.FromAddress = "me@MyCompany.com"
		msg.To = "you@YourCompany.com"
		msg.LogOverwrite = False
		msg.Subject = "Daily Newsletter"
		msg.Body = "Here is our daily newsletter....."
		msg.Send()
		

See Also

EmailMessage Class | aspNetEmail Namespace