rameshfaj Posted June 25, 2007 Share Posted June 25, 2007 $subject="Membership confirmation !!";[email protected] $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:[email protected]",$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? Link to comment https://forums.phpfreaks.com/topic/57052-mail-function/ 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 Link to comment https://forums.phpfreaks.com/topic/57052-mail-function/#findComment-281867 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 = '[email protected]'; //from you the sender. $from='[email protected]'; //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."; } ?> Link to comment https://forums.phpfreaks.com/topic/57052-mail-function/#findComment-281868 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 Link to comment https://forums.phpfreaks.com/topic/57052-mail-function/#findComment-281871 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='[email protected]'; $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:[email protected]",$headers); ?> Link to comment https://forums.phpfreaks.com/topic/57052-mail-function/#findComment-281873 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/ Link to comment https://forums.phpfreaks.com/topic/57052-mail-function/#findComment-281875 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='[email protected]'; $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:[email protected]",$headers); Link to comment https://forums.phpfreaks.com/topic/57052-mail-function/#findComment-281877 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 Link to comment https://forums.phpfreaks.com/topic/57052-mail-function/#findComment-281878 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. Link to comment https://forums.phpfreaks.com/topic/57052-mail-function/#findComment-282572 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.