Performs a MailMerge using a DataView
True if the mail merge was successful.
[C#]
EmailMessage msg = new EmailMessage( );
msg.FromAddress = "me@myCompany.com";
msg.To = "##Email_Address##";
msg.Subject = "Order Confirmation";
msg.Body = "Hi ##fldFirstName##\r\n Here is your invoice and order confirmation...";
//logging for easier troubleshooting
msg.Logging = true;
msg.LogPath = "c:\\email.log";
//get the DefaultViewfor the mail merge
DataView dv = GetDataView(); //a method that returns a DataView that has the columns "Email_Address" and "fldFirstName"
msg.SendMailMergeToMSPickup( dv, "c:\\inetpub\\mailroot\\pickup" );
[VB.NET]
Dim msg As New EmailMessage()
msg.FromAddress = "me@myCompany.com"
msg.To = "##Email_Address##"
msg.Subject = "Order Confirmation"
msg.Body = "Hi ##fldFirstName##" + ControlChars.Cr + ControlChars.Lf + " Here is your invoice and order confirmation..."
'logging for easier troubleshooting
msg.Logging = True
msg.LogPath = "c:\email.log"
'get the DefaultViewfor the mail merge
Dim dv As DataView = GetDataView() 'a method that returns a DataView that has the columns "Email_Address" and "fldFirstName"
msg.SendMailMergeToMSPickup(dv, "c:\inetpub\mailroot\pickup")
EmailMessage Class | aspNetEmail Namespace | EmailMessage.SendMailMergeToMSPickup Overload List