I am looking for sample code to generate email messages with from, to, subject etc using the mail merge capability in Aspose.
The To and Subject should be autogenerated based on mail merge source.
The end result needs to be an email message which I can send using Aspose.Net or my custom email sending .NEt code.
This is what i have so far with comments on what i would like it to be
string dir = @".\..\..\";
DataSet customersDs = new DataSet();
customersDs.ReadXml(dir + "MailMergeData.xml");
Document doc = new Document(dir + @"MailMergeDoc.docx");
doc.MailMergeSettings.Destination = MailMergeDestination.Email;
doc.MailMergeSettings.MailSubject = "<>"; // Would like this merged from the template file
doc.MailMergeSettings.AddressFieldName = "firstname.lastname@example.org"; //Email Address changes. Read from template file
doc.MailMergeSettings.Destination = Aspose.Words.Settings.MailMergeDestination.Email;
doc.Save(dir + "TestFile Out.doc"); // Need the output to be email messages. Not a doc file.
Can you provide me or point me to sample code which meets the above functionality?