Hello,
Hi Luis,
Okay… Those are not very good news… But less utilize datasets then…
-
Would you mind posting an example utilizing strongly typed datasets as oposed to non-typed examples you have posted in your examples?
-
In order to test I added the line MailMessage msg1 = engine.Merge(confirmationEmailTable[0]); and yet msg1 does not show an htmlbody, it is empty… any ideas?
-
I am trying with a strongly typed dataset and I don’t get any exceptions or anything and yet nothing gets emailed.
msg.HtmlBody = emailTemplate.EMAIL_BODY_HTML;
msg.Headers.Add(“ReferenceNumber”, “#VoterIdNumber”);
string referenceItemListConstantPortion = “_”;
VOTER voterEntity = nul;;
EmailsDset.ConfirmationEmailView_11_23_15DataTable confirmationEmailTable = new EmailsDset.ConfirmationEmailView_11_23_15DataTable();
EmailsDset.ConfirmationEmailView_11_23_15Row confirmationRow = null;
foreach (CL_EMAIL_REQUEST_LISTS emailTarget in emailTargetIds)
{
voterEntity = a record from the database;
confirmationRow = confirmationEmailTable.NewConfirmationEmailView_11_23_15Row();
confirmationRow.VoterIdNumber = voterEntity.IDNUMBER.ToString() + referenceItemListConstantPortion;
confirmationRow.FirstName = voterEntity.FIRSTNAME;
confirmationRow.LastName = voterEntity.LASTNAME;
confirmationRow.EmailAddressTo = voterEntity.EMAIL;
confirmationEmailTable.AddConfirmationEmailView_11_23_15Row(confirmationRow);
}
//confirmationEmailTable.AcceptChanges();
TemplateEngine engine = new TemplateEngine(msg);
engine.RegisterRoutine(“GetSignature”, new TemplateRoutine(GetSignature));
MailMessageCollection messages;
try
{
messages = engine.Instantiate(confirmationEmailTable);
MailMessage msg1 = engine.Merge(confirmationEmailTable[0]);
AsposeSingleton.instance.Client.BulkSend(messages);
}
catch (MailException mex)
{
System.Diagnostics.Debug.WriteLine(mex.ToString());
}
Hi Luis,