//Created by Sheik //Date :25-08-2013 //change settings here $your_email = "info@eazypres.com"; $your_smtp = "mail.eazypres.com"; $your_smtp_user = "info@eazypres.com"; $your_smtp_pass = "eazy123"; $your_website = "http://www.eazypres.com/"; require("phpmailer/class.phpmailer.php"); if(isset($_REQUEST['btsubmit'])) { $msg="Sending Mail..."; $name=$_REQUEST['txtname']; $address=$_REQUEST['address']; $organization=$_REQUEST['txtorganization']; $email=$_REQUEST['txtemail']; $city=$_REQUEST['city']; $country=$_REQUEST['country']; $telephone=$_REQUEST['telephone']; $fax=$_REQUEST['fax']; $enquiry=$_REQUEST['txtenquiry']; ?> $message='
Name | '.$name.' |
Organization | '.$organization.' |
Postal Address | '.$address.' |
City | '.$city.' |
Country | '.$country.' |
Telephone | '.$telephone.' |
Fax | '.$fax.' |
'.$email.' | |
Comment | '.$enquiry.' |
Dear valued Customer, Your registration has been successfully submitted and we thank you for your interest in EazyPres. Login Id: demo123
Thanks & Regards, |
There was an error in sending mail, please try again at a later time
"; echo "".$mail->ErrorInfo."
"; } else { $msg= "Thanks for Register, We will contact you at the earliest!
"; $mail2 = new PHPmailer(); $mail2->SetLanguage("en", "phpmailer/language"); $mail2->From = $your_email; $mail2->FromName = "EazyPres Admin"; $mail2->Host = $your_smtp; $mail2->Mailer = "smtp"; $mail2->Password = $your_smtp_pass; $mail2->Username = $your_smtp_user; $mail2->Subject = "Thanks for Register "; $mail2->SMTPAuth = "true"; $mail2->IsHTML(true); $mail2->Body = $message2; $mail2->AddAddress($email,"$name "); $mail2->AddReplyTo($your_email,"EazyPres Admin"); if (!$mail2->Send()) { $msg1="There was an error in sending mail to user
"; echo "".$mail2->ErrorInfo."
"; } else { $msg1= "Message sent!
"; } $mail2->ClearAddresses(); $mail2->ClearAttachments(); } $mail->ClearAddresses(); $mail->ClearAttachments(); } ?>