2039
Views
8
Comments
Solved
Getting absolute URL in Email.
Hi All,

I have an email where users can click on a link (this works) but underneath this link I want the URL written down. (so they can copy it in the browser).
I tried using the following 2 functions from the extension HTTPRequestHandler:

MakeAbsoluteURL(GetEntryeSpace(EntryPoint,eSpaceName)) normaly this works perfect.
But in the email I get a local address: 127.0.0.1/eSpace/Entrypoint.jsf

How can I the correct behaviour?

Kind regards,
Martijn Habraken
2019-11-11 17-10-24
Manish Jawla
 
MVP
Solution
hi Martijn Habraken,

can u add '
https://" + GetServerName() + "/espacename/xxxx.aspx'as input parameter in email.

eg: add URL as an input parameter in email and use it and set this parameter with above value.

2019-11-11 17-10-24
Manish Jawla
 
MVP
hi Martijn Habraken,

You can add the below parameter to var and use it in the email.
"https://" + GetServerName() + "/espacename/xxxx.aspx"
2018-12-11 13-32-05
Martijn Habraken
Hi Manish Jawla,

Unfortunately, this solutions also results in a local address: 
https://127.0.0.1/espacename/xxxx.asp

I think this happens because sending emails is a asynchronically process.
2019-09-17 09-11-00
João Pedro Abreu
Staff
If I'm not mistaken, the OutSystems platform builds the link URLs as part of the email send process, based on the hostname configured in Service Center (Administration > Environment Configuration).

I'm not aware of any way to get that value, but you can easily replicate that behavior by creating a Site property for your hostname.
2019-11-11 17-10-24
Manish Jawla
 
MVP
Solution
hi Martijn Habraken,

can u add '
https://" + GetServerName() + "/espacename/xxxx.aspx'as input parameter in email.

eg: add URL as an input parameter in email and use it and set this parameter with above value.

2018-12-11 13-32-05
Martijn Habraken
Hi Manish,

Putting the URL as input parameter indeed works.
Thanks.
UserImage.jpg
Giggal Abrol

How can we use this URL in UI Email Interface?

2025-01-17 13-16-27
Igor Kirtak

Hi, I know this is very old post, but in case if anyone looking for simple solution: just using built-in link to a screen produces absolute URL. Off course this assumes you have the email and the screen in the same module, but then if you need - you can redirect elsewhere from the screen.

UserImage.jpg
Nikita P

how can I achieve in Timer?

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