Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Mobile (http://www.velocityreviews.com/forums/f61-asp-net-mobile.html)
-   -   Sending email from a mobile web page (http://www.velocityreviews.com/forums/t764357-sending-email-from-a-mobile-web-page.html)

ASMJ 06-27-2006 02:41 PM

Sending email from a mobile web page
 
Hi,
I am using Visual WEb Developer Express edition. I am trying to send an

email from a mobile web page. I am using the following lines of code

protected void Command2_Click(object sender, EventArgs e)
{
MailAddress from = new MailAddress("hotmail account id");
MailAddress to = new MailAddress("yahoo account id");
MailMessage message = new MailMessage(from, to);


message.Subject = "test subject.";
message.Body = @"test e-mail message.";
SmtpClient client = new SmtpClient("MyComputerName");
client.DeliveryMethod =
System.Net.Mail.SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = true;
try
{
client.Send(message);
message = null;
}
catch (Exception ex)
{
Response.Write(ex.Message);
}


}


I am getting the following error
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for

"yahoo account Id"


Can anyone pl help??


Thanks
ASMJ



All times are GMT. The time now is 07:00 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.