SmtpException: Unable to read data from the transport connection: net_io_connectionclosed

EDIT: Super Redux Version Try port 587 instead of 465. Port 465 is technically deprecated. After a bunch of packet sniffing I figured it out. First, here’s the short answer: The .NET SmtpClient only supports encryption via STARTTLS. If the EnableSsl flag is set, the server must respond to EHLO with a STARTTLS, otherwise it … Read more

How to check if SMTP is working from commandline (Linux) [closed]

Syntax for establishing a raw network connection using telnet is this: telnet {domain_name} {port_number} So telnet to your SMTP server like telnet smtp.mydomain.example 25 And copy and paste the below helo client.mydomain.example mail from:<sender@mydomain.example> rcpt to:<to_email@mydomain.example> data From: test@mydomain.example Subject: test mail from command line this is test number 1 sent from linux box . … Read more

Login credentials not working with Gmail SMTP

UPDATE: This feature is no longer supported as of May 30th, 2022. See https://support.google.com/accounts/answer/6010255?hl=en&visit_id=637896899107643254-869975220&p=less-secure-apps&rd=1#zippy=%2Cuse-an-app-password ORIGINAL ANSWER (No longer working): I ran into a similar problem and stumbled on this question. I got an SMTP Authentication Error but my user name / pass was correct. Here is what fixed it. I read this: https://support.google.com/accounts/answer/6010255 In a … Read more

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

I have the same problem. I have found this solution: Google may block sign in attempts from some apps or devices that do not use modern security standards. Since these apps and devices are easier to break into, blocking them helps keep your account safer. Some examples of apps that do not support the latest … Read more

Sending email with PHP from an SMTP server

When you are sending an e-mail through a server that requires SMTP Auth, you really need to specify it, and set the host, username and password (and maybe the port if it is not the default one – 25). For example, I usually use PHPMailer with similar settings to this ones: $mail = new PHPMailer(); … Read more

Getting error while sending email through Gmail SMTP – “Please log in via your web browser and then try again. 534-5.7.14” [closed]

I know this is an older issue, but I recently had the same problem and was having issues resolving it, despite attempting the DisplayUnlockCaptcha fix. This is how I got it alive. Head over to Account Security Settings (https://www.google.com/settings/security/lesssecureapps) and enable “Access for less secure apps”, this allows you to use the google smtp for … Read more

How to send email via Django?

I use Gmail as my SMTP server for Django. Much easier than dealing with postfix or whatever other server. I’m not in the business of managing email servers. In settings.py: EMAIL_USE_TLS = True EMAIL_HOST = ‘smtp.gmail.com’ EMAIL_PORT = 587 EMAIL_HOST_USER = ‘me@gmail.com’ EMAIL_HOST_PASSWORD = ‘password’ NOTE: In 2016 Gmail is not allowing this anymore by … Read more

What is the behavior difference between return-path, reply-to and from?

Let’s start with a simple example. Let’s say you have an email list, that is going to send out the following RFC2822 content. From: <coolstuff@mymailinglist.example> To: <you@example.com> Subject: Super simple email Reply-To: <coolstuff-threadId=123@mymailinglist.example> This is a very simple body. Now, let’s say you are going to send it from a mailing list, that implements VERP … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)