private function _send_email($addr)
{
$option = array(
'useragent' => 'Sitetest',
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.mail.yahoo.fr',
'smtp_user' => 'my_username',
'smtp_pass' => 'my_password',
'smtp_port' => 465,
'smtp_timeout' => 5,
'crlf' => "\r\n",
'newline' => "\r\n",
'wordwrap' => true,
'wrapchars' => 76,
'mailtype' => 'text',
'charset' => 'utf-8',
'validate' => true,
'force_multipart' => false
);
$email = Email::factory($option);
$email->from('my_adress', 'Sitetest');
$email->to($addr);
$email->subject('Formulaire de contact');
$email->message('Votre formulaire de contact a bien été pris en compte... Merci.');
if (!$email->send())
{
throw new Exception($email->print_debugger());
}
}
Error - 2011-02-09 09:18:02 --> 2 - fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/www-dev/isaya.fr/fuel/core/classes/email/smtp.php on line 128 Error - 2011-02-09 09:18:02 --> 2 - fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://smtp.mail.yahoo.fr:465 (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution) in /home/www-dev/isaya.fr/fuel/core/classes/email/smtp.php on line 128 Error - 2011-02-09 09:18:02 --> 2 - fwrite() expects parameter 1 to be resource, boolean given in /home/www-dev/isaya.fr/fuel/core/classes/email/smtp.php on line 277 Error - 2011-02-09 09:18:02 --> 2 - fgets() expects parameter 1 to be resource, boolean given in /home/www-dev/isaya.fr/fuel/core/classes/email/smtp.php on line 300 Error - 2011-02-09 09:18:02 --> 2 - fwrite() expects parameter 1 to be resource, boolean given in /home/www-dev/isaya.fr/fuel/core/classes/email/smtp.php on line 277 Error - 2011-02-09 09:18:02 --> 2 - fgets() expects parameter 1 to be resource, boolean given in /home/www-dev/isaya.fr/fuel/core/classes/email/smtp.php on line 300 Error - 2011-02-09 09:18:02 --> 0 - in /home/www-dev/isaya.fr/fuel/app/classes/controller/contact.php on line 67
$this->_smtp_connect = fsockopen( $this->smtp_vars['host'], [b]25, //Here[/b] $errno, $errstr, $this->smtp_vars['timeout'] );it would be this: $this->smtp_vars if it can help it's work
It looks like you're new here. If you want to get involved, click one of these buttons!