Sending email from a mobile web page

A

ASMJ

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top