i have odd problem.....i fiddling django's email backend...tested both console , smtp backend.....the email sent twice! can't trace why happenning....
here's view calls email sending operation:
from django.http import httpresponse django.core.mail import send_mail, emailmessage def index(request): if request.method in ('get'): print request.method mail = emailmessage(subject='subject here', body='here msg!', from_email='admin@test.com', to=['recipient@email.com']) mail.send() #send_mail(subject='subject here', message='here msg!', from_email='admin@test.com', recipient_list=['recipient@email.com']) return httpresponse('mail sent')
as can seen, used both emailmessage class send() method , send_mail() function.....but both behaves same.....and email sent twice!!
any help?
Comments
Post a Comment