Changeset 406 for foomailer/foomail.py
- Timestamp:
- Jun 29, 2020, 7:26:57 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
foomailer/foomail.py
r405 r406 40 40 parser.add_argument('--recipient', '-r', required=True) 41 41 parser.add_argument('--server', '-s', required=True) 42 parser.add_argument('--auth', help="SMTP AUTH username:password") 42 43 parser.add_argument('--cc', help='Carbon Copy header') 43 44 parser.add_argument('--file', action='append', help='Attachments to sent') … … 46 47 parser.add_argument('--subject', default=default_subject, help='Alternative Subject header') 47 48 parser.add_argument('--spam', action='store_true', help='Include X-Spam testing headers') 49 parser.add_argument('--ssl', action='store_true', help='Put SMTP connect in TLS mode') 48 50 parser.add_argument('--port', type=int, default=25, help='SMTP port used for connection') 49 51 parser.add_argument('--reply-to', help='Set Reply-To: header') … … 142 144 server.helo(args.hostname) 143 145 server.ehlo(args.hostname) 146 if args.ssl: 147 server.starttls() 148 if args.auth: 149 user, password = args.auth.split(':', 1) 150 server.login(user, password) 144 151 server.sendmail(args.sender, args.recipient, email.as_string()) 145 152 server.quit()
Note:
See TracChangeset
for help on using the changeset viewer.