How to send data into mail use codeigniter

Please log in or register to like posts.

                  How to send data into mail use Codeigniter?

Email is incredibly necessary for web applications. When a user signs up, we force require to send them an email to verify their email address and let the user verify the subscription. We further use email to reset forgotten passwords, send invoices and letters to customers, etc. CodeIgniter performs it super simple for us to send emails from our application utilizing a type of option.

CodeIgniter becomes a completed-in email library that we can use when sending emails.
Example
$msgs =”IP ADDRESS “.$ipAddress.”</br>nnArrivalDate: “.$arrivalDate.”nDays – “.$Days.”nAdults – “.$adults.”</br>Childs – “. $childs.”</br>Category – “.$Category.”</br>Message – “.$tourmessage.”</br></br>Name – “.$name.”</br>Mobile No : “.$phone.”</br>EmailID : “.$customerEmail.”</br>Country -“.$Country.”</br>”;
 
$message = ‘<html><body>’;
      $message .= ‘<table rules=”all” style=”border-color:#690000;” cellpadding=”5″>’;
      $message .= “<tr style=’background: #f9ffa4;’><td><strong>IP ADDRESS :</strong> </td><td>” . strip_tags($ipAddress) . “</td></tr>”;
      $message .= “<tr><td><strong>Date of Arrival :</strong> </td><td>” . $arrivalDate . “</td></tr>”;
      $message .= “<tr><td><strong>Days:</strong> </td><td>” . $Days . “</td></tr>”;
      $message .= “<tr><td><strong>Adults :</strong> </td><td>” . $adults . “</td></tr>”;
      $message .= “<tr><td><strong>Childs :</strong> </td><td>” . $childs . “</td></tr>”;
      $message .= “<tr><td><strong>Category:</strong> </td><td>” . $Category . “</td></tr>”;
      $message .= “<tr><td><strong>Name :</strong> </td><td>” . strip_tags($name) . “</td></tr>”;
      $message .= “<tr><td><strong>Mobile No :</strong> </td><td>” . $phone . “</td></tr>”;
      $message .= “<tr><td><strong>Email ID :</strong> </td><td>” .$customerEmail . “</td></tr>”;
      $message .= “<tr><td><strong>Message :</strong> </td><td>” . $tourmessage . “</td></tr>”;
      $message .= “<tr><td><strong>Choose Package :</strong> </td><td>” . $PackageName . “</td></tr>”;
 $message .= “<tr><td><strong>Page Reference :</strong> </td><td>” . $site_reference . “</td></tr>”;
      $message .= “</table>”;
      $message .= “</body></html>”;
 
 
//print_r($message);die;
 
 
 
 
  
  $headers = “From: ” . $customerEmail . “rn”;
      $headers .= “Reply-To: “. strip_tags($customerEmail) . “rn”;
      $headers .= “MIME-Version: 1.0rn”;
      $headers .= “Content-Type: text/html; charset=ISO-8859-1rn”;  
     
 
$subject = “Enquiry for Tour Package”;
  $Replsubject = ‘Thank you for sharing information’;
mail(“info@piyush.com”, $subject, $message, $headers);
//mail(“vikas@piyush.com”, $subject, $msg, $headers);
  $headers1 = “From: ” . “TravelExpert <info@piyush.com>” . “rn”;
      $headers1 .= “Reply-To: “. strip_tags(“TravelExpert <info@piyush.com>”) . “rn”;
      $headers1 .= “MIME-Version: 1.0rn”;
      $headers1 .= “Content-Type: text/html; charset=ISO-8859-1rn”;  
     
mail($customerEmail, $Replsubject, “Thank you for filling out your information!
We have received your message and appreciate you contacting Us for Customize Tour Package.
We will try to respond you as soon as possible, so our Travel Expert will get back to you within a few hours.nnHave a great day ahead!”, $headers1);




Reactions

0
0
0
0
0
0
Already reacted for this post.

Reactions

Leave a Reply

Your email address will not be published. Required fields are marked *