Issue Type: Bug Created: 2011-09-22T09:42:16.000+0000 Last Updated: 2011-09-23T07:38:51.000+0000 Status: Resolved Fix version(s): Reporter: jayakumar (jayakumarwilliam) Assignee: Ryan Mauger (bittarman) Tags: - Zend_Mail
Related issues: Attachments:
i am new to zend framework. i am using netbeans as IDE. when trying to use zend mail with the following code inside Application/views/scripts/index/index.php, i couldn't send mail, instead sometimes i get a blank white screen after running or else get "An error occurred. Application error. can any one help me in running the following code'tls', 'port' => 465, 'auth' => 'login', 'username' => $username, 'password' => $password); $transport = new Zend\_Mail\_Transport\_Smtp($smtpServer, $config); Zend\_Mail::setDefaultTransport($transport); $mail = new Zend\_Mail(); $mail->setFrom('firstname.lastname@example.org', 'Some Sender'); $mail->addTo('email@example.com', 'Some Recipient'); $mail->setSubject('Test Subject'); $mail->setBodyText('This is the text of the mail.'); $mail->send($transport); ?> Zend Mail has been sent successfully.
Posted by Ryan Mauger (bittarman) on 2011-09-22T12:55:14.000+0000
I'm closing this as not an issue as it appears to be a support request rather than an issue with any Zend Framework functionality.
Your view file appears to have the wrong suffix (usually it would be .phtml) check this, and ensure your error_reporting is set to a level which will give you useful output in either your error logs, or browser.
Please also check that you are following the suggested application structure. If you are new to Zend Framework, you may wish to check out Akrabats tutorial http://akrabat.com/zft
Posted by jayakumar (jayakumarwilliam) on 2011-09-23T07:38:51.000+0000
Ryan, Thanks very much for your reply. sorry, i just made a mistake in typing. it is not index.php. In fact i used above code in the right extension 'index.phtml'(Application/Views/Scripts/index/index.phtml) only. As i am the beginner of zend php, i think i have to go through error_reporting. in the mean time you can fix my problem i welcome. Thanks again.
Have you found an issue?
See the Overview section for more details.