Last post Sep 03, 2018 07:07 AM by Mikesdotnetting
Sep 02, 2018 03:44 PM|ahmedshpt|LINK
WHEN I CLICK ON THE BUTTON SEND (MAIL) I do not have to leave the page of sending since 3 minutes to receive a mail.
but I need to browse my site (leave the page of " sending mail" ) and receive a mail anyway.
and for that I use a backgroundthread but it not work
help me please
Thread email = new Thread(delegate ()
System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient();
client.Host = sSMTPHost;
System.Net.NetworkCredential basicauthenticationinfo = new System.Net.NetworkCredential(sSender, sSenderPassword);
client.Port = int.Parse(sSMTPPort);
client.EnableSsl = true;
client.UseDefaultCredentials = false;
client.Credentials = basicauthenticationinfo;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
email.IsBackground = true;
HiddenFiledSendRejectMailsLoopCondition.Value = "0";
Sep 02, 2018 07:52 PM|Mikesdotnetting|LINK
You don't need a background thread. Once you initiate the sending of an email, you can navigate to other pages without affecting the process. It won't get cancelled if you leave the page.
Sep 02, 2018 08:42 PM|ahmedshpt|LINK
what should I do????
Sep 03, 2018 07:07 AM|Mikesdotnetting|LINK
Just send the email normally.