Jump to content

Recommended Posts

Working through a 'register/login with verify' script to make it work for my setup, and it does! Unfortunately, the email asking me to verify my form details doesn't have a clickable link, just a url that I can copy/paste and get into the page.

The original line of code from the script reads:

$url = 'http://'.$_SERVER['SERVER_NAME'].'/property7/register/verify.php?id='.$lastId.'&token='.$token;

And, following some instructions from another source, I change it to:

$url = 'http://'.$_SERVER['SERVER_NAME'].'/property7/register/verify.php?id='.$lastId.'&token='.$token;
$url_components = parse_url($url);
parse_str($url_components['query'], $params);

But it gave the same result, image attached.

Can someone inform me as to what to do to get the link in the email to appear in link form so I can maybe turn it into a button?

Thanks in advance.email.png.65400dbc0a4d0e186d28db8adfb24a73.png

If you send text emails then it's up to the email client to decide whether to convert the URL into a clickable email.

Nearly all of them do. Yours aren't links because you're linking to localhost. If it was a .com or .net or one of the usual types of domain names then it would (probably) be made into a link.

Switch that, or send HTML emails.

9 hours ago, requinix said:

If you send text emails then it's up to the email client to decide whether to convert the URL into a clickable email.

Nearly all of them do. Yours aren't links because you're linking to localhost. If it was a .com or .net or one of the usual types of domain names then it would (probably) be made into a link.

Switch that, or send HTML emails.

I've tried several tutorials on registrations and, apart from the one I'm now using, they've contained errors and the creators haven't responded. But at least two of them did produce clickable links - unfortunately, I deleted the folders containing the code! I've since read that it's best to retain a non-clickable link as an option as not all systems can handle actual links.

11 minutes ago, chome4 said:

I've since read that it's best to retain a non-clickable link as an option as not all systems can handle actual links.

There's been a bit of a push in recent years for better email security, including showing people URLs they can copy and paste if they're not sure about authenticity, but virtually everyone is capable of handling actual links. It's one of the most basic principles of HTML emails.

Anyway, if you don't want then don't. You can put a plain URL into an email. But it has to have a domain that looks real for a client or email service to automatically link it for the user.

2 hours ago, requinix said:

There's been a bit of a push in recent years for better email security, including showing people URLs they can copy and paste if they're not sure about authenticity, but virtually everyone is capable of handling actual links. It's one of the most basic principles of HTML emails.

Anyway, if you don't want then don't. You can put a plain URL into an email. But it has to have a domain that looks real for a client or email service to automatically link it for the user.

I've uploaded everything into a .org domain and the result is the same. Strange.

Then... maybe Yahoo isn't being very nice and isn't automatically creating the link for you.

Sounds like you'll have to switch to HTML emails. They don't have to be very complicated messages. In fact for simple emails you can probably just get away with

<html>
<body>
Thanks for registering with {$server}. Please click this link to complete this registration:<br>
<a href="{$url}">{$url}</a>
</body>
</html>

Now sending the email, that's potentially complicated. But only a little. Depends on your application.

2 hours ago, requinix said:

Then... maybe Yahoo isn't being very nice and isn't automatically creating the link for you.

Sounds like you'll have to switch to HTML emails. They don't have to be very complicated messages. In fact for simple emails you can probably just get away with


<html>
<body>
Thanks for registering with {$server}. Please click this link to complete this registration:<br>
<a href="{$url}">{$url}</a>
</body>
</html>

Now sending the email, that's potentially complicated. But only a little. Depends on your application.

A further development: I specified a gmail address when I filled-in the registration form and the verify email's link was clickable. Seems that the issue lies with the Yahoo side of things!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.