Jump to content

Mail function!


rameshfaj

Recommended Posts

$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

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.