aspNetEmail

EmailMessage.ReversePath Property

The reverse path is the actual 'Mail From' address presented to the relay SMTP server.

public string ReversePath {get; set;}

Remarks

This can be different from the 'FromAddress' that is actually displayed in the client email reader. This is an advanced property and should be used with caution, and only by those developers who understand how the SMTP RFCs work.

Example

[C#]
EmailMessage msg = new EmailMessage( "mail.myCompany.com");
msg.Subject = "Order Confirmation";
msg.To = "you@yourcompany.com";

//set the ReversePath property to come from  our company
msg.ReversePath = "me@mycompany.com";

//impersonate a customer's email address, who we are sending the campaign on behalf of.
msg.From = "someoneelse@theircompany.com";

//logging for easier troubleshooting
msg.Logging = true;
msg.LogPath = "c:\\email.log";

//set the plain text body
msg.Body  = "the email body contents go here...";

msg.Send();
		
		
[VB.NET]
Dim msg As New EmailMessage("mail.myCompany.com")
msg.Subject = "Order Confirmation"
msg.To = "you@yourcompany.com"

'set the ReversePath property to come from  our company
msg.ReversePath = "me@mycompany.com"

'impersonate a customer's email address, who we are sending the campaign on behalf of.
msg.From = "someoneelse@theircompany.com"

'logging for easier troubleshooting
msg.Logging = True
msg.LogPath = "c:\email.log"

'set the plain text body
msg.Body = "the email body contents go here..."

msg.Send()		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		

See Also

EmailMessage Class | aspNetEmail Namespace