61
Views
6
Comments
Solved
bin file is attached to emails
Application Type
Reactive
Service Studio Version
11.54.41 (Build 63060)

Hello everybody,

I am using the upload widget to add an attachment to an email, which is working fine. But when the email is sent with no file uploaded, I still get a .bin file as an attachment. The file name is AT00001.bin and the size is 270 Bytes.

How do I achieve, that there is no attachment at all, when the user in not uploading a file with the upload widget.


The binary data and the file name from the upload widget are saved in local variables, which are passed as input parameters to a server action, containing the "Send Email".

The variable which stores the binary data is set to NullBinary() after the email got sent in an client action.


UserImage.jpg
Marc Fugger
Solution

When I am not using the attachment section in the Send Mail node, there is no .bin file attached to the email.

When I am using the attachment section, but don't pass anything to the FileContent variable, I get AT0001.bin attached to the email.

I have also tested with an empty email, so there should be no issue with any content from the email itself.

As a work around I have now 2 Send Mail nodes in the server action. One with attachment and one without using the  attachment section. An If node is checking, if FileContent is null. When true it is using the Send Mail node without attachment.

sendmail.PNG
2026-04-13 05-08-14
Pankaj Jain

Marc Fugger, 

Have you checked the documentation for email attachment, if not please follow this link

https://success.outsystems.com/documentation/11/developing_an_application/implement_application_logic/emails_in_mobile_and_reactive_web_apps/adding_email_attachments/

Note: Your email screen should be defined in reactive app.

If your email screen is defined in a traditional app, then you need to attach the file in preparation by using a temporary Entity. Please find oml file.


Thanks
Pankaj 

Traditional_Email_IS.oml
UserImage.jpg
Alexandre Yip

Hi Marc Fugger, 

In the preparation of the email widget test for the size and don't append the attachment. 

Hope that it helps you 

UserImage.jpg
Alexandre Yip

just to add

Use BinaryDataSize action to check the size from the binarydata_api if < 300 bytes don't add the attachment 

https://success.outsystems.com/documentation/11/reference/outsystems_apis/binarydata_api/


2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Marc,

Note that it's not OutSystems that adds the ATT00001.bin, but your e-mail program. A simple google on "ATT00001.bin" will find you many examples. It might be caused by something in your e-mail body, containing binary data that the mail program can't convert (so it assumes it's data).

Have you checked the content of ATT00001.bin? Is there anything legible inside?

2023-11-20 06-53-17
Neha Rathore

Hi Marc,

I think the issue is in the variable which stores the binary data is set to NullBinary()

This is creating this bin file.

Try not to send anything when there is no file attached.

Thanks

UserImage.jpg
Marc Fugger
Solution

When I am not using the attachment section in the Send Mail node, there is no .bin file attached to the email.

When I am using the attachment section, but don't pass anything to the FileContent variable, I get AT0001.bin attached to the email.

I have also tested with an empty email, so there should be no issue with any content from the email itself.

As a work around I have now 2 Send Mail nodes in the server action. One with attachment and one without using the  attachment section. An If node is checking, if FileContent is null. When true it is using the Send Mail node without attachment.

sendmail.PNG
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.