Django SMTP and SPA

79 views
Skip to first unread message

Alex

unread,
Apr 13, 2010, 8:58:14 AM4/13/10
to Django users
Hi.
Can anybody suggest an idea how to deal with SMTP server with Secure
Password Authentication in Django?

Massimiliano della Rovere

unread,
Apr 13, 2010, 10:44:40 AM4/13/10
to django...@googlegroups.com
i think the python modules
- smtplib
- email
will help. Have you already tried these ones?

> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
>

Alex

unread,
Apr 14, 2010, 5:26:05 AM4/14/10
to Django users
No.
I've just googled a bit for SPA, SPA+python. But I did not find
anything helpfull.

On 13 апр, 18:44, Massimiliano della Rovere


<massimiliano.dellarov...@gmail.com> wrote:
> i think the python modules
> - smtplib
> - email
> will help. Have you already tried these ones?
>

Massimiliano della Rovere

unread,
Apr 14, 2010, 8:42:50 AM4/14/10
to django...@googlegroups.com
http://docs.python.org/library/smtplib.html
http://docs.python.org/library/email.html

and probably something like (python 3 code):
# msg, sender and receiver are unicode objects!
import smtplib
from email.mime.text import MIMEText

MIME = MIMEText(msg.encode(CODEC))
MIME['From'] = sender.encode(CODEC)
MIME['To'] = receiver.encode(CODEC)
MIME.set_charset(CODEC)

server = smtplib.SMTP(mail_server_ip)
#server.set_debuglevel(True)
server.sendmail(sender.encode(CODEC), receiver.encode(CODEC),
MIME.as_string())
server.quit()

Tom Evans

unread,
Apr 14, 2010, 9:16:55 AM4/14/10
to django...@googlegroups.com
On Wed, Apr 14, 2010 at 1:42 PM, Massimiliano della Rovere
<massimiliano...@gmail.com> wrote:
> http://docs.python.org/library/smtplib.html
> http://docs.python.org/library/email.html
>
> and probably something like (python 3 code):
> # msg, sender and receiver are unicode objects!
>        import smtplib
>        from email.mime.text import MIMEText
>
>        MIME = MIMEText(msg.encode(CODEC))
>        MIME['From'] = sender.encode(CODEC)
>        MIME['To'] = receiver.encode(CODEC)
>        MIME.set_charset(CODEC)
>
>        server = smtplib.SMTP(mail_server_ip)
>        #server.set_debuglevel(True)
>        server.sendmail(sender.encode(CODEC), receiver.encode(CODEC),
> MIME.as_string())
>        server.quit()
>
>

Where is the SPA bit then?

To the OP: as far as I am aware, SPA is a proprietary MS protocol,
which is not documented. I don't think you will find a non MS
implementation of SPA.

Cheers

Tom

Reply all
Reply to author
Forward
0 new messages