Skip to main content
MayurSatav
Community Advisor
Community Advisor
August 16, 2023
Solved

A download attribute is being removed after an email is sent.

Hi

 

We are using asset share commons default email template

 

 

and EmailShareServiceImpl.java for sending assets links for download.

 

However, after sharing an asset via email, the download attribute within the anchor tag links is being eliminated. But other attributes like href, alt are allowed. I want to know is there any XSSProtection similar config available for email template ?

 

I

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
MayurSatav
MayurSatavAccepted solution
Community Advisor
August 18, 2023

After an extensive process of debugging and thorough searching, I'm Concluding this matter with a resolution. Enabling the download attribute isn't feasible, as it was being removed on Google SMTP's end. The available options are to either utilize an alternative SMTP service or directly rename files within AEM before sending them.

Mayur Satav | www.mayursatav.in

4 replies

arunpatidar
Community Advisor
Community Advisor
August 16, 2023

Can you please check the view-source of an email. could be removed by browser due to invalid attribute. but just check to make sure it is removed from server side but not by the browser.

Translate
Arun Patidar
MayurSatav
Community Advisor
Community Advisor
August 16, 2023

I have already checked, including testing on various browsers and email platforms such as Outlook and Gmail. It appears that the removal of the download attribute might be occurring at the SMTP level.

Translate
Mayur Satav | www.mayursatav.in
Mahedi_Sabuj
Community Advisor
Community Advisor
August 16, 2023

Hi @mayursatav,

If your use case supports it, you might want to consider utilizing a data- attribute, such as data-download.

Thanks.

Translate
Mahedi Sabuj
MayurSatav
Community Advisor
MayurSatavCommunity AdvisorAuthorAccepted solution
Community Advisor
August 18, 2023

After an extensive process of debugging and thorough searching, I'm Concluding this matter with a resolution. Enabling the download attribute isn't feasible, as it was being removed on Google SMTP's end. The available options are to either utilize an alternative SMTP service or directly rename files within AEM before sending them.

Translate
Mayur Satav | www.mayursatav.in