Hi guys,
I finally got the following script working & authenticating with a big help from this forum.
Now, I want to take it to the next step & implement the following script so I can email the results of an online form with numberous variables.
How would I do this?
This is the script I want to implement to get through the authentication: -
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->SetLanguage('en', '/phpmailer/language/phpmailer.lang-en.php');
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "host.name.com"; // specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "email@address.com"; // SMTP username
$mail->Password = "password"; // SMTP password
$mail->From = "emailaddress@btinternet.com";
$mail->FromName = "Lee";
$mail->AddAddress("recipientaddress.com");
$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = "Here is the subject";
$mail->Body = "This is the HTML message body <b>in bold!</b>";
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
?>
If you need to see a copy of my form let me know.
Your help is appreciated.
Thanks.