MarkSullivan000
asked on
trying to concatenate string for sending email
hi guys,
here is the string that i am sending in my mail body, when i get the email i do not get the link i want. Any ideas?
mail.Body = "You have been invited to a group <a href='http://localhost:1744/Register.aspx?GroupID=" + grpID + ">Invitation</a>";
here is the string that i am sending in my mail body, when i get the email i do not get the link i want. Any ideas?
mail.Body = "You have been invited to a group <a href='http://localhost:1744/Register.aspx?GroupID=" + grpID + ">Invitation</a>";
use the content type as 'text/html'
Response.ContentType="text /plain";
Response.Write("This is text type");
Response.Write("This is text type");
Set MailFormat to a "1", which is HTML format. Then you can insert regular
HTML for formatting in your Body.
HTML for formatting in your Body.
ASKER
Hi itkamaraj, Im not fimiliar with context type , can please show me how to use it ?
This is my email code currently
This is my email code currently
MailMessage mail = new MailMessage();
mail.From = new MailAddress("sully000000@gmail.com");
mail.To.Add(mailaddress);
mail.Subject = "Invitation to GroupBookings-Inc.com";
mail.Body = "You have been invited to a group <a href='http://localhost:1744/Register.aspx?GroupID=" + grpID + ">Invitation</a>";
SmtpClient smtp = new SmtpClient();
smtp.Host = ConfigurationManager.AppSettings["SMTP"];
smtp.EnableSsl = true;
smtp.Credentials = new System.Net.NetworkCredential(ConfigurationManager.AppSettings["FROMEMAIL"], ConfigurationManager.AppSettings["FROMPWD"]);
smtp.Send(mail);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
To set the format of the email body,do this:
mail.IsBodyHtml = true;
mail.IsBodyHtml = true;
ASKER
thanks