Created
July 4, 2013 05:27
-
-
Save yujuwon/5925104 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import smtplib | |
| from email.MIMEText import MIMEText | |
| def sendMail() : | |
| HOST = 'smtp.server.com' # smtp 호스트 주소 | |
| me = '[email protected]' # 보내는 사람 메일 주소 | |
| you = '[email protected]' # 받는 사람 메일 주소 | |
| contents = '프로그램 뻗었다!!' | |
| msg = MIMEText(contents, _charset='euc-kr') | |
| msg['Subject'] = '[ALERT]' | |
| msg['From'] = me | |
| msg['To'] = you | |
| s = smtplib.SMTP(HOST) | |
| s.sendmail(me, [you], msg.as_string()) | |
| s.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment