Dim objMM As New MailMessage()
'Create an instance of the MailMessage class
Dim Requestor_DropDownList As DropDownListDim IssueID_Label As Label
With Issue_FormView Requestor_DropDownList = .FindControl("RequestedBy_DropDownList")
IssueID_Label = .FindControl("JobID_Label") End With
objMM.To.Add(Requestor_DropDownList.SelectedValue + "@telecom.co.nz")
'Set the properties
objMM.From = New MailAddress("email@example.com")
'Send the email in html format
objMM.IsBodyHtml = True
'Set the priority - options are High, Low, and Normal
objMM.Priority = MailPriority.Normal
'Set the subject
objMM.Subject = "Feedback"
Dim sb As New StringBuildersb.AppendLine("Kiaora " + Requestor_DropDownList.SelectedItem.Text)
'Set the body
sb.AppendLine("Your EST Issue is about to be closed.")sb.AppendLine("Please take 5 minutes to rate the service you have received the the Enterprise Service Team.")sb.AppendLine("Click into this link: http://wstProdIIS/EST/register/Issue.aspx?ID=" + IssueID_Label.Text)
objMM.Body = sb.ToString
Dim objSC = New SmtpClient
'Now, to send the message, use the Send method of the SmtpClient class
objSC.Host = "WNEXBE01.telecom.tcnz.net"
Other related posts:
Geek Post Monthly Newsletter Volume 2 Issue 6
Exam 70-300 Objective 3
COALESCE T-SQL Function
Comment by chakkaradeep, on 1-Aug-2008 23:19
I think View needs to do only its job and pass on this to the Controller
Add a comment
Please note: comments that are inappropriate or promotional in nature will be deleted.
E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.
Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments. If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and shown in this blog post.