Forum Moderators: coopster

Message Too Old, No Replies

sending url in email

         

derek mcgilvray

9:26 pm on Jun 9, 2007 (gmt 0)

10+ Year Member



Hi,
I'm emailing a login link to new users once they've registered (using GET variables). It seems best as I'm choosing a random password which I'm then forcing them to change of first visit.

My problem is that the url is not clear in the email - part is an active link while the rest is plain text. Is there a simple thing I'm missing that will make the whole url either active or inactive?

Hope you can help,

Derek

jatar_k

9:28 pm on Jun 9, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> the url is not clear in the email

apologies, I am not totally sure what you mean.

Veil

9:34 pm on Jun 9, 2007 (gmt 0)

10+ Year Member



Depends on the mailclient how the url is displayed.

Plain text should be working in every client though. Is it possible that there are spaces in the link?

derek mcgilvray

9:48 pm on Jun 9, 2007 (gmt 0)

10+ Year Member



Sorry about not being so clear. There are no spaces in the url:

www.mysite.co.uk/login2.php?users_email=user
UP TO HERE is an active link,

@domain.com&users_pass=6de68362fa5f428dd4c3c37db4eb00f9
then from (@)it is inactive.

Any clues?

Habtom

5:10 am on Jun 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<a href="domain.com/link.php"> Click Here to Activate </a>

Something like this should keep the whole thing as a link. I have come across the same problem, and the way it was solved was this way.

Hab

derek mcgilvray

7:06 am on Jun 10, 2007 (gmt 0)

10+ Year Member



That's what I would've thought, but in hotmail for example, the only part of the link that's active is the users email.
If I include html, head, body tags, etc hotmail inserts some javascript function [ol('***link***')] that doesn't work in itself but does if I remove the javascript (which I don't know how to do).

Another email client only displays the bit in between the *** as active (and even then it links to only [a href]).
Please ***www.mysite.co.uk/login.php?users_email=user***@domain.com&users_pass=6de68362fa5f428dd4c3c37db4eb00f9">click here to finalise registration.

Should it really be this complicated?

alfaguru

2:47 pm on Jun 10, 2007 (gmt 0)

10+ Year Member



If you want to embed special characters in a URL, you must encode them first using urlencode().

so, "user%40example.com", not "user@example.com"

PHP will automatically translate the characters to their correct form when the page is invoked.

derek mcgilvray

4:47 pm on Jun 10, 2007 (gmt 0)

10+ Year Member



HA HA! I knew there had to be a simple explanation. Thanks for your help, I'll remember it for next time.