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