Email1 python으로 간단하게 e-mail 보내기 다음 소스를 참조해서 정확한 mail주소와 gmail 암호를 입력하면 됩니다.import smtplib from email.mime.text import MIMEText import os def sendMail(me, you, msg): try: smtp = smtplib.SMTP_SSL('smtp.gmail.com', 465) smtp.login(me, os.getenv('EMAIL_PASSWORD')) # 환경 변수에서 비밀번호 가져오기 message = MIMEText(msg) message['Subject'] = 'TEST' message['From'] = me message['To'] = you .. 2024. 11. 13. 이전 1 다음 728x90 반응형