Example #1
0
    mailServer = smtplib.SMTP("smtp.gmail.com", 587)
    mailServer.ehlo()
    mailServer.starttls()
    mailServer.ehlo()
    mailServer.login(gmail_user, gmail_pwd)
    mailServer.sendmail(gmail_user, to, msg.as_string())
    # Should be mailServer.quit(), but that crashes...
    mailServer.close()


error = []

try:
    # Update employee and employers lists
    po.UpdateClients()
except:
    error.append('Problems with updating clients.')

try:
    # Update funds information
    po.UpdateFunds()
except:
    error.append('Problems with updating funds.')

try:
    # Update deals information
    po.UpdateDeals()
except:
    error.append('Problems with updating deals.')