[Twisted-Python] how to authenticate SMPT server in Twisted Framework

ganesh gunasekaran gjango.py at gmail.com
Thu May 7 05:50:12 EDT 2009

Hi gp,
I'm very new to Twisted Framework ,
I wrote a very simple  code to send mails concurrently, using SMTP mail
the code as below

from twisted.mail.smtp import sendmail
from twisted.internet import reactor
from twisted.python.log import err
import time

MAILSERVER = 'mail.xxx.com'
listTo = ['ganesh.xxx at gmail.com', 'xxjango.py at gmail.com', '
lovely_xxx at yahoo.co.in']
FROM = 'gxxxkaran at xxxx.com'
MSGBODY = "hi this is test mail"
a= time.time()
done = sendmail(MAILSERVER, FROM, listTo, MSGBODY ,senderDomainName=None,
done.addCallback(lambda ignored: reactor.stop())
print "Took %s seconds" %str(time.time()-a)

hence i'm not aware of how to authenticate my mail server in Twisted
Framework ,this code gives me error saying ,"Relay access denied"
I will be grateful  if someone forward me the right solution.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20090507/77da82f3/attachment.htm 

More information about the Twisted-Python mailing list