email

williamLOR

Member
Joined
Aug 3, 2005
Messages
9
Programming Experience
Beginner
hello,

how to add a url link in email body?
example:
Dim mail As New MailMessage

mail.To = "abc@yahoo.com"

mail.From = "xyz@yahoo.com"

mail.Subject = "this is a test email."

mail.BodyFormat = MailFormat.Html

mail.Body = "<b>Employee Details:</b> <p>" & "<br>Employee ID:" & txtID.Text & "<br>Employee Name:" & txtName.Text & "<br>Department:" & txtDepartment.Text & "<br>Leave Type:" & ddlLeaveType.SelectedItem.Text & "<br>Start Leave Date:" & txtStartDate.Text & "<br>End Leave Date:" & txtEndDate.Text & "<br>Total of Leave Days:" & txtNumDays.Text & "<br>Filled_Date:" & System.DateTime.Now & "<br> link:" <a href=www.soccernet.com> soccernet link </a>

SmtpMail.SmtpServer = "192.168.2.129"
'your real server goes here

SmtpMail.Send(mail)

my error appear in this line .
help..
 
... & "<br> link:<a href=www.soccernet.com> soccernet link </a>"

The link is part of the string that will become the body, so it has to be enclosed in the quotes.

I didn't test it, but it should work. Hope it helps.
 
thanks to riekertv ..
i had solved the problem...
somebody here , can share some useful url for sending email.
i need it as references.thanks....
 
Back
Top