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

I am using following code to send email. The Code works correctly in my local Machine. But on Production server i am getting the error message var fromAddress = new MailAddress(“[email protected]”); var fromPassword = “xxxxxx”; var toAddress = new MailAddress(“[email protected]”); string subject = “subject”; string body = “body”; System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient { Host … Read more

How to send an email with Gmail as provider using Python?

I am trying to send email (Gmail) using python, but I am getting following error. Traceback (most recent call last): File “”, line 14, in <module> server.login(username,password) File “/usr/lib/python2.5/”, line 554, in login raise SMTPException(“SMTP AUTH extension not supported by server.”) smtplib.SMTPException: SMTP AUTH extension not supported by server. The Python script is the following. … Read more

Send email using the GMail SMTP server from a PHP page

I am trying to send an email via GMail’s SMTP server from a PHP page, but I get this error: authentication failure [SMTP: SMTP server does no support authentication (code: 250, response: at your service, [] SIZE 35651584 8BITMIME STARTTLS ENHANCEDSTATUSCODES PIPELINING)] Can anyone help? Here is my code: <?php require_once “Mail.php”; $from = … Read more

Javamail Could not convert socket to TLS GMail

I am trying to send an email using JavaMail through gmails SMTP Server. however this code. final String username = “[email protected]”; final String password = “mygmailpassword”; Properties props = new Properties(); props.put(“mail.smtp.auth”, true); props.put(“mail.smtp.starttls.enable”, true); props.put(“”, “”); props.put(“mail.smtp.port”, “587”); Session session = Session.getInstance(props, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, password); } … Read more