smtp - python: Sending mail from localhost didn't work as expected -
i'm trying send message localhost:1025. i'm running smtp debug server using command python -m smtpd -n localhost:1025
.
here code used sending mail:
msg = mailer.message(from='noreply@'+company['host'], to=req['mail'], subject='e-mail confirmation', body=template(open('./confirmation.html').read()).render(company=company, account=account, accode=accode)) mailer.mailer(company['host'], port=1025).send(msg)
the req['mail'] containing email address, when checked email inbox , spam folders, didn't find message - what's supposed cause problem?
as made quite clear in documentation debugging server not attempt deliver email messages. allow testing , verification of email's content without sending mail.
Comments
Post a Comment