adding a hyperlink in the body of an e-mail message.
-
I am new to asp.net and I am wondering if anyone could show me an example of how to add a hyperlink in an e-mail message. Thanks, Bill
Dim mailMessage As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage() mailMessage.From = "Test@harminder.com" mailMessage.To = "harminder@pugmarks.com" mailMessage.Subject = "Testing Mail" ' mailMessage.Bcc = "hskhalsa_81@yahoo.com;harminder_81@indiatimes.com" ' mailMessage.Cc = "hari634@yahoo.com" mailMessage.Body = "" & "you have recieved this mail because u r registered with us" & "" & _ "
" & "your member id is 10000" & _ "
" & "Your Name is " & _ "
" & "Your address is " & _ "
" & "" & "Click hair" & " " mailMessage.BodyFormat = System.Web.Mail.MailFormat.Html 'mailMessage.Attachments.Add(New Mail.MailAttachment("c:\\test.txt")) System.Web.Mail.SmtpMail.SmtpServer = "10.10.10.100" System.Web.Mail.SmtpMail.Send(mailMessage) Response.Write("Done Successfully") :eek: harminder_Pugmarks chandigarh India -
Dim mailMessage As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage() mailMessage.From = "Test@harminder.com" mailMessage.To = "harminder@pugmarks.com" mailMessage.Subject = "Testing Mail" ' mailMessage.Bcc = "hskhalsa_81@yahoo.com;harminder_81@indiatimes.com" ' mailMessage.Cc = "hari634@yahoo.com" mailMessage.Body = "" & "you have recieved this mail because u r registered with us" & "" & _ "
" & "your member id is 10000" & _ "
" & "Your Name is " & _ "
" & "Your address is " & _ "
" & "" & "Click hair" & " " mailMessage.BodyFormat = System.Web.Mail.MailFormat.Html 'mailMessage.Attachments.Add(New Mail.MailAttachment("c:\\test.txt")) System.Web.Mail.SmtpMail.SmtpServer = "10.10.10.100" System.Web.Mail.SmtpMail.Send(mailMessage) Response.Write("Done Successfully") :eek: harminder_Pugmarks chandigarh India -
I do not understand what this code has to do with putting a link in an e-mail message. I do see that it shows how to add an attachment. Bill
with this code u have u gave link to the other websites . i clearly writes in code "click hair " that means when u click the hyperlink the yahoo site open in ur screen. this code working when u send mail throgh this code. if again not understand writes me . bye