# AWX Mail Module Failed from AWX Environment

**URL:** <https://forum.ansible.com/t/awx-mail-module-failed-from-awx-environment/5127>\
**Category:** Project Discussions\
**Tags:** awx, collections, ansible-core, ee\
**Created:** [April 24, 2024, 4:56pm UTC](https://forum.ansible.com/t/awx-mail-module-failed-from-awx-environment/5127 "2024-04-24T16:56:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sakshi](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Sakshi](https://forum.ansible.com/u/Sakshi)\
**Post date:** [April 24, 2024, 4:56pm UTC](https://forum.ansible.com/t/awx-mail-module-failed-from-awx-environment/5127/1 "2024-04-24T16:56:17Z")

</div>

We have installed the mail module in the Executor Node and AWX-EE task pod and  
We have tested the Job Template for Mail Module in AWX platform but we have found the below error. Could you please share the remediation steps for the below error issue.

Error:- ERROR! couldn’t resolve module/action ‘mail’. This often indicates a misspelling, missing collection, or incorrect module path.  
The error appears to be in ‘/runner/project/test.yml’: line 8, column 7, but may  
be elsewhere in the file depending on the exact syntax problem.

---

<div class="post-metadata">

**Author:** ![manish\_singh](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/manish_singh/32/2761_2.png) [@manish\_singh](https://forum.ansible.com/u/manish_singh)\
**Post date:** [April 24, 2024, 7:48pm UTC](https://forum.ansible.com/t/awx-mail-module-failed-from-awx-environment/5127/2 "2024-04-24T19:48:35Z")

</div>

I’m also encountering an issue with the AWX-EE task pod where the mail module seems to be installed correctly, but when I run the Job Template, I receive an error. The error suggests a problem with resolving the module/action for ‘mail’. Here are the details:

- Installed mail module on the Executor Node and AWX-EE task pod.

- Tested the Job Template for Mail Module on the AWX platform.

- Encountered error:

Could anyone suggest remediation

---

<div class="post-metadata">

**Author:** ![Sakshi](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Sakshi](https://forum.ansible.com/u/Sakshi)\
**Post date:** [April 25, 2024, 7:40am UTC](https://forum.ansible.com/t/awx-mail-module-failed-from-awx-environment/5127/3 "2024-04-25T07:40:54Z")

</div>

Hi team, could anyone please suggest a remediation? It would be really helpful.

---

<div class="post-metadata">

**Author:** ![TheRealHaoLiu](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/therealhaoliu/32/100_2.png) [@TheRealHaoLiu](https://forum.ansible.com/u/TheRealHaoLiu)\
**Post date:** [April 25, 2024, 1:53pm UTC](https://forum.ansible.com/t/awx-mail-module-failed-from-awx-environment/5127/4 "2024-04-25T13:53:29Z")

</div>

the mail module need to be in the job pod created by AWX when u run the job

if the module you need is not in the default EE container u need to create your on execution environment image with ansible-builder [Execution environment definition — Ansible Builder Documentation](https://ansible.readthedocs.io/projects/builder/en/stable/definition/)

---

<div class="post-metadata">

**Author:** ![Sakshi](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Sakshi](https://forum.ansible.com/u/Sakshi)\
**Post date:** [April 25, 2024, 2:21pm UTC](https://forum.ansible.com/t/awx-mail-module-failed-from-awx-environment/5127/5 "2024-04-25T14:21:02Z")

</div>

We have installed this mail module in the EE container but still I am facing the issue. Please check the below error once.

**Command:-** ansible localhost -m mail -a 'subject: test

**Error:-** [WARNING]: No inventory was parsed, only Implicit localhost is available

ERROR! this task ‘mail’ has extra params, which is only allowed in the following modules: ansible.legacy.command, ansible.builtin.include\_tasks, ansible.legacy.include tasks, ansible.legacy.meta, neta, le.builtin.shell, ansible.legacy.script, ansible.legacy.raw, ansible.builtin.raw, ansible.legacy.add\_host, ansible.builtin.include, ansible.builtin.include\_vars, group by, import tasks, ansible.builtim role, ansible.builtin.group\_by, ansible.builtin.include\_role, ansible.legacy.import\_role, script, ansible.builtin.win\_command, ansible.legacy.import\_tasks, ansible.legacy.win\_shell, ansible.windows. міли ansible.builtin.command, import\_role, ansible.builtin.meta, ansible.legacy.win\_command, ansible. legacy, include, ansible.windows.win\_command, ansible.builtin.import\_tasks, include tasks, zaw, ansible.le sible.builtin.add\_host, ansible.builtin.import\_role, include\_vars, add host, ansible.legacy.group\_by, ansible.legacy.include\_vars, ansible.legacy.include\_zole, ansible.legacy.shell, shell, win\_command,

win\_shell, set\_fact, command, ansible.builtin.set\_fact

---

<div class="post-metadata">

**Author:** ![jpmens](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jpmens/32/5543_2.png) [@jpmens](https://forum.ansible.com/u/jpmens)\
**Post date:** [April 26, 2024, 4:17pm UTC](https://forum.ansible.com/t/awx-mail-module-failed-from-awx-environment/5127/6 "2024-04-26T16:17:05Z")

</div>

Try that again, but syntactically correctly, when using adhoc:

```auto
ansible localhost -m mail -a "subject=test"

```

Spoiler alert: this is not going to send mail. You’ll need more parameters and a mail server, but at least you’re getting there…
