Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- ansible
- G-suite
- centos 8
- application security
- bash
- ssh key 배포
- 한글가이드
- 로그인불가
- hardening
- Kibana server is not ready yet
- freebsd
- Proxy
- XCP-ng
- docker
- GitLab
- 보안양파
- endpoint security
- x-pack
- ELASTIC
- proxycfg
- miniconda
- xe guest utilities
- Kibana
- PlayBook
- pfsense
- Windows
- elastic stack
- macos
- Elasticsearch
Archives
- Today
- Total
선 밖에 선 자유인
python3 메일 보내기 예제 본문
출처: http://stackoverflow.com/questions/24077314/how-to-send-an-email-with-style-in-python3
#!/usr/bin/python3 import smtplib msg_header = 'From: Sender Name\n' \ 'To: Receiver Name \n' \ 'Cc: Receiver2 Name \n' \ 'MIME-Version: 1.0\n' \ 'Content-type: text/html\n' \ 'Subject: Any subject\n' title = 'My title' msg_content = ' \n'.format(title=title) msg_full = (''.join([msg_header, msg_content])).encode() server = smtplib.SMTP("smtp 서버=":25') server.starttls() #server.login('sender@server', '') server.sendmail('receiver@server', ['receiver2@server', 'receiver3@server'], msg_full) server.quit()
Comments