Hi Guys and Gals....

Could anyone help me with respect to why when this email is sent, the hyperlink in the message doesn't work?

//send email     
$to = $myrow['FirstName'].".".$myrow['LastName']."@petrotrin.com";
$subject = "TAIS Application - New Randomly Generated Password";
$from = "TAIS Application";
$msg = "Dear User ".$myrow['FirstName']." ".$myrow['LastName']." (".$empNo."),\n\nYou have requested that your password be changed due to unforeseen circumstances, and by doing so you acknowledge that you are no longer going to be using the old password.\n\nYour temporary password is: ".$pass."\n\nYou can change your temporary password by clicking the following link and follow the instructions. [B]<a href='resetPassword.php' title='Change Password' target='_blank'>Change Password</a>[/B]\n\nRegards\nTAIS Administration";		
	    
$mailsend = mail("$to","$subject","$msg","From: ".$from);
echo $mailsend ? "<img src='images/emailGone.gif' /> Random Password Sent." : "<img src='images/emailNotGone.png' />Random Password Not Sent.";

OK, there is another post that deals with almost the exact same topic. You can't use relative links in emails. The recipient's email client doesn't know what or where resetPassword.php is, nor does it know where 'images/emailNotGone.png' is. You have to use absolute links, ie., http://www.example.com/resetPassword.php

Oho....well actualy the image works...it displays on the web page as a confirmation msg to the user that their info was sent....but the email with the link part was the problem....
Ok....well thank you...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.