Imbed a mailto in a mailmessage

xzibited2

Active member
Joined
Jul 9, 2008
Messages
26
Programming Experience
1-3
Guys - Trying to imbed a mailto link in an outgoing email that I'm sending via SmtpClient, and my formatting is jacked somewhere. I can get the standard mailto to work okay when its just an email address, but the second I try to declare the subject or body of the email, it fails. Looking for this:

HTML:
Expand Collapse Copy
<a href="mailto:test@test.com?subject=This is a test email&body=this is the body">Click here to send us your feedback</a>

Here's the code I'm trying to put it into:

VB.NET:
Expand Collapse Copy
 Dim mail As New MailMessage()
            mail.IsBodyHtml = True
            mail.From = New MailAddress("myemailhere@myemail.com")
            mail.To.Add("to@myemail.com")
            mail.Subject = "This is the email"            
mail.Body = "Please see attached" & Chr(13) & Chr(13) & !!A HREF TAG GOES HERE!!
 
Back
Top