Task Scheduler

  • Thread starter Thread starter Jared
  • Start date Start date
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
 
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
 
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
 
Back
Top