SMTP?

Adrian Eyre a.eyre at optichrome.com
Wed Nov 24 12:25:23 EST 1999


> send: 'mail FROM:<alexis> size=10\015\012'
> reply: '250 <alexis>, Sender accepted\015\012'
> reply: retcode (250); Msg: <alexis>, Sender accepted
> send: 'rcpt TO:<ulf.engstroem at nebb.no>\015\012'
> reply: '250 <ulf.engstroem at nebb.no>, Recipient ok\015\012'
> reply: retcode (250); Msg: <ulf.engstroem at nebb.no>, Recipient ok
> send: 'data \015\012'
> reply: '354 Enter mail, end with <CRLF>.<CRLF>\015\012'
> reply: retcode (354); Msg: Enter mail, end with <CRLF>.<CRLF>
> data: (354, 'Enter mail, end with <CRLF>.<CRLF>')

In here you might need to put in standard RFC822 headers.
From: xxx at yyy
To: aaa at bbb
Subject: Not a lot
[Blank line here to indicate end of headers]
Message here

> send: 'Small msg\015\012'
> send: '\015\012.\015\012'
> reply: '250 Ok, message saved\015\012'
> reply: retcode (250); Msg: Ok, message saved
> data: (250, 'Ok, message saved')
> send: 'quit \015\012'
> reply: '221 See ya in cyberspace\015\012'
> reply: retcode (221); Msg: See ya in cyberspace

Check the RFC, but I think the only important bit is the blank
line to indicate end of headers.

--------------------------------------------
Adrian Eyre <mailto:a.eyre at optichrome.com>
Optichrome Computer Solutions Ltd
Maybury Road, Woking, Surrey, GU21 5HX, UK
Tel: +44 1483 740 233  Fax: +44 1483 760 644
http://www.optichrome.com 
--------------------------------------------





More information about the Python-list mailing list