본문 바로가기
2013.04.06 10:20

Interactive SMTP Script

조회 수 2164 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
>>> from smtplib import SMTP as smtp
>>> s = smtp('smtp.python.is.cool')
>>> s.set_debuglevel(1)
>>> s.sendmail('wesley@python.is.cool', ('wesley@python.is.cool', 'chun@python.is.cool'), ''' From: wesley@python.is.cool\r\nTo: wesley@python.is.cool, chun@python.is.cool\r\nSubject: test msg\r\n\r\nxxx\r\n.''')
send: 'ehlo myMac.local\r\n'

reply: '250-python.is.cool\r\n'
reply: '250-7BIT\r\n'
reply: '250-8BITMIME\r\n'
reply: '250-AUTH CRAM-MD5 LOGIN PLAIN\r\n'
reply: '250-DSN\r\n'
reply: '250-EXPN\r\n'
reply: '250-HELP\r\n'
reply: '250-NOOP\r\n'
reply: '250-PIPELINING\r\n'
reply: '250-SIZE 15728640\r\n'
reply: '250-STARTTLS\r\n'
reply: '250-VERS V05.00c++\r\n'
reply: '250 XMVP 2\r\n'
reply: retcode (250); Msg: python.is.cool
7BIT
8BITMIME
AUTH CRAM-MD5 LOGIN PLAIN
DSN
EXPN
HELP
NOOP
PIPELINING
SIZE 15728640
STARTTLS
VERS V05.00c++
XMVP 2
send: 'mail FROM:<wesley@python.is.cool> size=108\r\n'
reply: '250 ok\r\n'
reply: retcode (250); Msg: ok
send: 'rcpt TO:<wesley@python.is.cool>\r\n'
reply: '250 ok\r\n'
reply: retcode (250); Msg: ok
send: 'data\r\n'
reply: '354 ok\r\n'
reply: retcode (354); Msg: ok
data: (354, 'ok')
send: 'From: wesley@python.is.cool\r\nTo: wesley@python.is.cool\r\nSubject: test msg\r\n\r\nxxx\r\n..\r\n.\r\n' reply: '250 ok ; id=2005122623583701300or7hhe\r\n'
reply: retcode (250); Msg: ok ; id=2005122623583701300or7hhe
data: (250, 'ok ; id=2005122623583701300or7hhe')
{}

>>> s.quit()
send: 'quit\r\n'
reply: '221 python.is.cool\r\n'
reply: retcode (221); Msg: python.is.cool


Title
List of Articles
번호 제목 글쓴이 날짜 조회 수
58 Python 2.7 in CentOS with no issue (setuptools, pip, virtualenv) Hojung 2014.08.31 3381
57 GUI 기본 file Hojung 2013.04.06 5334
56 Gmail SMTPx2, POP, IMAP Script Hojung 2013.04.06 3368
55 E-Mail 작성 및 발송 스크립트 Hojung 2013.04.06 3679
54 Interactive IMAP4 Script Hojung 2013.04.06 3040
53 SMTP and POP3 Script Hojung 2013.04.06 2164
52 Interactive POP3 Script file Hojung 2013.04.06 2707
» Interactive SMTP Script Hojung 2013.04.06 2164
50 FTP Download Script Hojung 2013.04.06 7098
49 SocketServer 모듈을 사용해 TCP Server/Client 작성 Hojung 2013.04.06 4890
48 Network Programming - socket() 모듈을 사용해 UDP Server, client 생성 Hojung 2013.04.06 4830
47 Network Programming - socket() 모듈을 사용해 TCP Server, client 생성 Hojung 2013.04.06 14971
46 brew install python on Mac OS X + pyqt, lxml and spynner Hojung 2013.03.29 4970
45 Regular Expression (search vs match 그리고 Greediness) file Hojung 2013.03.26 2382
44 Regular Expression - Extension Notations (?...) Hojung 2013.03.26 2203
43 Regular Expression (문자열을 RE를 이용 list 리턴) - split() Hojung 2013.03.26 3111
42 Regular Expression (찾기 및 바꾸기) - sub() and subn() Hojung 2013.03.26 2427
41 Regular Expression (찾기) - findall() and finditer() Hojung 2013.03.26 3324
40 Regular Expression (matching vs searching) Hojung 2013.03.23 8536
39 How to install pip, spynner, macports and py-pyqt4 Hojung 2013.03.22 3528
Board Pagination ‹ Prev 1 2 3 Next ›
/ 3

Designed by sketchbooks.co.kr / sketchbook5 board skin

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5