Server 530 Authetication error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sunny

    Server 530 Authetication error

    Hi,
    I am new in development. I want to develop a application which send
    email from yahoo acoount to rediffmail acount I am trying following
    Code But its giving Server 530 Authetication error.Could you suggest
    me anything in this matter.
    Thank you,
    Sunny

    try

    {

    MailMessage oMsg = new MailMessage();

    // TODO: Replace with sender e-mail address.

    oMsg.From = "jb9480@yahoo.c o.in";

    // TODO: Replace with recipient e-mail address.

    oMsg.To = "jankirambpatil @rediffmail.com ";

    oMsg.Subject = "Send Using Web Mail";


    // SEND IN HTML FORMAT (comment this line to send plain text).

    oMsg.BodyFormat = MailFormat.Text ;


    // HTML Body (remove HTML tags for plain text).

    oMsg.Body = "Hello World!";


    // ADD AN ATTACHMENT.

    // TODO: Replace with path to attachment.

    String sFile = @"C:\Hello.txt" ;

    MailAttachment oAttch = new MailAttachment( sFile,
    MailEncoding.Ba se64);

    oMsg.Attachment s.Add(oAttch);

    // TODO: Replace with the name of your remote SMTP server.

    SmtpMail.SmtpSe rver = "mail.rediffmai l.com";

    SmtpMail.Send(o Msg);

    oMsg = null;

    //oAttch = null;

    }

    catch (Exception e)

    {

    Console.WriteLi ne("{0} Exception caught.", e);

    }
  • Rama.NET

    #2
    RE: Server 530 Authetication error

    You are trying to send an email using an Rediff's SMTP Server. And it is
    looking for the user credentials (user id and password) from you, and it
    looks like you are not passing them, so it is throwing 530 on you.


    "Sunny" wrote:
    [color=blue]
    > Hi,
    > I am new in development. I want to develop a application which send
    > email from yahoo acoount to rediffmail acount I am trying following
    > Code But its giving Server 530 Authetication error.Could you suggest
    > me anything in this matter.
    > Thank you,
    > Sunny
    >
    > try
    >
    > {
    >
    > MailMessage oMsg = new MailMessage();
    >
    > // TODO: Replace with sender e-mail address.
    >
    > oMsg.From = "jb9480@yahoo.c o.in";
    >
    > // TODO: Replace with recipient e-mail address.
    >
    > oMsg.To = "jankirambpatil @rediffmail.com ";
    >
    > oMsg.Subject = "Send Using Web Mail";
    >
    >
    > // SEND IN HTML FORMAT (comment this line to send plain text).
    >
    > oMsg.BodyFormat = MailFormat.Text ;
    >
    >
    > // HTML Body (remove HTML tags for plain text).
    >
    > oMsg.Body = "Hello World!";
    >
    >
    > // ADD AN ATTACHMENT.
    >
    > // TODO: Replace with path to attachment.
    >
    > String sFile = @"C:\Hello.txt" ;
    >
    > MailAttachment oAttch = new MailAttachment( sFile,
    > MailEncoding.Ba se64);
    >
    > oMsg.Attachment s.Add(oAttch);
    >
    > // TODO: Replace with the name of your remote SMTP server.
    >
    > SmtpMail.SmtpSe rver = "mail.rediffmai l.com";
    >
    > SmtpMail.Send(o Msg);
    >
    > oMsg = null;
    >
    > //oAttch = null;
    >
    > }
    >
    > catch (Exception e)
    >
    > {
    >
    > Console.WriteLi ne("{0} Exception caught.", e);
    >
    > }
    >[/color]

    Comment

    Working...