Click here to Skip to main content
15,885,216 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to add Windows firewall exception without admin privileges Pin
srikrishnathanthri27-Mar-16 18:57
srikrishnathanthri27-Mar-16 18:57 
GeneralRe: How to add Windows firewall exception without admin privileges Pin
Bernhard Hiller28-Mar-16 23:52
Bernhard Hiller28-Mar-16 23:52 
AnswerRe: How to add Windows firewall exception without admin privileges Pin
Dave Kreskowiak26-Mar-16 5:14
mveDave Kreskowiak26-Mar-16 5:14 
AnswerRe: How to add Windows firewall exception without admin privileges Pin
Patrice T27-Mar-16 11:11
mvePatrice T27-Mar-16 11:11 
QuestionHow display the file name in the right menu? Pin
youlu24-Mar-16 22:57
youlu24-Mar-16 22:57 
AnswerRe: How display the file name in the right menu? Pin
Eddy Vluggen25-Mar-16 0:47
professionalEddy Vluggen25-Mar-16 0:47 
GeneralRe: How display the file name in the right menu? Pin
youlu31-Mar-16 20:07
youlu31-Mar-16 20:07 
QuestionAsynchronous email sending with Retries Pin
Jassim Rahma24-Mar-16 3:36
Jassim Rahma24-Mar-16 3:36 
Hi,

I have below code to send email to customers but sometimes it's failing because of slow internet and sometimes it show the please wait splash for long time.

I want to know how can I just send it in the background and keep retrying for x number of times without disturbing the users with Please wait splash or error messages?
C#
email_body = new StringBuilder();

email_body.Append("<html>");
email_body.Append("<body>");
email_body.Append("Please do not reply to this message. Replies to this message are routed to an unmonitored mailbox.");
email_body.Append("<hr>");
email_body.Append("<img src='cid:" + email_logo.ContentId + "' align=baseline border=0>");
email_body.Append("<br><br>");
email_body.Append("Dear " + customer_title + first_name + ",");
email_body.Append("<br><br>");
email_body.Append("We are glad to inform you that your order# " + order_id.ToString() + " has been delivered / picked up at " + MarkAsDeliveredForm.dateDeliveryTime.Time.ToString("HH:mm") + ".");
email_body.Append("<br><br>");
email_body.Append("We appreciate your business and encourage you to reach out to us for all your occasions.");
email_body.Append("<br><br>");
email_body.Append("<center>THANK YOU FOR CHOOSING <a href='http://www.cakeboutiquebh.com' target='_blank' style='text-decoration: none;'>CAKE BOUTIQUE</a></center>");
email_body.Append("<br><br>");
email_body.Append("<img src='cid:" + email_footer.ContentId + "' align=baseline border=0>");
email_body.Append("</body>");
email_body.Append("</html>");

mail_message.Subject = "Your Order# " + order_id.ToString() + " is Delivered";
mail_message.IsBodyHtml = true;
mail_message.Body = email_body.ToString();

smtp_client.Port = 587;
smtp_client.Credentials = new System.Net.NetworkCredential("noreply@mydomain.com", "xxxxxxxxxx");
smtp_client.EnableSsl = true;

smtp_client.Send(mail_message);

Thanks,
Jassim[^]

Technology News @ www.JassimRahma.com

GeneralRe: Asynchronous email sending with Retries Pin
Sascha Lefèvre24-Mar-16 3:51
professionalSascha Lefèvre24-Mar-16 3:51 
AnswerRe: Asynchronous email sending with Retries Pin
Dave Kreskowiak24-Mar-16 3:52
mveDave Kreskowiak24-Mar-16 3:52 
QuestionHow win apps can programmatically login to asp.net mvc based web site Pin
Tridip Bhattacharjee23-Mar-16 1:43
professionalTridip Bhattacharjee23-Mar-16 1:43 
AnswerRe: How win apps can programmatically login to asp.net mvc based web site Pin
Pete O'Hanlon23-Mar-16 1:59
mvePete O'Hanlon23-Mar-16 1:59 
QuestionHow to view board component and capacitor Pin
regerteast22-Mar-16 18:36
regerteast22-Mar-16 18:36 
GeneralRe: How to view board component and capacitor Pin
PIEBALDconsult22-Mar-16 19:13
mvePIEBALDconsult22-Mar-16 19:13 
AnswerRe: How to view board component and capacitor Pin
Patrice T22-Mar-16 20:07
mvePatrice T22-Mar-16 20:07 
AnswerRe: How to view board component and capacitor Pin
Sascha Lefèvre22-Mar-16 23:02
professionalSascha Lefèvre22-Mar-16 23:02 
QuestionRe: How to view board component and capacitor Pin
regerteast23-Mar-16 3:01
regerteast23-Mar-16 3:01 
AnswerRe: How to view board component and capacitor Pin
Pete O'Hanlon23-Mar-16 3:08
mvePete O'Hanlon23-Mar-16 3:08 
AnswerRe: How to view board component and capacitor Pin
Matt T Heffron23-Mar-16 13:16
professionalMatt T Heffron23-Mar-16 13:16 
GeneralRe: How to view board component and capacitor Pin
regerteast24-Mar-16 20:54
regerteast24-Mar-16 20:54 
GeneralRe: How to view board component and capacitor Pin
Eddy Vluggen25-Mar-16 0:50
professionalEddy Vluggen25-Mar-16 0:50 
GeneralRe: How to view board component and capacitor Pin
regerteast25-Mar-16 4:04
regerteast25-Mar-16 4:04 
GeneralRe: How to view board component and capacitor Pin
OriginalGriff25-Mar-16 4:24
mveOriginalGriff25-Mar-16 4:24 
GeneralRe: How to view board component and capacitor Pin
regerteast25-Mar-16 5:40
regerteast25-Mar-16 5:40 
GeneralRe: How to view board component and capacitor Pin
OriginalGriff25-Mar-16 6:05
mveOriginalGriff25-Mar-16 6:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.