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
- Elasticsearch
- Kibana
- miniconda
- freebsd
- centos 8
- G-suite
- GitLab
- XCP-ng
- 로그인불가
- bash
- Proxy
- application security
- ELASTIC
- Windows
- x-pack
- elastic stack
- Kibana server is not ready yet
- proxycfg
- ssh key 배포
- macos
- 보안양파
- docker
- hardening
- ansible
- PlayBook
- 한글가이드
- pfsense
- endpoint security
- xe guest utilities
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