IsSMTP(); // telling the class to use SMTP $mail->Host = "localhost"; // SMTP server //$mail->Debug = 1; // 1 = errors and messages // 2 = messages only $mail->SMTPAuth = false; // enable SMTP authentication $mail->Port = 25; // set the SMTP port for the GMAIL server $mail->SetFrom("support@intimamedia.com", "Intimamedia support"); $mail->AddReplyTo("support@intimamedia.com", "Intimamedia support"); $mail->Subject = $subject; $mail->MsgHTML($message); $address = $to; $mail->AddAddress($address, ""); if ($attachment) $mail->AddAttachment($attachment); // attachment if(!$mail->Send()) { $ff = fopen("mailError.log", "a+"); fprintf($ff, "Mailer Error: %s\n", $mail->ErrorInfo); fclose($ff); return false; } return true; } } ?>