-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to save generated emails #92
base: main
Are you sure you want to change the base?
Conversation
Thanks for picking up this can you rebase so only your commits are in the PR please? |
Ping? |
to a given folder instead of sending via SMTP.
67c52af
to
d3d6beb
Compare
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README still needs to give a sample command for sending these.
os.mkdir(self.local_mail_dir) | ||
if not self.address_override: | ||
msg['Bcc'] = self.mail | ||
email = open(os.path.join(self.local_mail_dir, msg['To']), 'w') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with open(os.path.join(self.local_mail_dir, msg['To']), 'w') as email:
email.write(str(msg))
# Don't want to send auth information unless we're TLS'd | ||
if self.user: | ||
smtp.login(self.user, self.password) | ||
if self.address_override: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is no longer needed, you do it above.
smtp.login(self.user, self.password) | ||
if self.address_override: | ||
env_to = self.address_override | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
ping @cbrownstein |
This PR resumes the work done in #29
I've performed some testing (the new option seems to work) but I'd like to test more before I recommend that this PR be merged. Help testing would be appreciated! 😃