Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

schedule Email in asp.net, C#

Tags:

c#

email

asp.net

I want to schedule the email with asp.net and C# code.

what is basic idea or code for schedule email?

like image 243
AjmeraInfo Avatar asked Mar 08 '10 13:03

AjmeraInfo


2 Answers

Use a scheduler perhaps? Quartz.NET is a pretty decent one.

I assume you already know how to send a mail, so just schedule a new job, and roll with it.

like image 142
Vinzz Avatar answered Oct 05 '22 23:10

Vinzz


You could have a database table EmailSchedule(ID, SendTo, Subject, MessageBody, SendDateTime) When you want to schedule an email to be sent, write to the table.

Then have a process that runs every x minutes and sends all emails where SendDateTime <= Now

like image 21
bgs264 Avatar answered Oct 06 '22 01:10

bgs264