P
Phoebe.
Hi, Good Day!
I am writing a code in order to send a mail out when certain job failed
while running the program. Meanwhile for my testing, I'm either hardcoding
the address or type in on the spot so that the mail will be send as expected
to certain people. The code is as below.
Sub SubmitBtn_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim TheMailMessage As New Mail.MailMessage()
Dim TheMailConnection As SmtpMail
TheMailMessage.From = txtFromEmail.Text
TheMailMessage.To = txtToEmail.Text
TheMailMessage.Subject = txtSubject.Text
TheMailMessage.Body = txtMessage.Text
TheMailConnection.Send(TheMailMessage)
End Sub
What I need is to send the mail automatically when the program facing
error. How shd I do? Can someone help?
Thanks in advanced.
rgds, Phoebe.
I am writing a code in order to send a mail out when certain job failed
while running the program. Meanwhile for my testing, I'm either hardcoding
the address or type in on the spot so that the mail will be send as expected
to certain people. The code is as below.
Sub SubmitBtn_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim TheMailMessage As New Mail.MailMessage()
Dim TheMailConnection As SmtpMail
TheMailMessage.From = txtFromEmail.Text
TheMailMessage.To = txtToEmail.Text
TheMailMessage.Subject = txtSubject.Text
TheMailMessage.Body = txtMessage.Text
TheMailConnection.Send(TheMailMessage)
End Sub
What I need is to send the mail automatically when the program facing
error. How shd I do? Can someone help?
Thanks in advanced.
rgds, Phoebe.