Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

shya
Level 2
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
abhi_entre
Correct answer by
Level 2
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
kishorekumar14
Level 7
Level 7

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...

Dipti_Chauhan
Community Advisor
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

abhi_entre
Correct answer by
Level 2
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