The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required

the smtp server requires a secure connection or the client was not authenticated office 365
the server response was 5.7.1 authentication required
the smtp server requires a secure connection or the client was not authenticated automation anywhere
5.5 1 authentication required gmail c#
5.7.0 authentication required gmail
smtp server requires authentication gmail
the smtp server requires a secure connection or the client was not authenticated. outlook
the server response was: 5.5 1 authentication required learn more

I have a Problem, when i m sending a mail through this code then error is occured that "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. "

and my code is :

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{

    MailMessage mail = new MailMessage();
    mail.To.Add("info@msslindia.com");
    mail.From = new MailAddress("info@msslindia.com");
    string body = "<table><tr><td>Company Name:</td><td>" + txt_cname.Text + "</td></tr><tr><td>Address With No.:</td><td>" + txt_addwithno.Text + "</td></tr><tr><td>Contact Person:</td><td>" + txt_conperson.Text + "</td></tr><tr><td>Email Id</td><td>" + txt_email.Text + "</td></tr><tr><td>Description</td><td>" + txt_description.Text + "</td></tr></table>";
    mail.Body = body;
    mail.IsBodyHtml = true;
    SmtpClient smtp = new SmtpClient();
    smtp.Host = "smtp.gmail.com";
    smtp.Port = 25;
    smtp.UseDefaultCredentials = true;
    smtp.Credentials = new System.Net.NetworkCredential("info@msslindia.com", "xyz");
    smtp.EnableSsl = true;
    smtp.Send(mail);


    txt_cname.Focus();
    txt_cname.Text = "";
    txt_addwithno.Text = "";
    txt_conperson.Text = "";
    txt_email.Text = "";
    txt_description.Text = "";

}

Google may prevent an application from accessing your account Here you can enable applications to access google account with your credentials:

https://accounts.google.com/DisplayUnlockCaptcha

[SOLVED] 5.5.1 Authentication Required with smtp.gmail.com , The server response was: 5.5.1 Authentication Required." when send email to the client emailid. Here is my configuration for the emailID in admin� The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Code in Web.config file


I think you should set UseDefaultCredentials to false, since you define credentials for the connection.

Set this property to true when this SmtpClient object should, if requested by the server, authenticate using the default credentials of the currently logged on user.

[...]

If the UseDefaultCredentials property is set to false, then the value set in the Credentials property will be used for the credentials when connecting to the server

Error "The SMTP server requires a secure connection or the client , The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. After I tried almost� Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more The SMTP server requires a secure connection or the client was not authenticated.


Try the port 587(it worked for me ) and also set UseDefaultCredentials to false. Set this and try to send the mail

SMTP server requires a secure connection or the client was not , "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required" I know the� The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at plizz help me and my code is private void button1_Click(object sender, EventArgs e) {try {SmtpClient client = new SmtpClient("smtp.gmail.com", 587); client.EnableSsl = true;


i think you are using the wrong port.

you should use 465

http://support.google.com/mail/bin/answer.py?hl=en&answer=13287

cheers

GMAIL Error: The SMTP server requires a secure connection or the , "SMTP server requires a secure connection or the client was not authenticated" It says the Duration: 1:49 Posted: May 10, 2019 The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. ud8sm21095949igb.4 Please help guys.


The port doesn't really matter as System.Net.Mail does not support implicit SSL, in other words it totally ignores the "Port" parameter.

Send email from Gmail with SMTP authentication but got "5.5.1 , The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. The SMTP server requires a secure connection or the client was not authenticated. This issue usually occurs in case of. The account used to sent email is not authenticated on the Exchange. Send – Receive connectors are not configured properly.


Database Mail Error: The SMTP Server Requires a Secure , The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Exception: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM I have the application set at the following paramaters.


SMTP errors. What do they mean?, The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)


(The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 4 (2018-08-23T23:57:04). Exception Message: Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at).)