Unable to send emails from godaddy SMTP server if email body has > 70 chars

LarissaB1965

New Member
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 host : relay-hosting.secureserver.netSMTP port : 25For 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! =(I am using this SMTP class with which i have been able to send mails from godaddy earlier (with a different SMTP credentials)\[code\]/** * 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;}\[/code\]Function call:\[code\]$subject = "Thanks you for registering";$from = '[email protected]';$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\[/code\]The SMTP relay is avaliable for all godaddy hostings. Could it be that they have some kind of restriction?Any inputs are appreciated! Thanks.--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."
 
Back
Top