Task Scheduler

J

Jared

in vb.net which is included in vista...

Public Sub email_send(ByVal xFrom As String, ByVal xTo As String, ByVal
xSubject As String, ByVal xBody As String)

Dim MyMail As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage
Dim MySMTP As New System.Net.Mail.SmtpClient("mail.myisp.com")

Try
MyMail = New System.Net.Mail.MailMessage(xFrom, xTo, xSubject, xBody)
MySMTP.Send(MyMail)
Catch ex As Exception
Trace.WriteLine(ex.Message.ToString)
End Try


End Sub
 
D

Dick Cardy

In task scheduler you can get it to send an e-mail.

My question is ' How do you enter the SMTP details if the SMTP server you
use requires authorisation (SMTP-AUTH)'

Thanks

Dick
 
D

Dick Cardy

Jared said:
in vb.net which is included in vista...

Public Sub email_send(ByVal xFrom As String, ByVal xTo As String, ByVal
xSubject As String, ByVal xBody As String)

Dim MyMail As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage
Dim MySMTP As New System.Net.Mail.SmtpClient("mail.myisp.com")

Try
MyMail = New System.Net.Mail.MailMessage(xFrom, xTo, xSubject, xBody)
MySMTP.Send(MyMail)
Catch ex As Exception
Trace.WriteLine(ex.Message.ToString)
End Try


End Sub
Jared

Firstly thanks for your reply although I am actually looking for a solution
within Task Scheduler as I already have a VB program that does it.

Dick
 

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

Top