and the code i used i s
Code: Select all
<?php
require('/var/www/site0/lib/Swift/lib/Swift.php');
require('/var/www/site0/lib/Swift/lib/Swift/Connection/SMTP.php');
require('/var/www/site0/lib/Swift/lib/Swift/Authenticator/LOGIN.php');
$smtp =&new Swift_Connection_SMTP("smtp.gmail.com",465, SWIFT_SMTP_PORT_SECURE,SWIFT_SMTP_ENC_TLS);
$smtp->attachAuthenticator(new Swift_Authenticator_LOGIN());
$smtp->setUsername("myusername@gmail.com");
$smtp->setpassword("mypass");
$mail = &new Swift($smtp);
if (!$mail->send(
'"Azeem" <azimyasin@gmail.com>',
'Some subject',
'The body')) echo 'Not sent!';
?>The error i get is
root# php sendcheck.php
PHP Fatal error: <br /><strong>Uncaught Error</strong> of type [swift_connectionexception] with message [There was a problem reading line 1 of an SMTP response. The response so far was:
[]. It appears the connection has died without saying goodbye to us! Too many emails in one go perhaps? (fsockopen: #0) ]
@0 swift::swift() in /var/www/site0/src/noticeboard/sendcheck.php on line 14
@1 swift::connect() in /var/www/site0/lib/Swift/lib/Swift.php on line 109
@2 swift::command() in /var/www/site0/lib/Swift/lib/Swift.php on line 227
in /var/www/site0/lib/Swift/lib/Swift/Errors.php on line 99
I would be very thank ful if any one could help me sort it out
p.s. the username and pass i use are correct