Reputation: 2333
I am using Zend and encounter this error [500 Internal Server Error] when submitting a page that uploading files. The error log file says as below.Does the email has to do with the Internal Server Error?
[23-Sep-2012 18:15:12] PHP Fatal error: Uncaught exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail. mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()' in C:\Tools\Zend\ZendServer\share\ZendFramework\library\Zend\Mail\Transport\Sendmail.php:137
Stack trace:
#0 C:\Tools\Zend\ZendServer\share\ZendFramework\library\Zend\Mail\Transport\Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 C:\Tools\Zend\ZendServer\share\ZendFramework\library\Zend\Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 C:\Projects\dcs_new\config_local.php(86): Zend_Mail->send()
#3 C:\Projects\dcs_new\functions.php(277): smail('level2@hartaleg...', 'DCS: Document c...', 'Title: Testing ...', 'From: TAN CHEN ...')
#4 C:\Projects\dcs_new\functions.php(284): email_users_obj('alert@hartalega...', Array, 'DCS: Document c...', 'Title: Testing ...', 'From: TAN CHEN ...')
in C:\Tools\Zend\ZendServer\share\ZendFramework\library\Zend\Mail\Transport\Sendmail.php on line 137
Upvotes: 2
Views: 1988
Reputation: 14184
Looks like your page/script attempts to send mail and tries to connect to an SMTP server running on localhost:25
.
So, essentially, it's a configuration issue.
To get over the hump for local dev, you can set default transport to be Zend_Mail_Transport_File
for the development
environment.
In application/configs/application.ini
:
[development : production]
resources.mail.transport.type = file
resources.mail.transport.path = APPLICATION_PATH "/../data/mail"
Remember to create that data/mail
directory and give the webserver permissions to write there.
Upvotes: 1