Hi,
I want to send an email to my registered users so that when they click on the URL given in the message hey should come back to my site as confirmetion of their registration. I am able to send the mail but the mail body is not coming as expected. Here's my code
<?php
public function email($id){
//get users info
$this->userInfo = $this->model->listUser($id);
$this->sendEmail($this->userInfo);
}
public function sendEmail($data){
$to =$data['email'];
$this->msg ="<img src=\"ideas.kpjit.com/public/images/header-img.jpg\" />
<h1>KPJ Idea</h1>
<p>Make a difference</p>
<p>This is a Confirmation Mail.Please confirm your registration
by clicking here <a href=\"http://ideas.kpjit.com\register\confirm\
<?php echo $this->data['id'];?></p>\" ";
$subject = "Registration confirmation";
$message = $this->msg;
$from ="
[email protected]";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From:
[email protected]' . "\r\n";
if(mail($to,$subject,$headers)){
$this->render2("register/message");
exit;
}
}
Also I am unable to insert my site banner in the mail. How can I do It.