# HOw to send email withe the Two register variables.

**URL:** <https://forum.ansible.com/t/how-to-send-email-withe-the-two-register-variables/30552>\
**Category:** Ansible Project\
**Created:** [June 12, 2019, 6:43pm UTC](https://forum.ansible.com/t/how-to-send-email-withe-the-two-register-variables/30552 "2019-06-12T18:43:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raj\_Martha](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@Raj\_Martha](https://forum.ansible.com/u/Raj_Martha)\
**Post date:** [June 12, 2019, 6:43pm UTC](https://forum.ansible.com/t/how-to-send-email-withe-the-two-register-variables/30552/1 "2019-06-12T18:43:27Z")

</div>

Hi All,

i am trying to send an one email after the playbook is done, but some how i am getting the errors, i have tow tasks, and the out put of that tasks i defined as two set\_facts, but some reason it is not working if i use the two set-facts, if i use only one set\_fact it is working fine, below is my playbook, can some one please help me?

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [June 13, 2019, 5:07am UTC](https://forum.ansible.com/t/how-to-send-email-withe-the-two-register-variables/30552/2 "2019-06-13T05:07:57Z")

</div>

> Hi All,
> 
> i am trying to send an one email after the playbook is done, but some how i am getting the errors, i have tow tasks, and  
> the out put of that tasks i defined as two set\_facts, but some reason it is not working if i use the two set-facts, if  
> i use only one set\_fact it is working fine, below is my playbook, can some one please help me?

Can you show the errors please?

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Raj\_Martha](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@Raj\_Martha](https://forum.ansible.com/u/Raj_Martha)\
**Post date:** [June 13, 2019, 1:46pm UTC](https://forum.ansible.com/t/how-to-send-email-withe-the-two-register-variables/30552/3 "2019-06-13T13:46:29Z")

</div>

i am getting the below error,

msg: |-  
The task includes an option with an undefined variable. The error was: ‘cur\_datemqm’ is undefined

The error appears to have been in ‘/opt/WebSphere/scripts/Applications/projects/timetravel/printdate.yml’: line 23, column 9, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

msg: “Current Date on TT servers is: {{ cur\_date}}”

- name: “Displaying the Current Date on the TT servers”  
^ here
