Jump to content

Zend_Mail Errors Godaddy SMTP


phpJoeMo

Recommended Posts

Sometimes I wonder why I stay with Godaddy ?????!!!

 

Anyway, here is the script that I currently have:

require 'Zend/Mail.php';
require 'Zend/Mail/Transport/Smtp.php';

$config = array('plain' => 'login',
			'name' => 'name',
                'username' => 'myuser',
                'password' => 'mypass',
			'port' => 80);

$transport = new Zend_Mail_Transport_Smtp('smtpout.secureserver.net', $config);
Zend_Mail::setDefaultTransport($transport);

$mail = new Zend_Mail();
$mail->setBodyText('This is the text of the mail.');
$mail->setFrom('myemail', 'myname');
$mail->addTo('to@example.com', 'name');
$mail->setSubject('TestSubject');
$mail->send($transport);

 

now obviously I'm replacing values like 'myname' etc with the correct ones.  Here's my question, why am I getting the following error msg:

Fatal error: Uncaught exception 'Zend_Mail_Protocol_Exception' with message 'Could not read from smtpout.secureserver.net' in /my/path/Zend/Mail/Protocol/Abstract.php:385 Stack trace: #0 /my/path/Zend/Mail/Protocol/Abstract.php(415): Zend_Mail_Protocol_Abstract->_receive(300) #1 /my/path/Zend/Mail/Protocol/Smtp.php(199): Zend_Mail_Protocol_Abstract->_expect(220, 300) #2 /my/path/Zend/Mail/Transport/Smtp.php(200): Zend_Mail_Protocol_Smtp->helo('biztoolplace') #3 /my/path/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail() #4 /my/path/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail)) #5 /my/path/mail.php(19): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp)) #6 {main} thrown in /my/path/Zend/Mail/Protocol/Abstract.php on line 385

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.