I am using C# asp.net to take values passed from the query string and use them to send out an email with a mobile phone number so that the email will cause a text message to be sent to that phone. Ex. 9772565555@vtext.com. The email message arrives fine as a text message, but in the email body it cuts off the url at the end of the message. I'm certain I'm making a syntax error of some sort. Here's the code
string phone = Request["phone"].ToString();
string item = Request["item"].ToString();
if (phone != null && phone != "")
{
try
{
MailMessage mailMessage = new MailMessage();
mailMessage.To.Add(phone + "@vtext.com");
mailMessage.From = new MailAddress("no-reply@mydomain.com");
mailMessage.Subject = "Your Item"
mailMessage.Body = "Hello. Click the link http://mydomain/order.aspx?order=" + phone + item;
SmtpClient smtpClient = new SmtpClient("localhost", 25);
smtpClient.Send(mailMessage);
Response.Write("<div style='font-size:36px'>E-mail sent!</div>");
}
catch (Exception ex)
{
Response.Write("<div style='font-size:36px'>Could not send the e-mail - error: " + ex.Message + "</div>");
}
}