Search code examples
emaildrupaldrupal-7gmailforgot-password

Drupal "one-time login"/"password reset" links are truncated in plain-text emails


Gmail strips the lengthy password reset link and leads to a 404 page. Here is the mail receiving.

  Data Team,

   A request to reset the password for your account has been made at Test site

  You may now log in by clicking this link or copying and pasting it to your 
  browser:

  https://www.testsite.com.au/user/reset/22712/14926662...
  [1]

  This link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used.

  --  Testsite Australia team


  [1]   https://www.testsite.com.au/user/reset/22712/1492666251/YEBUB5BS_d6dTPkMHGoV4U3FYxwqtt0xsreHjp1FUCI

I am using drupal 7 and the mail is configured from backend admin/config/people/accounts as

[user:name],

A request to reset the password for your account has been made at 
[site:name].

You may now log in by clicking this link or copying and pasting it to your 
browser:

[user:one-time-login-url]

This link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used.

--  [site:name] team

Anybody please get me a solution for this

Thanks


Solution

  • In your content format settings configuration increase maximum link length at admin/config/content/formats/plain_text set it as 999 as example.