Hi, did you mail script include mail authorization due to all our server need smtp authorization to send out mail. Could you please have a check? If you problem persists, could you please post your script which handle the mail function?
$mail->IsSMTP(); $mail->Host = 'smtp.domain.com'; $mail->SMTPAuth = true; $mail->Username = 'username'; $mail->Password = 'password';
Interesting...
Would it not be a good idea to include a new version of the eForm php file to the MODx archive to accommodate this trend?
$mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = 'mail.sitename.com'; $mail->SMTPAuth = true; $mail->Username = 'username'; $mail->Password = 'custompassword'; $mail->IsHTML($isHtml); $mail->From = $modx->config['emailsender']; $mail->FromName = $modx->config['site_name']; $mail->Subject = $_lang['ef_mail_abuse_subject']; $mail->Body = $body; AddAddressToMailer($mail,"to",$modx->config['emailsender']); $mail->send(); //ignore mail errors in this case
Here’s a sample for using SMTP. Our server setting REQUIRES all customers to use SMTP authorization in order to send out email. You can acquire a copy of phpmailer class from http://sourceforge.net/project/showfiles.php?group_id=26031. You should upload the file "class.phpmailer.php" to same folder for your script.
IMPORTANT: From email address and your authorization email address MUST be same.
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->CharSet ="utf-8"; // You can adjust the Charset according to your language
$mail->IsSMTP();
$mail->Host = "mail.Yourdomain.com";
$mail->From="[email protected]"; //REMEMBER, this MUST be same as your authorization email address above.
$mail->FromName="My site’s mailer";
$mail->SMTPAuth = true;
$mail->Username = "[email protected]";
$mail->Password = "yourpassword";
$mail->AddAddress("sendTOemail");
$mail->Subject = "Test 1";
$mail->Body = "Test 1 of PHPMailer.";
if(!$mail->Send())
{
echo "Error sending: " . $mail->ErrorInfo;;
}
else
{
echo "Letter is sent";
}?>
$mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = 'mail.siteaddress.com'; $mail->SMTPAuth = true; $mail->Username = 'username'; $mail->Password = 'actualpassword'; $mail->IsHTML($isHtml); $mail->From = $modx->config['emailsender']; $mail->FromName = $modx->config['site_name']; $mail->Subject = $_lang['ef_mail_abuse_subject']; $mail->Body = $body; AddAddressToMailer($mail,"to",$modx->config['emailsender']); $mail->send(); //ignore mail errors in this case