rameshfaj Posted June 25, 2007 Share Posted June 25, 2007 $subject="Membership confirmation !!";$email=somebody@somemail.com $body="Dear $fullname,Click on the link to activate your membership account<a href='http://www.jobspokhara.com/confirm.php?type=employee&no=$random_no'></a>"; //echo"$email==$subject==$body=="; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $mailsend=mail($email,$subject,$body,"From:contact@jobspokhara.com",$headers); This mail function sends mail to the corresponding email address.But the link is not properly shown from the hyperlink.Can Any body show me my mistakes? Quote Link to comment Share on other sites More sharing options...
suma237 Posted June 25, 2007 Share Posted June 25, 2007 Can you post the output for this code Quote Link to comment Share on other sites More sharing options...
redarrow Posted June 25, 2007 Share Posted June 25, 2007 send this to your self for a try and notice the things i done good luck. <?php // To who ever. $to = 'xxxxxxxx@xxxxxxx.xxxxx'; //from you the sender. $from='xxxxxxxx@xxxxxx.xxxx'; //Subject line what ever. $subject = 'hi m8 it me aging how\'s you!'; $mess='<html><head><title>my good message for you m8</title> <body> <h1> redarrow look at this good web site unreel <p></p> <a href="http://www.google.com">Go there Know it unreel m8</a></h1><p></p> </body></html>'; $message = $mess; $headers = "From: $from\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=utf-8\r\n" . "Content-Transfer-Encoding: 8bit\r\n\r\n"; // send if correct. if(mail($to, $subject, $message, $headers)){ //if sent tell them. echo"Your email was sent to $to"; }else{ //if not sent tell them. echo"Sorry no email sent please try agin."; } ?> Quote Link to comment Share on other sites More sharing options...
rameshfaj Posted June 25, 2007 Author Share Posted June 25, 2007 the output is like this: Click on the link to activate your membership account<a href='http://www.jobspokhara.com/confirm.php?type=employee&no=81484622'>www.jobspokhara.com</a>Regards!Jobspokhara.com.np Quote Link to comment Share on other sites More sharing options...
redarrow Posted June 25, 2007 Share Posted June 25, 2007 There you go try it now ok. i relly think you need to look up the mail function a bit more as i provided a proper version but you isest using this but your way ha. you also dont have the url of this http://www.jobspokhara.com your url is this http://www.jobspokhara.com.np problem problem/ so change it below i dont no how u got that wrong? <?php $subject='Membership confirmation !!'; $email='somebody@somemail.com'; $body='<html><title>my page</title><body> Dear $fullname,Click on the link to activate your membership account<a href="http://www.jobspokhara.com/confi rm.php?type=employee&no=$random_no"></a> </body></html>'; $mess=$body; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $mailsend=mail($email,$subject,$mess,"From:contact@jobspokhara.com",$headers); ?> Quote Link to comment Share on other sites More sharing options...
redarrow Posted June 25, 2007 Share Posted June 25, 2007 This is ur proper url you must set it correctly in ur link ok. http://www.jobspokhara.com.n p/ Quote Link to comment Share on other sites More sharing options...
redarrow Posted June 25, 2007 Share Posted June 25, 2007 correctedto ur url and random number <?php $subject='Membership confirmation !!'; $email='somebody@somemail.com'; $body='Dear $fullname,Click on the link to activate your membership account<a href="http://www.jobspokhara.com. n p/confi rm.php?type=employee&no='.$random_no.'"></a>'; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $mailsend=mail($email,$subject,$body,"From:contact@jobspokhara.com",$headers); Quote Link to comment Share on other sites More sharing options...
redarrow Posted June 25, 2007 Share Posted June 25, 2007 .com.n p on the end of ur url ok for some strange reason the word problam comes up and your .com.n p dosent weired Quote Link to comment Share on other sites More sharing options...
rameshfaj Posted June 26, 2007 Author Share Posted June 26, 2007 Thanks everyone a lot,I have solved my problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.