# 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:** 14

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [October 27, 2025, 9:10am UTC](https://forum.inductiveautomation.com/t/ignition-edge-sends-emails-but-no-attachments/111666/14 "2025-10-27T09:10:19Z")

</div>

This works for me, albeit I didn’t test on Edge;

```python
filePath = system.file.openFile()
if filePath != None:
   # This gets the filename without the C:\folder stuff
   fileName = filePath.split("\\")[-1]
   fileData = system.file.readFileAsBytes(filePath)
   smtp_server = "test"
   sender = "test"
   subject_mail = "Here is the file you requested"
   body_mail = "Hello, this is an email."
   recipients = ["test"]
   
   system.net.sendEmail(
   	smtpProfile = smtp_server, fromAddr = sender, 
   	subject = subject_mail, body = body_mail, html = 0, 
   	to = recipients, attachmentNames = [fileName], 
   	attachmentData = [fileData])

```

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/5/651d10160335f8fea132c6a3876e0bb23c093693.png)

---

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