# Ansible can send mail from Macbook

**URL:** <https://forum.ansible.com/t/ansible-can-send-mail-from-macbook/33751>\
**Category:** Ansible Project\
**Created:** [September 6, 2020, 5:11pm UTC](https://forum.ansible.com/t/ansible-can-send-mail-from-macbook/33751 "2020-09-06T17:11:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZillaYT](https://avatars.discourse-cdn.com/v4/letter/z/4da419/32.png) [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Post date:** [September 6, 2020, 5:11pm UTC](https://forum.ansible.com/t/ansible-can-send-mail-from-macbook/33751/1 "2020-09-06T17:11:02Z")

</div>

$ ansible --version

ansible 2.9.13

config file = /Users/user/.ansible.cfg

configured module search path = [‘/Users/user/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]

ansible python module location = /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/ansible

executable location = /Library/Frameworks/Python.framework/Versions/3.8/bin/ansible

python version = 3.8.5 (v3.8.5:580fbb018f, Jul 20 2020, 12:11:27) [Clang 6.0 (clang-600.0.57)]

I have the following task

# Mail the files

- **name** : Mail the zip file

**mail** :

**host** : [smtp.gmail.com](http://smtp.gmail.com)

**port** : 465 # 587 fails as well

**secure** : starttls # always fails as well

**charset** : utf-8

**username** : “{{ user }}”

**password** : “{{ pw }}”

---

<div class="post-metadata">

**Author:** ![ZillaYT](https://avatars.discourse-cdn.com/v4/letter/z/4da419/32.png) [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Post date:** [September 6, 2020, 5:53pm UTC](https://forum.ansible.com/t/ansible-can-send-mail-from-macbook/33751/2 "2020-09-06T17:53:43Z")

</div>

I didn’t google hard enough. This asks the same question, and the has the answer, which I’v tried successfully.

[https://stackoverflow.com/questions/46992908/ansible-smtp-mail-send](https://stackoverflow.com/questions/46992908/ansible-smtp-mail-send)
