C
Curious
Hi,
I use the following code to send email:
void SendEmailNotification(string body)
{
SmtpClient client = new SmtpClient
("pamweb.wherever.com");
MailAddress from = new MailAddress
("(e-mail address removed)");
MailAddress to = new MailAddress
("(e-mail address removed)");
MailMessage message = new MailMessage(from, to);
//message.Body = "Price Movers";
// Content of the email notification
message.Body = body;
message.BodyEncoding = System.Text.Encoding.UTF8;
message.Subject = "Price Movers";
message.SubjectEncoding = System.Text.Encoding.UTF8;
client.SendCompleted += new SendCompletedEventHandler
(SendCompletedCallback);
string userState = "test message1";
client.SendAsync(message, userState);
}
void SendCompletedCallback(object sender, EventArgs e )
{
MessageBox.Show(string.Format("Email notification sent
successfully"), "Email Status");
}
When I saw message box, "Email notification sent successfully", I
clicked on "OK" to dismiss it. Then it took almost 5 minutes before I
see the actual email in my Outlook Inbox. How can I speed up the email
delivery?
Thanks!
I use the following code to send email:
void SendEmailNotification(string body)
{
SmtpClient client = new SmtpClient
("pamweb.wherever.com");
MailAddress from = new MailAddress
("(e-mail address removed)");
MailAddress to = new MailAddress
("(e-mail address removed)");
MailMessage message = new MailMessage(from, to);
//message.Body = "Price Movers";
// Content of the email notification
message.Body = body;
message.BodyEncoding = System.Text.Encoding.UTF8;
message.Subject = "Price Movers";
message.SubjectEncoding = System.Text.Encoding.UTF8;
client.SendCompleted += new SendCompletedEventHandler
(SendCompletedCallback);
string userState = "test message1";
client.SendAsync(message, userState);
}
void SendCompletedCallback(object sender, EventArgs e )
{
MessageBox.Show(string.Format("Email notification sent
successfully"), "Email Status");
}
When I saw message box, "Email notification sent successfully", I
clicked on "OK" to dismiss it. Then it took almost 5 minutes before I
see the actual email in my Outlook Inbox. How can I speed up the email
delivery?
Thanks!