Auto mailer

S

Sunil

Hi,

i am trying to send an automated mail at a particular time of the day
from the web site. below is the code i tried. but the mail is not
sent.

Can anyone throw some light on the issue.

Thanks.


Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application is started
mTimer.Interval = 10000
mTimer.Enabled = True
AddHandler mTimer.Elapsed, AddressOf mTimer_Elapsed
End Sub

Sub mTimer_Elapsed(ByVal sender As Object, ByVal e As
System.Timers.ElapsedEventArgs)
Dim mail As New MailMessage
mTimer.Enabled = False
mail.From = "(e-mail address removed)"
mail.To = "(e-mail address removed)"
mail.Subject = "Auto Message from Web Site"
mail.BodyFormat = MailFormat.Text
mail.Body = "Test"
SmtpMail.Send(mail)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top