Jump to content

Mail function!


rameshfaj

Recommended Posts

$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?

Link to comment
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 = '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.";
}

?>

Link to comment
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='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);
         
         ?>

Link to comment
Share on other sites

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);
         

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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