473,394 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Sending Auto Triggered Mail in ASP.NET

I want to send mail to the clients at a Specified DateAndTime given by the Users of my Application.How can i do this ASP.net .

Can somebody help me out ???

Thanks in advance.
Sep 4 '07 #1
7 864
jhardman
3,406 Expert 2GB
moved to .NET forum
Sep 5 '07 #2
Shashi Sadasivan
1,435 Expert 1GB
I want to send mail to the clients at a Specified DateAndTime given by the Users of my Application.How can i do this ASP.net .

Can somebody help me out ???

Thanks in advance.
You would have either set up a schedule on the server, or run a thread on the server which checks the databse for emails to be sent on a regular interval.
Sep 5 '07 #3
You would have either set up a schedule on the server, or run a thread on the server which checks the databse for emails to be sent on a regular interval.
Thanks for giving me a guidance.But it would be better if you tell me how can i create a thread on the server.
Sep 6 '07 #4
You need to create Windows service which activated after 15 sec.
It checks the outbox table in database and after comparing senddate send the mail.

MailMessage message = new MailMessage();
message.From = new MailAddress("sender@foo.com");
message.To.Add(new MailAddress("reciever@foo.com"));
message.Subject = "This is my subject";
message.Body = "This is the content";

SmtpClient client = new SmtpClient();

client.Send(message);


<system.net>
<mailSettings>
<smtp from="........">
<network host="..." port="25" userName="..." password="secret" defaultCredentials="true" />
</smtp>
</mailSettings>
</system.net>
<system.web>
Sep 6 '07 #5
You need to create Windows service which activated after 15 sec.
It checks the outbox table in database and after comparing senddate send the mail.

MailMessage message = new MailMessage();
message.From = new MailAddress("sender@foo.com");
message.To.Add(new MailAddress("reciever@foo.com"));
message.Subject = "This is my subject";
message.Body = "This is the content";

SmtpClient client = new SmtpClient();

client.Send(message);




<system.net>
<mailSettings>
<smtp from="........">
<network host="..." port="25" userName="..." password="secret" defaultCredentials="true" />
</smtp>
</mailSettings>
</system.net>
<system.web>


Thanks for Your Reply.

But the thing is i want to send the mail at the specified DateTime.Where this Checking would take place.Moreover help me out as how to create a Windows Service.
Sep 6 '07 #6
Shashi Sadasivan
1,435 Expert 1GB
You can create a seperate application , a console base or win app, or service..
and use threading within that

please check the following site, and use the asynchronus method invocation.
http://www.codeproject.com/csharp/As...Invocation.asp

Cheers
Sep 7 '07 #7
You can create a seperate application , a console base or win app, or service..
and use threading within that

please check the following site, and use the asynchronus method invocation.
http://www.codeproject.com/csharp/As...Invocation.asp

Cheers

Thanks a lot for ur Guidance
Sep 7 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: SharpSmith | last post by:
hi all i have a very specific question regarding emails sending and googling doesn't help me is a way exists to send email using .NET framework (System.Web.Mail or something else) and have the...
7
by: shaugat | last post by:
I need help. I want to send auto e-mail if a value of a field is higher than a set value. For an example, if someone's systolic blood pressure is more than 140, this value will be automatically be...
4
by: lyealain | last post by:
hi .. thanks for the effort to read this.. thanks.. can u give me idea on building an auto triggered email system in asp/VB ..every time when it reaches the time i specify..the sytem will auto...
1
by: ttcplkavi | last post by:
hello.. Is anybody know how to do Auto mail sending using postgresql .. Please reply asap
2
by: leoschool | last post by:
Hai , I want to send a system tiggered mail in asp.net.Can someone help me out. The mail has to be sent at the specific time . Thanks in advance
0
by: HariKutty | last post by:
I want to send mail to the clients at a Specified DateAndTime given by the Users of my Application.How can i do this ASP.net . Can somebody help me out ??? Thanks in advance.
2
by: HariKutty | last post by:
Hello Every one My Use Case: I want to display the list of matching email address from the word typed in by the User. Example If the User types "a" in textbox then it shoud display ...
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
7
by: bleachie | last post by:
Hey, I just need some help, my form seems to not send me all of the 'guestNames' and 'guestEmails' forms. i use this function to add more guestnames and guestemail fields based on the number of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.