Author |
|
swapnarenukunta Newbie
Joined: 31 May 2012 Location: Australia
Online Status: Offline Posts: 1
|
Posted: 05 June 2012 at 12:14am | IP Logged
|
|
|
Hi,
I am using the following to send emails.
Smtp mailer = new Smtp();
mailer.From.AsString = "test@test.com.au";
mailer.To.AsString = "test@test.com.au";
mailer.ReplyTo.AsString = "test@test.com.au";
mailer.Subject = "Mail from AfterLogic - MailBee";
mailer.AddAttachment(@"D:\AAE\UploadFiles\M1547081932.00003");
mailer.BodyHtmlText = "<h1> This is the newsletter contents </h1>";
mailer.SmtpServers.Add("test.test.com");
mailer.SmtpServers[0].SmtpOptions = ExtendedSmtpOptions.NoChunking;
try
{
// Send the message.
mailer.Send();
}
catch (MailBeeSmtpRefusedRecipientException ex)
{
lblRefused.Text = ex.RefusedRecipientEmail;
}
1. mailer.Send() - This method sends email Synchronously? Is there a method that sends Asynchronously?
2. How to track the emails that are failed? for example invalid email.
3.In MailMerge() the is the source only DataTable?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 05 June 2012 at 1:14am | IP Logged
|
|
|
Quote:
1. mailer.Send() - This method sends email Synchronously? |
|
|
That's correct.
Quote:
Is there a method that sends Asynchronously? |
|
|
Sure, that's Smtp.BeginSend method.
Quote:
2. How to track the emails that are failed? for example invalid email. |
|
|
If some of emails were not accepted by SMTP server for delivery, you can analyze failed recipients.
And if the mail was accepted by your SMTP server but you'd like to know which of the recipients couldn't receive the message, you'll need to processing bounce mails to find that out. We have BounceMail component for this purpose, and DeliveryStatusParser class is the one you'd be dealing with.
3.In MailMerge() the is the source only DataTable?
Not really, there are other options, MailMerge documentation page contains an example of a different approach.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|