aspNetEmail

EmailMessage.IgnoreRecipientErrors Property

Ignores any mail addressing errors as returned from the mail server.

public bool IgnoreRecipientErrors {get; set;}

Remarks

The default is false. This is useful if you are mailing a large quantity, and don't want the mass mailing to fail with 1 bad address.

Example

[C#]
		EmailMessage msg = new EmailMessage( "mail.MyCompany.com" );
		msg.FromAddress = "me@MyCompany.com";
		msg.To = "you@YourCompany.com";
		msg.IgnoreRecipientErrors = true;
		msg.Subject = "Daily Newsletter";
		msg.Body = "Here is our daily newsletter.....";
		if ( msg.Send() )
		{
			Console.WriteLine( "Message Sent!");
		}
		else
		{
			Console.WriteLine( msg.LastException().Message );
		}
		
[Visual Basic]
		Dim msg As New EmailMessage("mail.MyCompany.com")
		msg.FromAddress = "me@MyCompany.com"
		msg.To = "you@YourCompany.com"
		msg.IgnoreRecipientErrors = True
		msg.Subject = "Daily Newsletter"
		msg.Body = "Here is our daily newsletter....."
		If (msg.Send()) Then
		    Console.WriteLine("Message Sent!")
		Else
		    Console.WriteLine(msg.LastException().Message)
		End If
		

See Also

EmailMessage Class | aspNetEmail Namespace