By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,364 Members | 1,254 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,364 IT Pros & Developers. It's quick & easy.

Server 530 Authetication error

P: n/a
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 = "jb****@yahoo.co.in";

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

oMsg.To = "ja************@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.Base64);

oMsg.Attachments.Add(oAttch);

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

SmtpMail.SmtpServer = "mail.rediffmail.com";

SmtpMail.Send(oMsg);

oMsg = null;

//oAttch = null;

}

catch (Exception e)

{

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

}
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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:
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 = "jb****@yahoo.co.in";

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

oMsg.To = "ja************@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.Base64);

oMsg.Attachments.Add(oAttch);

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

SmtpMail.SmtpServer = "mail.rediffmail.com";

SmtpMail.Send(oMsg);

oMsg = null;

//oAttch = null;

}

catch (Exception e)

{

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

}

Jul 21 '05 #2

P: n/a
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:
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 = "jb****@yahoo.co.in";

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

oMsg.To = "ja************@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.Base64);

oMsg.Attachments.Add(oAttch);

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

SmtpMail.SmtpServer = "mail.rediffmail.com";

SmtpMail.Send(oMsg);

oMsg = null;

//oAttch = null;

}

catch (Exception e)

{

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

}

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.