Skip to content

How to retrieve and save the verfication URL from email after registration

Hi @sven, there are some site require two step to activate user account after the registartion step is done.
----
First step is extracting URL from email.
Second step is open the extracted URL, then click the "activate" button to submit a form.
----

I tried to retrieve the verifcation URL from email like below:
----
[setup]
...
extract from email=Activation_URL
....

;== Sample of activate URL:
[Activation_URL]
type=extract
find url=%targethost%*/activate/*
static=1

;==first step of login step is opening the verification URL, then submit to "activate" form
[LOGIN_STEP1]
alternative url=%Activation_URL%
just download=1
....

Unfortunately it doesn't work, it's empty after I write the variable %activation_URL% to a local file.
Please advise, thanks in advance.


Comments

  • SvenSven www.GSA-Online.de
    why are you writing it to a file? it should be in the static-project file if extracted successfully.
  • Hi Sven, I tried to debug the script to find out which part doesn't work, that's why I write the %Activation_URL% to file, and I found out that %Activation_URL% is always empty...

    Please advise how to save the verification URL extracted from email, and use it in the further login step?

    Thanks.
  • SvenSven www.GSA-Online.de
    when do you write it? its only available after email verification and on login part.
  • I put it into [LOGIN_STEP1] as following:
    ----
    [LOGIN_STEP1]

    alternative url=%Activation_URL%
    ;=== debug the variable
    write file="d:\test.txt" "test - %Activation_URL%"
    just download=1
    ....

    -----



  • Get it fixed, thanks Sven.
  • SvenSven www.GSA-Online.de
    alternative url is only useful when using find url/find link. As you use this only url by itself, you have to use "modify url".
Sign In or Register to comment.