07 Sep 2010 
Support Center » Knowledgebase » Sending Email via Form on HELM Windows Server
 Sending Email via Form on HELM Windows Server
Solution We require SMTP authorization to send email via form on HELM windows server.

To send email from php you may use phpMailer. You may download it from http://www.bizzhost.com/support/files/php_mailer.zip

You should extract archive and put all files from directory Upload in the same directory as your script.

Next you should use following code to send email instead of mail() function.


require("class.phpmailer.php");
$mail = new PHPMailer();

$mail->IsSMTP();
$mail->Host = "MAIL.DOMAIN.COM";
$mail->SMTPAuth = true;
$mail->Username = "POP3ACCOUNT.NAME";
$mail->Password = "POP3.PASSWORD";

$mail->From = "POP3ACCOUNT.NAME";
//$mail->FromName = "Mailer";//optional from name
$mail->AddAddress("RECIPIENT", "RECIPIENT'S NAME");
//$mail->AddReplyTo("sender@example.com", "Information");
$mail->IsHTML(false); // set email format to HTML

$mail->Subject = "SUBJECT";
$mail->Body = "BODY";
if(!$mail->Send()) {
echo "Message could not be sent.
";
echo "Mailer Error: " . $mail->ErrorInfo;
}


Article Details
Article ID: 32
Created On: 23 Apr 2008 01:53 AM

 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | Troubleshooter | News | Downloads
Language:

Help Desk Software By Kayako eSupport v3.04.10