Python 2: SMTPServerDisconnected: Connection unexpectedly closed

TLDR: switch to authenticated connection over TLS. Most probably the gmail server rejected the connection after the data command (very nasty of them to do so at this stage :). The actual message is most probably this one: retcode (421); Msg: 4.7.0 [ip.octets.listed.here 15] Our system has detected an unusual rate of 4.7.0 unsolicited mail … Read more

Using Javamail to connect to Gmail smtp server ignores specified port and tries to use 25

In Java you would do something similar to: Transport transport = session.getTransport(“smtps”); transport.connect (smtp_host, smtp_port, smtp_username, smtp_password); transport.sendMessage(msg, msg.getAllRecipients()); transport.close(); Note ‘smtpS’ protocol. Also socketFactory properties is no longer necessary in modern JVMs but you might need to set ‘mail.smtps.auth’ and ‘mail.smtps.starttls.enable’ to ‘true’ for Gmail. ‘mail.smtps.debug’ could be helpful too.

Mandrill Emails not reaching any mailbox, but Mandrill showing status ‘Delivered’

The Mandrill Delivered-status in the UI doesn’t actually mean that it is sent, only that Mandrill have received the message for processing. This is of course extremely confusing. The only way of seeing if an email is actually sent (i.e. successfully delivered to the receiving mail server) is to see if the message has smtp-events. … Read more

What is the proper way to ACTUALLY SEND mail from (Python) code?

Your understanding of how mail works is roughly correct. Some additional notes that may clear things up: SMTP is used for two distinct purposes. You seem to be confusing these two.: The first use, typically called “submission”, is to send a mail from an MUA (Mail User Agent, your mail program, Outlook, Thunderbird, …) to … Read more

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