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

SMTP Mail Error - Requires Client Authentication

P: n/a
I am receiving the following error:

// error: System.Net.Mail.SmtpException: The SMTP server requires a
secure connection or the client was not authenticated. The server
response was: 5.7.0 No AUTH command has been given.

How do I provide the Client Authentication with the code below.
private void SendEmail2()
{
/* create the email message */
MailMessage message = new mailMessage("jw***@domain.com",
"te**@domain.com","Test email " +
DateTime.Today.ToString(),"body fo the message " );

/* create SMTP Client and add credentials */
SmtpClient smtpClient = new SmtpClient("smtp.domain.com");

/* Email with Authentication */
smtpClient.Credentials = new NetworkCredential("jwill",
"abcdef");
smtpClient.UseDefaultCredentials = false;
/*Send the message */
smtpClient.Send(message);

// error: System.Net.Mail.SmtpException: The SMTP server requires a
secure connection or the client was not authenticated. The server
response was: 5.7.0 No AUTH command has been given.
}
Feb 26 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Go here
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!138.entry

download the code..and you can tweak the settings as needed....


"Jeff" <jeff@[_nospam_].hardsoft.com.auwrote in message
news:13*************@corp.supernews.com...
>I am receiving the following error:

// error: System.Net.Mail.SmtpException: The SMTP server requires a secure
connection or the client was not authenticated. The server response was:
5.7.0 No AUTH command has been given.

How do I provide the Client Authentication with the code below.
private void SendEmail2()
{
/* create the email message */
MailMessage message = new mailMessage("jw***@domain.com",
"te**@domain.com","Test email " + DateTime.Today.ToString(),"body fo
the message " );

/* create SMTP Client and add credentials */
SmtpClient smtpClient = new SmtpClient("smtp.domain.com");

/* Email with Authentication */
smtpClient.Credentials = new NetworkCredential("jwill",
"abcdef");
smtpClient.UseDefaultCredentials = false;
/*Send the message */
smtpClient.Send(message);

// error: System.Net.Mail.SmtpException: The SMTP server requires a secure
connection or the client was not authenticated. The server response was:
5.7.0 No AUTH command has been given.
}

Feb 26 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.