Skip to main content

create mailto URIs

Project description

mailto-uri

Creates mailto URIs. The main use case is to create mailto URIs for support web pages. This makes it easy for users to request stuff by relying on provided mail templates.

usage

Create a mail template:

echo 'please increase my quota' > increase-quota.txt

Create mailto URI:

$ mailto-uri -s 'increase quota' -r support@example.com increase-quota.txt
mailto:support@example.com?subject=increase%20quota&body=please%20increase%20my%20quota%0a

This URI can then be pasted into web pages.

Plain HTML:

<a href="mailto:support@example.com?subject=increase%20quota&body=please%20increase%20my%20quota%0a">increase quota</a>

Markdown:

If you need more storage, ask us to [increase your quota](mailto:support@example.com?subject=increase%20quota&body=please%20increase%20my%20quota%0a).

MediaWiki:

If you need more storage, ask us to [mailto:support@example.com?subject=increase%20quota&body=please%20increase%20my%20quota%0a increase your quota].

Alternatively, you can provide the mail as Markdown and use front matter for recipient and subject:

---
subject: increase quota
to: admin@example.com
cc:
  - support@example.com
  - someone@example.com
---

Dear Admin,

Please increase my quota!

Best Regards

Using Markdown is especially helpful if tools like Markdown Here are used.

$ mailto-uri increase-quota.md
mailto:admin@example.com?subject=increase%20quota&cc=support@example.com,someone@example.com&body=Dear%20Admin%2C%0A%0APlease%20increase%20my%20quota%21%0A%0ABest%20Regards

You can also use it in pipes:

$ generate-template | mailto-uri
mailto:...

installation

Arch Linux:

$ pacaur -S mailto-uri

pip:

$ pip install mailto-uri

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mailto-uri, version 1.2.0
Filename, size File type Python version Upload date Hashes
Filename, size mailto_uri-1.2.0-py3-none-any.whl (16.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size mailto-uri-1.2.0.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page