# Ignition Edge sends emails but no attachments

**URL:** <https://forum.inductiveautomation.com/t/ignition-edge-sends-emails-but-no-attachments/111666>\
**Category:** Ignition\
**Tags:** vision, ignition83\
**Created:** [October 23, 2025, 2:51am UTC](https://forum.inductiveautomation.com/t/ignition-edge-sends-emails-but-no-attachments/111666 "2025-10-23T02:51:20Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 23, 2025, 9:14pm UTC](https://forum.inductiveautomation.com/t/ignition-edge-sends-emails-but-no-attachments/111666/9 "2025-10-23T21:14:15Z")

</div>

> [@Updating Limble Asset Information through Ignition](https://forum.inductiveautomation.com/t/updating-limble-asset-information-through-ignition/111559/3):
>
> Your LLM steered you wrong and gave you a lot more code than you need; they're quite good at that. This is less code and does the same as what you wrote, but with better error handling and usable from any scope, not just callable from Perspective. You can drop this into the project library. # ================================ # Limble API credentials # ================================ # These credentials are used to authenticate with the Limble CMMS API. # client\_id and client\_secret are provid…

Similar setup here - nothing against you personally, it's just that each time I work through a "person got a mountain of code from an LLM" post and try to guide them through all the things it did wrong makes me feel like Sisyphus.

Top level notes:

- You should only rarely need to import anything in small Ignition scripts. Any imports you do use, you should be judicious about.
  - You should _never_ import `system` or anything from system.
  - You should never use Jython's `datetime` library.
  - You should (almost) never have to import core Java classes like `Date` and `String`

- Defining an `email_historian_data_report()` function only to call it in the same file is totally pointless. If you're going to define this as a function, it should be in the project library, and it should accept useful parameters (potentially with default values).
- `while` loops are rarer than imports and should also almost never be used.
- `system.gui.warningBox` is a Vision only function that precludes this script from working in Perspective or being called from anywhere else in Ignition.
- Logging statements should be called with `infof` variants to do string formatting lazily, for the sake of performance.
- There's no need to import `array` or coerce the Jython string into a Java string in order to pass it to the attachment parameter
- A `try/catch Exception` around the whole block is only going to cause you grief troubleshooting, as it won't catch Java exceptions and it throws away the stacktrace, the most useful element for troubleshooting.

---

_[View the full topic](https://forum.inductiveautomation.com/t/ignition-edge-sends-emails-but-no-attachments/111666)._
