Sending email from a mobile web page

Discussion in 'ASP .Net Mobile' started by ASMJ, Jun 27, 2006.

  1. ASMJ

    ASMJ Guest

    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
    ASMJ, Jun 27, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John

    Sending email from a web page?

    John, Oct 21, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    378
  2. Mitendrasinh
    Replies:
    0
    Views:
    347
    Mitendrasinh
    Jul 29, 2005
  3. Luke
    Replies:
    2
    Views:
    4,665
    Nigel Wade
    Mar 15, 2007
  4. rote
    Replies:
    8
    Views:
    745
  5. chen selina
    Replies:
    0
    Views:
    1,231
    chen selina
    Jul 13, 2010
Loading...

Share This Page