Current File : /home/inlingua/public_html/noida/icentex/admin_fd/mail.php
<?php
require("../class.phpmailer.php");

// Include common functions
//require('../globalVars.php');

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


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

$message.="";




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

//$to=$numuser[email];


$subject="inlingua Online Payment";






            //$domain = "inlinguanewdelhi.com";

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

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

		    //$smtpPassword = "Noida007";

       //$mail->IsSMTP();              // set mailer to use SMTP
       $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 ($to as $toAddress) 
{
	 $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;
}



?>