217
Views
11
Comments
Email attachment File Name
Question

Hi, 

I am having issue with email attachment file name. I set File Name of AttachFile action with format "Form_20181204". But the attached file in the actual email is named as "Form 20181204" and the underscore "_" is missing in the file name. Could you please help what causes missing underscore in the file name? Thanks.

2020-02-28 09-46-54
Eduardo Jauch

Hi Aung,

Try to use the EncodeHTML function. Pass the file name to it and the result as the attachment file name.

Cheers.

UserImage.jpg
aung thiha

Eduardo Jauch wrote:

Hi Aung,

Try to use the EncodeHTML function. Pass the file name to it and the result as the attachment file name.

Cheers.

HI Eduardo, I have tried using EncodeHTML and it still doesn't work.


UserImage.jpg
aung thiha

The issue is only with Attach File component. When I write the File Name in Email body, I can see the underscore properly. Anyone can help?

2019-09-24 18-41-25
Jorge Martins
 
MVP

Hi aung thiha,

That likely has to do with MIME encoding of values... you may want to read some of the links I provided in this post earlier today. You can also read this very informative blog post on the subject.

From what I could find online, a quick fix, working for filenames that use only US-ASCII characters, is to add double quotes around your filename, so you would type in the File Name property of your AttachFile the value: """Form_20181204"""

UserImage.jpg
aung thiha

Jorge Martins wrote:

Hi aung thiha,

That likely has to do with MIME encoding of values... you may want to read some of the links I provided in this post earlier today. You can also read this very informative blog post on the subject.

From what I could find online, a quick fix, working for filenames that use only US-ASCII characters, is to add double quotes around your filename, so you would type in the File Name property of your AttachFile the value: """Form_20181204"""

Hi Jorge, Thanks for your comment. I tried using as suggested, But still no luck. The name shows special characters.



2019-09-24 18-41-25
Jorge Martins
 
MVP

Hi aung thiah,

That seems like the email is actually being sent according to MIME standard (one possibility way of sending filenames is for them to be encoded using one of MIME's accepted encodings: Q-encoding in UTF-8).

Maybe the e-mail client you are using isn't processing it properly? What e-mail application are you using? can you try another e-mail client? This could also be the cause for your attachment to have the wrong name: not because the platform didn't send it correctly, but because the e-mail client reading it isn't following the standards properly.

You may consider enabling logging the contents for the emails you're sending, so you can later analyse what's actually being sent by the platform.

UserImage.jpg
aung thiha

Jorge Martins wrote:

Hi aung thiah,

That seems like the email is actually being sent according to MIME standard (one possibility way of sending filenames is for them to be encoded using one of MIME's accepted encodings: Q-encoding in UTF-8).

Maybe the e-mail client you are using isn't processing it properly? What e-mail application are you using? can you try another e-mail client? This could also be the cause for your attachment to have the wrong name: not because the platform didn't send it correctly, but because the e-mail client reading it isn't following the standards properly.

You may consider enabling logging the contents for the emails you're sending, so you can later analyse what's actually being sent by the platform.

Hi Jorge, 

Thanks again for comment.

I actually have two Outsystems environments with the different version v8 and v10. Both are using same smtp server. i only encounter this issue in v10. I can see the underscore "_" in the email sent from v8. I am not sure if v8 and v10 are using different email clients. 


2019-09-24 18-41-25
Jorge Martins
 
MVP

Hi aung thiha,

The email client is the software you use to read the e-mail that was sent.

But if it works on v8 and doesn't work on v10, seems like an issue with the email sending functionality. I've already flagged this to the team at OutSystems, hopefully they will be able to help you.

UserImage.jpg
aung thiha

Jorge Martins wrote:

Hi aung thiha,

The email client is the software you use to read the e-mail that was sent.

But if it works on v8 and doesn't work on v10, seems like an issue with the email sending functionality. I've already flagged this to the team at OutSystems, hopefully they will be able to help you.


Thanks Jorge. Appreciate your help and looking forward to hearing from them.

UserImage.jpg
Nuno Rocha

Any luck with this?

I'm having the same issue, the missing "_".


And it is not related with the client, because the "_" is already missing in the e-mail stored in Service Center E-mail Log.


Regards,

Nuno

UserImage.jpg
col oab

I have a similar case. Please let me know when there is a fix.

Best regards

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