Server 530 Authetication error

  • Thread starter Thread starter Sunny
  • Start date Start date
S

Sunny

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 = "(e-mail address removed)";

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

oMsg.To = "(e-mail address removed)";

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);

}
 
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.
 
Back
Top