# Sending Email with EPL apps

**URL:** <https://community.cumulocity.com/t/sending-email-with-epl-apps/3397>\
**Category:** Forum\
**Tags:** Streaming-Analytics-Apama, cumulocity\
**Created:** [August 30, 2023, 6:55am UTC](https://community.cumulocity.com/t/sending-email-with-epl-apps/3397 "2023-08-30T06:55:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabriele.chiossi](https://avatars.discourse-cdn.com/v4/letter/g/7ea924/32.png) [@gabriele.chiossi](https://community.cumulocity.com/u/gabriele.chiossi)\
**Post date:** [August 30, 2023, 6:55am UTC](https://community.cumulocity.com/t/sending-email-with-epl-apps/3397/1 "2023-08-30T06:55:49Z")

</div>

Hello all,  
I am trying to format the text of an email before sending it.  
If I output the test to the Apama console it looks good, but as soon as I send the email, the text is not as I would expect it.  
What I am trying to do is to insert where I want some new line character.  
How I am doing it right now is like this:  
“emailText := emailText + source + " - " + alarmInformation.AlarmSeverity + " - " + alarmInformation.EmailText + “\n”;”  
But this does not work, do you have any suggestions?  
Thank you and let me know.

---

<div class="post-metadata">

**Author:** ![Bevan\_Philip](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/bevan_philip/32/19444_2.png) [@Bevan\_Philip](https://community.cumulocity.com/u/Bevan_Philip)\
**Post date:** [August 31, 2023, 9:06am UTC](https://community.cumulocity.com/t/sending-email-with-epl-apps/3397/2 "2023-08-31T09:06:14Z")

</div>

Hello,

The text of the email is parsed as HTML (specifically, the `Content-Type` of outgoing messages is `text/html`), not as a string. In this case, you’d want to use `<br>` ( [`<br>`: The Line Break element - HTML: HyperText Markup Language | MDN (mozilla.org)](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br)) to insert a new line here.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![gabriele.chiossi](https://avatars.discourse-cdn.com/v4/letter/g/7ea924/32.png) [@gabriele.chiossi](https://community.cumulocity.com/u/gabriele.chiossi)\
**Post date:** [August 31, 2023, 9:17am UTC](https://community.cumulocity.com/t/sending-email-with-epl-apps/3397/3 "2023-08-31T09:17:08Z")

</div>

Thank you!! This fixed my issue.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [February 27, 2024, 9:17am UTC](https://community.cumulocity.com/t/sending-email-with-epl-apps/3397/4 "2024-02-27T09:17:56Z")

</div>

Closed on February 27, 2024, 9:17am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
