Replies: 1 comment
-
|
Hi @YoYo-Russ, I recommend you create the output html separate from this package. This could be as simple as using standard string formatting or you could use a template engine like jinja. Using standard string formatting would look like html_template = """<p>Hi {name},</p>
...
"""
msg_html = html.template.format(name="YoYo-Russ")That kind of string formatting won't be suitable for sufficiently complex templates, and something like Jinja is a lot more robust. Hope this helps! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm looking to speed up a couple of work processes involving the sending and receiving of mails to different folders.
So far simplegmail has been amazing so thank you Jeremy!
I've run into a bit of hitch recently when working on sending mails. I'd like to use my current templates which are all stored as .html files.
Is there a method of sending my email templates if I set my params up in the usual fashion? :
params = { "to": "test@example.com", "sender": "me@example.com", "subject": "this is a test message", "msg_html": #how would I 'inject?' my .html template here?, "msg_plain": "This is a test message" }Beta Was this translation helpful? Give feedback.
All reactions