I am facing an issue where in, i am not able to send emails if the email body has more than 70 chars! The site is hosted on godaddy.
SMTP konak: röle-hosting.secureserver.net
SMTP bağlantı noktası: 25
For message body < 70 chars i get a SMTP reply code of 250 as expected. But anything > 70 gives a reply code 451 which means "Requested action aborted: local error in processing" and am not able to figure out why! =(
Ben (farklı bir SMTP kimlik bilgileri ile) ben daha önce godaddy postalar göndermek mümkün olmuştur this SMTP class hangi ile kullanıyorum
/**
* Wrapper function for SMTP class
*/
function sendEmail($to, $from, $subject, $message ,$ishtml = null, $headers = null)
{
global $_CONFIG;
$smtp = new SMTP($_CONFIG['email_host'], $_CONFIG['email_port'], false, 5);
if($ishtml)
{
$smtp->set_html();
}
$extraHeader = null;
if(is_array($headers))
{
$extraHeader = array(
'CC' => $headers['CC'],
'BCC'=> $headers['BCC']
);
}
else
{
$headers = null;
}
# Who is this email from? (MAIL FROM header)
$smtp->mail_from($from);
# Sending the email
$isSent = $smtp->send($to, $subject, $message, $ishtml, $extraHeader);
//var_dump($smtp->error());exit;
return $isSent;
}
Fonksiyon çağrı:
$subject = "Thanks you for registering";
$from = 'myfromid.@mydomain.com';
$to = $regFormData['email'];
$message = "Thanks you for registering.You have registered with the following details";
$sendStatus = sendEmail($to, $from, $subject, $message ,false, $headers);
//$sendStatus returns false and SMTP relay code is 451
SMTP röle tüm godaddy Hostings için DAİREMİZ. Onlar kısıtlama çeşit var olabilir mi?
Herhangi bir giriş takdir edilmektedir! Teşekkürler.
--Just received a reply from godaddy support. "We do not place any restriction on your email message character length, and it is possible that the problem is due to something in the code."