Navigation Menu

Skip to content
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

SMTP returner should use email library to compose RFC2822 returner messages. #29159

Closed
aphor opened this issue Nov 24, 2015 · 7 comments
Closed
Labels
Feature new functionality including changes to functionality and code refactors, etc. Platform Relates to OS, containers, platform-based utilities like FS, system based apps Returners stale
Milestone

Comments

@aphor
Copy link
Contributor

aphor commented Nov 24, 2015

Eventually there will be problems with encoding of data or the need to produce multipart MIME messages handling returner data. Instead of hand-crafting messages as strings, the SMTP returner should use the standard library email module to construct and control valid RFC2822 messages containing returner data.

returners/smtp_return.py

https://docs.python.org/3/library/email.html

@aphor
Copy link
Contributor Author

aphor commented Nov 24, 2015

Besides providing control over encoding (and ensuring the email headers properly identify the encoded text), using a library like the email module will enable custom rich text or HTML messages for human consumption with attachments containing machine readable formats like JSON data.

@techhat
Copy link
Contributor

techhat commented Nov 24, 2015

Since we still need to maintain Python 2 compatibility, here's a more appropriate link: https://docs.python.org/2/library/email.html

@sjorge
Copy link
Contributor

sjorge commented Nov 24, 2015

Having it use the same backend as https://github.com/saltstack/salt/blob/develop/salt/states/smtp.py would be more consistent no?

Perhaps that backend could use some love too, i think it uses the smtp module

@jfindlay jfindlay added Feature new functionality including changes to functionality and code refactors, etc. Returners Platform Relates to OS, containers, platform-based utilities like FS, system based apps labels Nov 25, 2015
@jfindlay jfindlay added this to the Approved milestone Nov 25, 2015
@stale
Copy link

stale bot commented Feb 12, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Feb 12, 2018
@aphor
Copy link
Contributor Author

aphor commented Feb 13, 2018

I'm going to need this soon I think, and so I'd like to keep the ticket around to anchor work.

@stale
Copy link

stale bot commented Feb 13, 2018

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label Feb 13, 2018
@stale
Copy link

stale bot commented May 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label May 29, 2019
@stale stale bot closed this as completed Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new functionality including changes to functionality and code refactors, etc. Platform Relates to OS, containers, platform-based utilities like FS, system based apps Returners stale
Projects
None yet
Development

No branches or pull requests

4 participants