# Sending the list of available updates via email

**URL:** <https://forum.ansible.com/t/sending-the-list-of-available-updates-via-email/36258>\
**Category:** Ansible Project\
**Created:** [January 28, 2022, 4:35am UTC](https://forum.ansible.com/t/sending-the-list-of-available-updates-via-email/36258 "2022-01-28T04:35:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raza\_Suleman](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Raza\_Suleman](https://forum.ansible.com/u/Raza_Suleman)\
**Post date:** [January 28, 2022, 4:35am UTC](https://forum.ansible.com/t/sending-the-list-of-available-updates-via-email/36258/1 "2022-01-28T04:35:46Z")

</div>

HI,

I would like to create a playbook that will send a list of available yum updates in the message body. How do I do that? my play book has two parts. first it collects a list of available packages and then 2nd it sends an email… I would like to include the results from first part in a readable format as message body in my email. Any help or guidance will be appreciated.

```Here

```

---

<div class="post-metadata">

**Author:** ![Roberto\_J\_R\_Paz](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@Roberto\_J\_R\_Paz](https://forum.ansible.com/u/Roberto_J_R_Paz)\
**Post date:** [January 31, 2022, 3:16pm UTC](https://forum.ansible.com/t/sending-the-list-of-available-updates-via-email/36258/2 "2022-01-31T15:16:10Z")

</div>

I tried stuff like that before using a block or multiline approach for the body attribute:

[https://stackoverflow.com/questions/3790454/how-do-i-break-a-string-in-yaml-over-multiple-lines](https://stackoverflow.com/questions/3790454/how-do-i-break-a-string-in-yaml-over-multiple-lines)

Maybe you can concatenate the lines of the command output in a previous step using ‘\n’ as EoL and save it into a variable. Then you can use that variable as part of the body.
