You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2021/08/11 13:16:30 UTC
svn commit: r1892215 - /comdev/reporter.apache.org/trunk/scripts/sendmail.py
Author: sebb
Date: Wed Aug 11 13:16:30 2021
New Revision: 1892215
URL: http://svn.apache.org/viewvc?rev=1892215&view=rev
Log:
Allow test override of from and to
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=1892215&r1=1892214&r2=1892215&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/sendmail.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/sendmail.py Wed Aug 11 13:16:30 2021
@@ -33,7 +33,11 @@ if __name__ == '__main__':
# sudo postfix start # MacoxX
# or start a debug server => need to change the SMTP port
# python -m smtpd -n -c DebuggingServer localhost:1025
- sendMail('Test message, please ignore', "Thanks!", port=port)
+ if len(sys.argv) > 3:
+ sendMail('Test message, please ignore', "Thanks!", port=port, sender=sys.argv[2], recipients=[sys.argv[3]])
+ else:
+ sendMail('Test message, please ignore', "Thanks!", port=port)
+
print("Sent")
# sendMail('Another Test message, please ignore', "Thanks again!", recipients=['a.b.c','d.e.f'], port=port)
# print("Sent second")