Current File : /home/inlingua/www/icentex/pg/mail.php
<?php
require("../class.phpmailer.php");

// Include common functions
//require('../globalVars.php');
$tomail_array=array();

$to=$_REQUEST['email'];
//print_r($to);
array_push($tomail_array,$to);
$message="Hi ".$_REQUEST[Name].",<br>Please Pay online with below details :<br>";


$message.="Link : http://inlinguanewdelhi.in/icentex/inlingua_payment/<br>Login: ".$ref."<br>Password: ".$password."";

$message.="";




$fromEmail= "icentex@inlinguanewdelhi.in";
$fromName="inlingua Online Payment";

//$to=$numuser[email];


$subject="inlingua Online Payment";

$domain = "inlinguanewdelhi.in";

		    $smtpHost = "mail.$domain";

		    $smtpUser = "admin@$domain";

		    $smtpPassword = "5B&vp7pgm7flABvi";




            //$domain = "inlinguanewdelhi.com";

		    //$smtpHost = "mail.$domain";

		    //$smtpUser = "shrikant@$domain";

		    //$smtpPassword = "Noida007";

       //$mail->IsSMTP();              // set mailer to use SMTP
	   $mail_type="S";
       $mail = new PHPMailer();
       
       if($mail_type=="S")
        {
	    
	$mail->IsSMTP();              // set mailer to use SMTP
        
        }
	
        if($mail_type=="N")
        {
	$mail->IsMail();
        }
        
        if($mail_type=="S")
        {
	$mail->Host = $smtpHost;  // specify main and backup server
	$mail->SMTPAuth = true;     // turn on SMTP authentication
	$mail->Username = $smtpUser;  // SMTP username
	$mail->Password = $smtpPassword; // SMTP password
        }

$mail->From = $fromEmail;
$mail->FromName = $fromName;
foreach ($tomail_array as $toAddress) 
{
	 //echo $toAddress;
	$mail->AddAddress($toAddress, "");
}


$mail->IsHTML(true);               // set email format to HTML
 

$mail->Subject = $subject;
$mail->Body    = $message;
//$mail->AddReplyTo("umraovikas@gmail.com","");
//$mail->AddAttachment($path);
	
if(!$mail->Send())
{
    echo "Message could not be sent on mailid: <font color='red'>'".$to."'</font><br>";
	echo "Please check the emailId.<br>";
    echo "Mailer Error: " . $mail->ErrorInfo;
    exit;
}



?>