resellwww
06-04-2008, 11:44 PM
Hello,
please have a look at this.. if there is any problem in this ??
its send out SPAM... how to make it SPAM free ?
$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->Host = 'ssl://smtp.gmail.com:465';
$mailer->SMTPAuth = TRUE;
$mailer->Username = 'XXXX@googlemail.com'; // Change this to your gmail adress
$mailer->Password = 'XXXX'; // Change this to your gmail password
$mailer->From = "$_POST['fromemail']"; // This HAVE TO be your gmail adress
$mailer->FromName = "$_POST['name']"; // This is the from name in the email, you can put anything you like here
$mailer->AddReplyTo("$_POST['fromemail']");
$mailer->Body = "$_POST['msg']";
//$mailer->IsHTML(true); // send as HTML
$mailer->Subject = "$_POST['subject']";
$mailer->AddAddress($invite_email); // This is where you put the email adress of the person you want to mail
if(!$mailer->Send())
{
echo "<br>Message was not sent<br/ >";
echo "Mailer Error: " . $mailer->ErrorInfo;
}
else
{
echo "Message has been sent";
}
please have a look at this.. if there is any problem in this ??
its send out SPAM... how to make it SPAM free ?
$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->Host = 'ssl://smtp.gmail.com:465';
$mailer->SMTPAuth = TRUE;
$mailer->Username = 'XXXX@googlemail.com'; // Change this to your gmail adress
$mailer->Password = 'XXXX'; // Change this to your gmail password
$mailer->From = "$_POST['fromemail']"; // This HAVE TO be your gmail adress
$mailer->FromName = "$_POST['name']"; // This is the from name in the email, you can put anything you like here
$mailer->AddReplyTo("$_POST['fromemail']");
$mailer->Body = "$_POST['msg']";
//$mailer->IsHTML(true); // send as HTML
$mailer->Subject = "$_POST['subject']";
$mailer->AddAddress($invite_email); // This is where you put the email adress of the person you want to mail
if(!$mailer->Send())
{
echo "<br>Message was not sent<br/ >";
echo "Mailer Error: " . $mailer->ErrorInfo;
}
else
{
echo "Message has been sent";
}
