B
B-Dog
I've built a form that I want to use to email some of the information off it
to a few users which will include a link to a folder on our network. I'm
trying to send it in html format but when the message is received all you
see is the html code and not just the text. I've included the code below
but I'm a rookie so I must be missing something or doing something wrong.
Thanks!
Barclay
Sub sendmail()
Dim email As MailMessage = New MailMessage
Dim stringMessage As String
Dim uName As String
uName = "(e-mail address removed)"
'message string with link
'stringMessage = "<BODY>Click the link below to open directory<A
href=""file://z:\pending move\" & TextBox1.Text & "\"">file://z:\pending
move\& textbox1.text & ""\</A> </BODY>"
stringMessage = "<html><body>UtilMailMessage001->success</body></html>"
email.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "mail.domain.net"
SmtpMail.Send(uName, "(e-mail address removed)", "New Files Ready to be Archived in
folder: (" & TextBox1.Text & ")", stringMessage)
End Sub
to a few users which will include a link to a folder on our network. I'm
trying to send it in html format but when the message is received all you
see is the html code and not just the text. I've included the code below
but I'm a rookie so I must be missing something or doing something wrong.
Thanks!
Barclay
Sub sendmail()
Dim email As MailMessage = New MailMessage
Dim stringMessage As String
Dim uName As String
uName = "(e-mail address removed)"
'message string with link
'stringMessage = "<BODY>Click the link below to open directory<A
href=""file://z:\pending move\" & TextBox1.Text & "\"">file://z:\pending
move\& textbox1.text & ""\</A> </BODY>"
stringMessage = "<html><body>UtilMailMessage001->success</body></html>"
email.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "mail.domain.net"
SmtpMail.Send(uName, "(e-mail address removed)", "New Files Ready to be Archived in
folder: (" & TextBox1.Text & ")", stringMessage)
End Sub