Tartampion
09-23-2003, 04:22 PM
I need to know if it is possible to include links in code-generated e-mails. I have a aspx page that send customers confirmation of their subscription to a site. I need to know how to include a link in the mail tha will enable them to go to the site from the email.
It's done in c#.
I use these namespaces:
using System.Web.Mail;
using System.Text;
using System.ServiceProcess;
// This is the code : it actually works fine
MailMessage msg = new MailMessage();
msg.From = strAddressFRrom;
msg.To = strAdresseTo;
msg.Subject = strSubject;
// sb is a string builder object which is filled before the message is sent ( it is not copied here to keep code short )
msg.Body = sb.ToString();
msg.Priority = System.Web.Mail.MailPriority.Normal;
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send( msg );
i tried including many different html structures in the StringBuilder object. I tried with only a href tag, and even with a whole html document. None worked. If you have any idea how to do this, your input qould be gratly appreciated...
Thanks
It's done in c#.
I use these namespaces:
using System.Web.Mail;
using System.Text;
using System.ServiceProcess;
// This is the code : it actually works fine
MailMessage msg = new MailMessage();
msg.From = strAddressFRrom;
msg.To = strAdresseTo;
msg.Subject = strSubject;
// sb is a string builder object which is filled before the message is sent ( it is not copied here to keep code short )
msg.Body = sb.ToString();
msg.Priority = System.Web.Mail.MailPriority.Normal;
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send( msg );
i tried including many different html structures in the StringBuilder object. I tried with only a href tag, and even with a whole html document. None worked. If you have any idea how to do this, your input qould be gratly appreciated...
Thanks