aspNetEmail

EmailMessage.LogInMemory Property

When logging is enabled, by default, a log is kept in memory.

public bool LogInMemory {get; set;}

Remarks

This helps when troubleshooting web applications, and file write access is not needed. For large mail merges, it is recommended to set EmailMessage.LogInMemory = false, to increase speed and efficiency.

Example

[C#]
		EmailMessage msg = new EmailMessage( "mail.MyCompany.com" );
		msg.FromAddress = "me@MyCompany.com";
		msg.To = "you@YourCompany.com";
		msg.Logging = true;
		msg.LogPath = @"c:\temp\aspNetEmail.log";
		//since we are logging to a text file, no need to log in memory
		msg.LogInMemory = 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.Logging = True
		msg.LogPath = "c:\temp\aspNetEmail.log"
		'since we are logging to a text file, no need to log in memory
		msg.LogInMemory = False
		msg.Subject = "Daily Newsletter"
		msg.Body = "Here is our daily newsletter....."
		msg.Send()
		

See Also

EmailMessage Class | aspNetEmail Namespace