Created
September 5, 2018 17:43
-
-
Save DamnedFacts/8fa5f912a49ae239f7bbebb31c42a0f7 to your computer and use it in GitHub Desktop.
Encode recipients, subject, and body in a 'mailto:' url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from urllib.parse import quote | |
| def email_quote(recipients, subject, body): | |
| recipients = quote(recipients) | |
| subject = quote(subject) | |
| body = quote(body) | |
| msg = f"mailto:{recipients}?subject={subject}&body={body}" | |
| return msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment