2011-11-23, 12:24:28
Hi;
I know someone like http://phpmailer.worxware.com/ integrate into existing contact form and send via SMTP SERVER (Gmail) email.
how do I change contact_form.php???
can someone help
many thanks
I know someone like http://phpmailer.worxware.com/ integrate into existing contact form and send via SMTP SERVER (Gmail) email.
Code:
require('class.phpmailer.php');
$message = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
$message->IsSMTP(); // telling the class to use SMTP
$message->SMTPAuth = true; // enable SMTP authentication
$message->SMTPSecure = "ssl"; // sets the prefix to the servier
$message->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
$message->Port = 465; // set the SMTP port for the GMAIL server
$message->Username = "ihre_mail@gmail.com"; // GMAIL username
$message->Password = "ihre_password"; // GMAIL password
$message->AddAddress("mail@mail.com", 'Admin'); //Recipient's address set
$message->Subject = ("$subject");
$message->AltBody = 'To view the message, please use an HTML compatible email viewer!';
$message->MsgHTML("$body");
$sent_mail=$message->Send();
how do I change contact_form.php???
can someone help
many thanks