Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How would I get a web site to Delay sending an email for  5 min (ASP.NET C)#

Posted on 2014-07-22
5
Medium Priority
?
417 Views
Last Modified: 2014-07-29
I don't know how to go about this, and am looking for some direction.  I need my site to send an email out, but this is the issue.  Send it out 5 minutes after they click the button, or close the browser.  Is this possible and if so, how?
0
Comment
Question by:bmanmike39
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 16

Accepted Solution

by:
Vikram Singh Saini earned 2000 total points
ID: 40213380
Send it out 5 minutes after they click the button

// Make thread to pause for few minutes
System.Threading.Thread.Sleep(300000);
// Your code for sending email here

Open in new window


More details available at - C# Sleep
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 40213688
Normally you would have a separate service to handle sending the email at an appointed time, or after a specific delay. You certainly don't want to be sleeping a thread in a web application as suggested above!
0
 
LVL 16

Expert Comment

by:Vikram Singh Saini
ID: 40213868
I do agree with Carl Tawn. The solution was suggestive but not recommended for production environment. Thanks Carl for pointing it out.
0
 

Author Comment

by:bmanmike39
ID: 40218544
If this is not safe than it will not work for me.
0
 

Author Closing Comment

by:bmanmike39
ID: 40228419
Thanks but this is no good to me if it's unsafe, but no one is responding.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question