Skip to content

Commit

Permalink
Merge pull request #3 from NirantK/master
Browse files Browse the repository at this point in the history
Removed hard coded port value and added as a function parameter.
  • Loading branch information
sinhayash committed May 30, 2014
2 parents 70e70ed + 3cbf2c3 commit be876b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyemail.py
Expand Up @@ -5,8 +5,9 @@ def sendEmail(gmailAddress,
gmailPassword,
recipientAddress,
message,
smtpServer="smtp.gmail.com"):
server = smtplib.SMTP(smtpServer, 587)
smtpServer="smtp.gmail.com",
port=587):
server = smtplib.SMTP(smtpServer, port)
server.starttls()
server.login(gmailAddress, gmailPassword)
server.sendmail(gmailAddress, recipientAddress, message)
Expand Down

0 comments on commit be876b8

Please sign in to comment.