Today while writing code to send the mail using Gmail as SMTP server. I got the below error message
"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"
So what exactly this error and what is the solution. Her are few regions
1. When your server and the mail id are having different time zone
Solution of this error.
As you try to send email through your code. Gmail will send a mail to your account as a warning in you email account you have provided in code. Here is the email which you get.
Now click on Button " SECURE YOUR ACCOUNT". After click below screen will appear. By default it's "Turn off" selected . Now select Turn on option
Now we have done. Enjoy your code and Gmail as SMTP server.
Happy codeing.....
"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"
So what exactly this error and what is the solution. Her are few regions
1. When your server and the mail id are having different time zone
Solution of this error.
As you try to send email through your code. Gmail will send a mail to your account as a warning in you email account you have provided in code. Here is the email which you get.
Now click on Button " SECURE YOUR ACCOUNT". After click below screen will appear. By default it's "Turn off" selected . Now select Turn on option
Now we have done. Enjoy your code and Gmail as SMTP server.
Happy codeing.....
i am not recieb=ving my email kindly help me
ReplyDeleteplese help me i am not recieving my mail
ReplyDeleteHi Nazish,
DeleteWhat error you are getting. If possible please provide code which you are using to send the mail.