Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Email package smtp error
  • Hi, I want to do a form who send an email when it's validate. here is a pert of my controller
    if ($annonce and $annonce->save())
    {
    //Session::set_flash('success', 'Ajout annonce #'.$annonce->id.'.');
    //echo 'Ajout annonce #'.$annonce->id; // Create an instance
    $email = Email::forge(); // Set the from address
    $email->from('contact@coax-webdesign.com', 'Annonce');//input::post('email') // Set the to address
    $email->to('marievacelet@gmail.com', 'Sandra'); // Set a subject
    $email->subject('Une nouvelle annonce a été ajoutée'); // And set the body.
    $email->body('Une annonce a été ajoutée, elle est en attente de validation.'); $email->send(); Response::redirect('annonces/ajout');
    }
    here is my email config in app/config/email.php <?php return array( /**
    * Default settings
    */
    'defaults' => array( /**
    * Mail useragent string
    */
    'useragent' => 'FuelPHP, PHP 5.3 Framework',
    /**
    * Mail driver (mail, smtp, sendmail)
    */
    'driver' => 'smtp', /**
    * Whether to send as html, set to null for autodetection.
    */
    'is_html' => null, /**
    * Email charset
    */
    'charset' => 'utf-8', /**
    * Ecoding (8bit, base64 or quoted-printable)
    */
    'encoding' => '8bit', /**
    * Email priority
    */
    'priority' => \Email::P_NORMAL, /**
    * Default sender details
    */
    'from' => array(
    'email' => false,
    'name' => false,
    ), /**
    * Whether to validate email addresses
    */
    'validate' => true, /**
    * Auto attach inline files
    */
    'auto_attach' => true, /**
    * Auto generate alt body from html body
    */
    'generate_alt' => true, /**
    * Wordwrap size, set to null, 0 or false to disable wordwrapping
    */
    'wordwrap' => 76, /**
    * Path to sendmail
    */
    'sendmail_path' => '/usr/sbin/sendmail', /**
    * SMTP settings
    */
    'smtp' => array(
    'host' => 'smtp.orange.fr',
    'port' => 25,
    'username' => '',
    'password' => '',
    'timeout' => 5,
    ), /**
    * Newline
    */
    'newline' => "\n", /**
    * Attachment paths
    */
    'attach_paths' => array(
    // absolute path
    '',
    // relative to docroot.
    DOCROOT,
    ),
    ), /**
    * Default setup group
    */
    'default_setup' => 'default', /**
    * Setup groups
    */
    'setups' => array(
    'default' => array(),
    ), ); when I tried to send an email I've got the following error:
    Email\SmtpCommandFailureException [ Error ]: Got an unexpected response from host on command: [.] expecting: 250 received: does someone know what cause this error? thank you

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!