# MarkdownMerge
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
## Install
`pip install markdown_merge`
## How to use
### Provide your SMTP server settings, e.g. for AWS SES
``` python
import os
```
``` python
servernm = 'email-smtp.us-west-2.amazonaws.com'
username = os.getenv('SES_SMTP_USER')
password = os.getenv('SES_SMTP_PASS')
smtp_cfg = dict(host=servernm, port=587, user=username, password=password, use_ssl=False, use_tls=True)
```
You can configure your SMTP server settings using the `smtp_cfg`
dictionary format shown above. The example uses AWS SES with environment
variables for credentials.
### Provide your email details
``` python
from_addr = get_addr('XXX@fastmail.com', 'Jeremy Howard')
to_addrs = [get_addr('douglas@example.com', 'Douglas Adams'),
get_addr('cleese@example.com', 'John Cleese')]
inserts = [{'special': "Thanks for all the fish."},
{'special': "That was a silly walk."}]
msg = """## Hello there!
Here is your special message: *{special}*"""
```
``` python
ml = MarkdownMerge(to_addrs, from_addr, 'A message', msg, smtp_cfg=smtp_cfg, inserts=inserts, test=True)
```
The `test=True` parameter prints the messages instead of sending them.
### Send your messages
``` python
ml.send_msgs()
```
To: Douglas Adams <douglas@example.com>
----------------------------------------
## Hello there!
Here is your special message: *Thanks for all the fish.*
========================================
To: John Cleese <cleese@example.com>
----------------------------------------
## Hello there!
Here is your special message: *That was a silly walk.*
========================================
Raw data
{
"_id": null,
"home_page": "https://github.com/AnswerDotAI/markdown_merge",
"name": "markdown-merge",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "email mail markdown template",
"author": "Jeremy Howard",
"author_email": "github@jhoward.fastmail.fm",
"download_url": "https://files.pythonhosted.org/packages/ec/1c/9b01208b23d3cf9d9097eaed002f324dd2aded885fb3cdb04b7c8a874701/markdown_merge-0.1.6.tar.gz",
"platform": null,
"description": "# MarkdownMerge\n\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\n## Install\n\n`pip install markdown_merge`\n\n## How to use\n\n### Provide your SMTP server settings, e.g.\u00a0for AWS SES\n\n``` python\nimport os\n```\n\n``` python\nservernm = 'email-smtp.us-west-2.amazonaws.com'\nusername = os.getenv('SES_SMTP_USER')\npassword = os.getenv('SES_SMTP_PASS')\nsmtp_cfg = dict(host=servernm, port=587, user=username, password=password, use_ssl=False, use_tls=True)\n```\n\nYou can configure your SMTP server settings using the `smtp_cfg`\ndictionary format shown above. The example uses AWS SES with environment\nvariables for credentials.\n\n### Provide your email details\n\n``` python\nfrom_addr = get_addr('XXX@fastmail.com', 'Jeremy Howard')\nto_addrs = [get_addr('douglas@example.com', 'Douglas Adams'),\n get_addr('cleese@example.com', 'John Cleese')]\ninserts = [{'special': \"Thanks for all the fish.\"},\n {'special': \"That was a silly walk.\"}]\n\nmsg = \"\"\"## Hello there!\n\nHere is your special message: *{special}*\"\"\"\n```\n\n``` python\nml = MarkdownMerge(to_addrs, from_addr, 'A message', msg, smtp_cfg=smtp_cfg, inserts=inserts, test=True)\n```\n\nThe `test=True` parameter prints the messages instead of sending them.\n\n### Send your messages\n\n``` python\nml.send_msgs()\n```\n\n To: Douglas Adams <douglas@example.com>\n ----------------------------------------\n ## Hello there!\n\n Here is your special message: *Thanks for all the fish.*\n ========================================\n\n To: John Cleese <cleese@example.com>\n ----------------------------------------\n ## Hello there!\n\n Here is your special message: *That was a silly walk.*\n ========================================\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "Send email using markdown",
"version": "0.1.6",
"project_urls": {
"Homepage": "https://github.com/AnswerDotAI/markdown_merge"
},
"split_keywords": [
"email",
"mail",
"markdown",
"template"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2f6b4520269243f353cd6601180e14a4bcc2c8c6a843b2622f395e8bd682e4c7",
"md5": "22b9a404a91e77dcc91938740aa08594",
"sha256": "2898ee3a57e7a1bb48e383e7a48c647d28062b4349d5fc2048715edba8f7466b"
},
"downloads": -1,
"filename": "markdown_merge-0.1.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "22b9a404a91e77dcc91938740aa08594",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8860,
"upload_time": "2025-10-15T09:39:29",
"upload_time_iso_8601": "2025-10-15T09:39:29.809722Z",
"url": "https://files.pythonhosted.org/packages/2f/6b/4520269243f353cd6601180e14a4bcc2c8c6a843b2622f395e8bd682e4c7/markdown_merge-0.1.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ec1c9b01208b23d3cf9d9097eaed002f324dd2aded885fb3cdb04b7c8a874701",
"md5": "3798255971758046c774c6fc2359c5e5",
"sha256": "9294efbe659ca74cdbd8d363737eb2c960b8b53d81030d670f1a8a18fb047a97"
},
"downloads": -1,
"filename": "markdown_merge-0.1.6.tar.gz",
"has_sig": false,
"md5_digest": "3798255971758046c774c6fc2359c5e5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 9490,
"upload_time": "2025-10-15T09:39:30",
"upload_time_iso_8601": "2025-10-15T09:39:30.817317Z",
"url": "https://files.pythonhosted.org/packages/ec/1c/9b01208b23d3cf9d9097eaed002f324dd2aded885fb3cdb04b7c8a874701/markdown_merge-0.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-15 09:39:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AnswerDotAI",
"github_project": "markdown_merge",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "markdown-merge"
}