I send my transactional email via
mandrill.com and it is quite reliable in getting emails reliably to their desitination. However, my emails are not getting to the Mandrill service on some networks when using the CB.
I'm getting this error while on some networks, and not on others:
Supervisor boss_mail_sup had child mail_controller started with boss_mail_controller:start_link([{driver,boss_mail_driver_smtp}]) at <0.1179.0> exit with reason {error,retries_exceeded,{network_failure,"
smtp.mandrillapp.com",{error,closed}}} in context child_terminated
Is there I way I can make it work on the other ISPs? I've tried the following python script from teh same machine and it seems to be working:
#! /usr/local/bin/python
SMTPserver = '
smtp.mandrillapp.com'
sender = '
x...@xxx.com'
destination = ['
x...@xxx.com']
USERNAME = "xxx"
PASSWORD = "xxx"
# typical values for text_subtype are plain, html, xml
text_subtype = 'plain'
content="""\
Test message
"""
subject="Sent from Python"
import sys
import os
import re
from smtplib import SMTP_SSL as SMTP # this invokes the secure SMTP protocol (port 465, uses SSL)
# from smtplib import SMTP # use this for standard SMTP protocol (port 25, no encryption)
from email.MIMEText import MIMEText
try:
msg = MIMEText(content, text_subtype)
msg['Subject']= subject
msg['From'] = sender # some SMTP servers will do this automatically, not all
conn = SMTP(SMTPserver)
conn.set_debuglevel(False)
conn.login(USERNAME, PASSWORD)
try:
conn.sendmail(sender, destination, msg.as_string())
finally:
conn.close()
except Exception, exc:
sys.exit( "mail failed; %s" % str(exc) ) # give a error message