ElkArte Community

Project Support => Support => Topic started by: Jason on June 06, 2018, 01:57:04 pm

Title: Activation link as text instead of URL
Post by: Jason on June 06, 2018, 01:57:04 pm
When registration verification received by the user, the activation link is in text format instead of url format. Anyway to change it.

Title: Re: Activation link as text instead of URL
Post by: Spuds on June 06, 2018, 03:28:46 pm
If you are using the standard method of require email activation, then try the following as a test.

In Members.subs.php  look for line 782
Code: [Select]
			sendmail($regOptions['email'], $emaildata['subject'], $emaildata['body'], null, null, false, 0);
change that line to
Code: [Select]
			sendmail($regOptions['email'], $emaildata['subject'], $emaildata['body'], null, null, true, 0);
That false to true should force an html copy to go out as well.  By default most forum emails don't go out as HTML, I think since they are more likely  to be flagged as spam, but TBH I'm not sure.
Title: Re: Activation link as text instead of URL
Post by: emanuele on June 06, 2018, 04:08:09 pm
O_o

It's a while I've seen a client/webmail not able to present anything that looks like an URL as a link.
Heck, it was an SMF feature same ages ago. lol
Title: Re: Activation link as text instead of URL
Post by: Spuds on June 06, 2018, 05:51:25 pm
Yup ... all of mine do, they do not care its plain text.

Maybe if the link gets longer than 70-ish characters and the client line breaks it, maybe the txt version gets mussed up.
Title: Re: Activation link as text instead of URL
Post by: Jason on June 07, 2018, 12:48:36 pm
@Spuds

As told, there is a break in the link. I set it to False again.

Title: Re: Activation link as text instead of URL
Post by: Spuds on June 07, 2018, 04:54:20 pm
nods ... something for us to look at at some point
Title: Re: Activation link as text instead of URL
Post by: Jason on August 12, 2018, 03:16:21 am
Will it be fixed in the new release or anything can be done now?
Title: Re: Activation link as text instead of URL
Post by: tino on August 12, 2018, 09:47:51 am
Section C of the rfc3986

https://www.ietf.org/rfc/rfc3986.txt

Says to put angle brackets before and after the url in plain text emails.

This is quoted below;

QuoteBerners-Lee, et al.         Standards Track                    [Page 51]
RFC 3986                   URI Generic Syntax               January 2005

      http://example.com/
   These wrappers do not form part of the URI.

   In some cases, extra whitespace (spaces, line-breaks, tabs, etc.) may
   have to be added to break a long URI across lines.  The whitespace
   should be ignored when the URI is extracted.

   No whitespace should be introduced after a hyphen ("-") character.
   Because some typesetters and printers may (erroneously) introduce a
   hyphen at the end of line when breaking it, the interpreter of a URI
   containing a line break immediately after a hyphen should ignore all
   whitespace around the line break and should be aware that the hyphen
   may or may not actually be part of the URI.

   Using <> angle brackets around each URI is especially recommended as
   a delimiting style for a reference that contains embedded whitespace.

   The prefix "URL:" (with or without a trailing space) was formerly
   recommended as a way to help distinguish a URI from other bracketed
   designators, though it is not commonly used in practice and is no
   longer recommended.

   For robustness, software that accepts user-typed URI should attempt
   to recognize and strip both delimiters and embedded whitespace.

   For example, the text

      Yes, Jim, I found it under "http://www.w3.org/Addressing/",
      but you can probably pick it up from <ftp://foo.example.
      com/rfc/>.  Note the warning in <http://www.ics.uci.edu/pub/
      ietf/uri/historical.html#WARNING>.
Title: Re: Activation link as text instead of URL
Post by: Jason on August 12, 2018, 12:50:19 pm
@tino suggesting me to try this?
Title: Re: Activation link as text instead of URL
Post by: tino on August 12, 2018, 01:05:00 pm

I’m not sure where it’s set but yes I’d give it a try. I guess on the part where it’s generated?
Title: Re: Activation link as text instead of URL
Post by: Spuds on August 12, 2018, 09:05:30 pm
Interesting recommendation ... something we should try for sure! ... Thanks for pointing that out.

I tracked this one so we don't forget.