Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-31-2007, 06:14 PM
Junior Member
 
Join Date: Aug 2007
Posts: 1
Talking simple mail script not working? (zendframework over SMTP)

Here is the script, which suppose to send email using smtp over googlemail, but its not working for me don't know why?

In my PHP.ini I have got include path directing zend folder which is under the library folder.

PHP Code:
PHP Code:
include_path ".;C:\Program Files\Apache2.2\htdocs\library" 
Here is the php script for sending a simple email. real names/emails are used in place of xxx.

PHP Code:
<?php
require_once("Zend/Mail.php");
require_once(
"Zend/Mail/Transport/Smtp.php");

$config = array('auth' => 'login',
                
'username' => 'xxx@googlemail.com',
                
'password' => 'xxx','ssl' =>);

$transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com'$config);
Zend_Mail::setDefaultTransport($transport); 
$mail = new Zend_Mail();

$mail->setBodyText('My Nice Test Text');
$mail->setBodyHtml('My Nice <b>Test</b> Text');
$mail->setFrom('xxx@googlemail.com''Islogged);
$mail->addTo('
xxx@yahoo.com', 'david');
$mail->addCc('
xxx@hotmail.co.uk', 'cameroon');
$mail->setSubject('
TestSubject);
$mail->Send();

?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-04-2007, 12:22 AM
Junior Member
 
Join Date: Nov 2007
Posts: 1
Default Same trouble

I just tried the example email to use the login to a smtp server, and get the following error, any ideas?

HTML Code:
<b>Fatal error</b>:  Uncaught exception 'Zend_Exception' with message 'File &quot;LOGIN.php&quot; was not found' in Zend/Loader.php:159
Stack trace:
#0 Zend/Loader.php(91): Zend_Loader::loadFile('LOGIN.php', Array, true)
#1 \\Cannon01\Development\kirks\Zend\Mail\Transport\Smtp.php(181): Zend_Loader::loadClass('Zend_Mail_Proto...')
#2 C:\Program Files\Zend\ZendStudio-5.5.0\bin\ZendFramework\library\Zend\Mail\Transport\Abstract.php(328): Zend_Mail_Transport_Smtp-&gt;_sendMail()
#3 \\Cannon01\Development\kirks\Zend\Mail.php(644): Zend_Mail_Transport_Abstract-&gt;send(Object(Zend_Mail))
#4 \\Cannon01\Development\kirks\tests\bday_club.php(66): Zend_Mail-&gt;send(Object(Zend_Mail_Transport_Smtp))
#5 C:\Program Files\Zend\ZendStudio-5.5.0\bin\php5\dummy.php(1): include('\\Cannon01\Deve...')
#6 {main}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:12 AM.