Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Link in email is not working at Outlook however working for gmail

Avatar

Level 2

Hi Experts,

 

I have written an email functionality using org.apache.commons.mail api where I am passing a third party url as part of email body. Email functionality is working fine and recipients are able to receive the email. 

 

URL which is part of email body is appearing correct for gmail users however not for outlook users.

 

I suspected that it could be charset or contentType issue while setting the email, hence manually tried setting that value to UTF-8 for charset and text/html for contentType, still there is no luck.

 

email body url at gmail (working)

https://thirdpartdomain?mode=download&flatten_folders=true&signature=d5bfd947766840f834338d25b951f1d...

 

email body url at outlook (not working)

https://thirdpartdomain?mode=download&flatten_folders=true&signature=d5bfd947766840f834338d25b951f1d...xtamp=1629658500

 

last parameter &timestamp is replaced with xtamp, due to which url is inaccessible.

 

Please help me in resolving this issue.

 

Regards

Shya

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi @shya ,

 

Faced the same problem. Solution is simple put your link in <a href ="url">click here</a> as it will automatically takes care of encoding.

 

Regards,

Abhi

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @shya ,

 

In & timestamp request param since & times is getting treated as HTML character (x), Can you please try passing it like below

 

&amp;timestamp=1629658500

 

else if the url works with changing request parameter order, we can pass timestamp as first param.

 

https://thirdpartdomain/?timestamp=1629658500&mode=download&flatten_folders=true&signature=d5bfd9477...

Avatar

Community Advisor

Hi @shya 

 

&times means a multiplication sign. hence &times of &timestamp is being converted as x , so you end up seeing xtamp. Try encoding the & in front of timestamp with &amp;

 

Thanks

Dipti

Avatar

Correct answer by
Level 2

Hi @shya ,

 

Faced the same problem. Solution is simple put your link in <a href ="url">click here</a> as it will automatically takes care of encoding.

 

Regards,

Abhi