WebFaction
Community site: login faq

I'm unable to send mail via Python/Flask and the WebFaction SMTP. Settings I'm using are below:

MAIL_USERNAME =           os.getenv('MAIL_USERNAME',        'mailbox_username')
MAIL_PASSWORD =           os.getenv('MAIL_PASSWORD',        'mailbox_password')
MAIL_DEFAULT_SENDER =     os.getenv('MAIL_DEFAULT_SENDER',  'mail@1eyed.mwanstall.com')
MAIL_SERVER =             os.getenv('MAIL_SERVER',          'smtp.webfaction.com')
MAIL_PORT =           int(os.getenv('MAIL_PORT',            '587'))
MAIL_USE_SSL =        int(os.getenv('MAIL_USE_SSL',         True))

The error I'm getting back is "SendEmailError: SMTP Connection error: Check your MAIL_SERVER and MAIL_PORT settings."

I've tried using a MailBox I created as the username/password and I've tried using my webfaction account username/password and both result in the same.

What have I got wrong?

Edit: Updated with real FROM email - the error is still the same.

The error is raised via the Python socket library: socket.gaierror, socket.error

UPDATE: Turned on debugging and the exact error I'm getting is:

SSLError(1, u'[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:581)')

asked 18 Oct '15, 10:52

the_mal
1326
accept rate: 100%

edited 19 Oct '15, 08:21


Fixed it. I had to set SSL to False, then it all worked.

permanent link

answered 19 Oct '15, 08:41

the_mal
1326
accept rate: 100%

Please try sending with a valid FROM Email Address that you control. A basic check shows there are no MX records for 'noreply@testemail.com'.

permanent link

answered 18 Oct '15, 11:09

aaront ♦♦
7664
accept rate: 27%

I've tried with a valid email - set an email up on my domain, tested the email (sending and receiving) to make sure it's working and still the script fails.

(19 Oct '15, 07:28) the_mal

More updates, I've turned on debugging and the exact error I'm getting is: SSLError(1, u'[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:581)')

(19 Oct '15, 08:20) the_mal
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×337
×69
×44
×42

question asked: 18 Oct '15, 10:52

question was seen: 4,649 times

last updated: 19 Oct '15, 08:41

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM