# New features in 'mail' module

**URL:** <https://forum.ansible.com/t/new-features-in-mail-module/12135>\
**Category:** Ansible Project\
**Created:** [December 11, 2012, 6:42pm UTC](https://forum.ansible.com/t/new-features-in-mail-module/12135 "2012-12-11T18:42:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpmens1](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jpmens1](https://forum.ansible.com/u/jpmens1)\
**Post date:** [December 11, 2012, 6:42pm UTC](https://forum.ansible.com/t/new-features-in-mail-module/12135/1 "2012-12-11T18:42:52Z")

</div>

I've added a few features to the 'mail' module [1] because I need them,  
and hope you'll need them too 🙂

1. Support for MIME attachments (content-type: octet/stream). This may  
&nbsp;&nbsp;&nbsp;sound pretty crazy, but it goes like this: "Send me the file please".

2. Support for custom headers (inspired by Dag ranting about #1 on IRC 🙂

3. Support for specifying a non-standard SMTP port.

4. Support for specifying e-mail address with phrase portion (e.g.  
&nbsp;&nbsp;&nbsp;"John Doe \<john@example.com\>" for those mails that need to look good  
&nbsp;&nbsp;&nbsp;to a manager. 🙂

An example playbook and output can be found at [1].

Regards,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-JP

[1] [https://github.com/ansible/ansible/pull/1752](https://github.com/ansible/ansible/pull/1752)

---

<div class="post-metadata">

**Author:** ![Dag\_Wieers](https://avatars.discourse-cdn.com/v4/letter/d/45deac/32.png) [@Dag\_Wieers](https://forum.ansible.com/u/Dag_Wieers)\
**Post date:** [December 15, 2012, 11:45pm UTC](https://forum.ansible.com/t/new-features-in-mail-module/12135/2 "2012-12-15T23:45:57Z")

</div>

w00t !
