community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1741959 - /comdev/reporter.apache.org/trunk/scripts/sendmail.py
Date Mon, 02 May 2016 11:01:21 GMT
Author: sebb
Date: Mon May  2 11:01:21 2016
New Revision: 1741959

URL: http://svn.apache.org/viewvc?rev=1741959&view=rev
Log:
Tweaks

Modified:
    comdev/reporter.apache.org/trunk/scripts/sendmail.py

Modified: comdev/reporter.apache.org/trunk/scripts/sendmail.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/sendmail.py?rev=1741959&r1=1741958&r2=1741959&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/sendmail.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/sendmail.py Mon May  2 11:01:21 2016
@@ -4,7 +4,7 @@ import smtplib
 # Import the email modules we'll need
 from email.mime.text import MIMEText
 
-def sendMail(subject, body, recipients, sender='no-reply@reporter.apache.org', port=25):
+def sendMail(subject, body='', recipients='Site Development <site-dev@apache.org>',
sender='no-reply@reporter.apache.org', port=25):
     # Create a text/plain message
     msg = MIMEText(body)
     msg['Subject'] = subject
@@ -19,5 +19,5 @@ if __name__ == '__main__':
     # sudo postfix start # MacoxX
     # or start a debug server => need to change the SMTP port above
     # python -m smtpd -n -c DebuggingServer localhost:1025
-    sendMail('Example SMTP message', "The quick brown fox ...", 'no-one')
+    sendMail('Test message, please ignore', "Thanks!")
     print("Sent")
\ No newline at end of file



Mime
View raw message