Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sender= "inioutgoingemail@gmail.com"
- receiver= note.customer.login
- msg = MIMEMultipart()
- msg['From'] = 'cycomsoftware@cybersama.co.id'
- msg['To'] = note.customer.login
- msg['Subject'] = 'Dear '+note.customer.name+' Meeting Has been Confirm'
- mail_body = 'Hy <strong>' + note.customer.name + '</strong>, your meeting for '+note.name+' has been confrim & will be lead by' +note.people.name+' from Cycom Software with detail '+note.tgl_permintaan_rapat+'on '+note.location+'. See you soon on meeting!'
- mail_body+= '<br/><strong> DO NOT REPLY THIS MESSAGE VIA EMAIL </strong> For detail information please login to our system <a href="http://app.cycomsoft.com:8069"> click this </a>'
- mime_body = MIMEText(mail_body, 'html')
- msg.attach(mime_body)
- smtpObj = smtplib.SMTP(host='smtp.gmail.com', port=587)
- smtpObj.ehlo()
- smtpObj.starttls()
- smtpObj.ehlo()
- username="inioutgoingemail@gmail.com"
- pwd="inipasswordoutgoingserver"
- smtpObj.login(user=username, password=pwd)
- smtpObj.sendmail(sender,receiver,msg.as_string())
- smtpObj.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement