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

ganesh gunasekaran gjango.py at gmail.com
Thu May 7 03:50:12 MDT 2009


Hi gp,
I'm very new to Twisted Framework ,
I wrote a very simple  code to send mails concurrently, using SMTP mail
server
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,
port=25)
done.addErrback(err)
done.addCallback(lambda ignored: reactor.stop())
reactor.run()
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.
Thanks
guptha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20090507/77da82f3/attachment.html>


More information about the Twisted-Python mailing list