# Unable to send report via email

**URL:** <https://forum.inductiveautomation.com/t/unable-to-send-report-via-email/45364>\
**Category:** Ignition\
**Created:** [April 7, 2021, 8:02pm UTC](https://forum.inductiveautomation.com/t/unable-to-send-report-via-email/45364 "2021-04-07T20:02:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hachjessed](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@hachjessed](https://forum.inductiveautomation.com/u/hachjessed)\
**Post date:** [April 7, 2021, 8:02pm UTC](https://forum.inductiveautomation.com/t/unable-to-send-report-via-email/45364/1 "2021-04-07T20:02:13Z")

</div>

Anyone have a suggestion as to why I would be getting the following error log when attempting to run system.report.executeAndDistribute?

`[projectName=Project,reportPath=Report] SMTP server name smpt.com in Email does not exist.`

Script used:

```auto
email_settings = {"to":["myself@email.com"], "smtpServerName":"SMPT", "from":"myself@email.com", 'body':'this is a test', "subject":"Production Report ", "attachmentName":'file'}
system.report.executeAndDistribute(path="Daily Report", project = "Project", action = "email", actionSettings = email_settings)

```

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [April 7, 2021, 8:34pm UTC](https://forum.inductiveautomation.com/t/unable-to-send-report-via-email/45364/2 "2021-04-07T20:34:11Z")

</div>

I’m going to assume that the report path and SMTP server names not matching between your script and the error message are just an artifact of obfuscation so you could post it.

That error happens when the report execution tries to get the details of the SMTP server you named and fails to find it. Did you actually create an SMTP server on the gateway with that exact name?

---

<div class="post-metadata">

**Author:** ![hachjessed](https://avatars.discourse-cdn.com/v4/letter/h/7ab992/32.png) [@hachjessed](https://forum.inductiveautomation.com/u/hachjessed)\
**Post date:** [April 8, 2021, 1:16pm UTC](https://forum.inductiveautomation.com/t/unable-to-send-report-via-email/45364/3 "2021-04-08T13:16:46Z")

</div>

Thank you Kathy. I was calling the SMPT address directly, vs. a SMPT profile name setup in the Gateway. Once I made that change, I am able to complete the executeAndDistribute function.

Another question - Is there a limit to what datatypes you can send as a parameter? Is it possible to send a date? I was only successful sending a str version of the date.

---

<div class="post-metadata">

**Author:** ![G\_S\_I](https://avatars.discourse-cdn.com/v4/letter/g/7cd45c/32.png) [@G\_S\_I](https://forum.inductiveautomation.com/u/G_S_I)\
**Post date:** [May 25, 2022, 12:53am UTC](https://forum.inductiveautomation.com/t/unable-to-send-report-via-email/45364/4 "2022-05-25T00:53:39Z")

</div>

Kathy, questions.  
I set 8 reports to get emailed every weekend at 5am but only 3 of them went out this past weekend. All the reports are configured the same. Do you know what could be the issue?

On a side note. I have Ignition 8.1. Does 8.1 require a client to be open in order for reports to get emailed?

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [May 25, 2022, 12:59am UTC](https://forum.inductiveautomation.com/t/unable-to-send-report-via-email/45364/5 "2022-05-25T00:59:10Z")

</div>

It might be better if you created a new post, some info like how you are running the reports (a script or report scheduler), maybe some of your code and/or config, and any errors you might see in the gateway logs. Then you can ping Kathy by typing her user name starting with @.
