Loading monkeysign/ui.py +6 −1 Original line number Diff line number Diff line Loading @@ -402,7 +402,12 @@ expects an EmailFactory email, but will not mail if nomail is set""" if self.options.dryrun: return True command = [x % {'to': msg.mailto} for x in shlex.split(self.options.mta)] try: p = subprocess.Popen(command, stdin=subprocess.PIPE) # nosec except OSError as e: self.warn(_('cannot find MTA %s, try --mta or --smtp: %s') % (command, e)) return False p.communicate(msg.as_string().encode('utf-8')) self.warn(_('sent message to %(destination)s with %(command)s') % {'destination': msg.mailto, Loading Loading
monkeysign/ui.py +6 −1 Original line number Diff line number Diff line Loading @@ -402,7 +402,12 @@ expects an EmailFactory email, but will not mail if nomail is set""" if self.options.dryrun: return True command = [x % {'to': msg.mailto} for x in shlex.split(self.options.mta)] try: p = subprocess.Popen(command, stdin=subprocess.PIPE) # nosec except OSError as e: self.warn(_('cannot find MTA %s, try --mta or --smtp: %s') % (command, e)) return False p.communicate(msg.as_string().encode('utf-8')) self.warn(_('sent message to %(destination)s with %(command)s') % {'destination': msg.mailto, Loading