Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Email not send
  • hello 
    i tryed send email but i can't 
    i really need that 
    "mailgun/mailgun-php": "1.6"
     And how i make for it's works
    please help me

  • this is my controler


    public function action_form()
    {
    \Package::load('email');
    $view = View::forge('contato/form');

    if(Input::method()=='POST'){
    if(Input::post('name') and Input::post('email') and Input::post('message')){
    try {
    Email::forge()
    ->from(Input::post('email'), Input::post('name'))
    ->to('joey_ms@rocketmail.com')
    ->subject('Contato de')
    ->body(Input::post('message'))
    ->send();

    Response::redirect('enviado');

    } catch (EmailSendingFailedException $exc) {
    $view->error = 'Não foi posivel enviar o email, por favor tente novamente!';
    // echo $exc->getTraceAsString();
    }

    }
    else{
    $view->error = 'Por favor preencha os campos!';
    }
    }

    $view->subnav = array('Contato'=> 'active' );
    $this->template->title = 'Contato » Form';
    $this->template->content = $view;
    }
  • yes 
    i think this like a \Package::load('email');
  • where i put this "mailgun/mailgun-php": "1.6"
    what's line number ?
  • I think Kenjis refers to the email config file.

    You need to copy it from the email package to app/config, and then configure it for mailgun.
  • I did the settings but it did not work
    I think I must have misplaced
    app / config / config, I don't found that email should I create a configuration?
    and composer.json put in last line "mailgun/mailgun-php": "1.6"
    in the root directory
  • The default config is in fuel/packages/email/config/email.php. You can copy this to app/config and modify it, or create a new email.php file in app/config with the values you want to override.

    What do you exactly want? Just to send an email? Or use the mailgun service?
  • i need to send email i'll tray
    return this 
    Class 'Mailgun\Mailgun' not found

    PKGPATH/email/classes/email/driver/mailgun.php @ line 25


  •  Problem 1
        - guzzle/guzzle v3.8.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
        - guzzle/guzzle v3.8.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
        - mailgun/mailgun-php 1.6 requires guzzle/guzzle 3.8.* -> satisfiable by guzzle/guzzle[v3.8.0, v3.8.1].
        - Installation request for mailgun/mailgun-php 1.6 -> satisfiable by mailgun/mailgun-php[1.6].
  • HarroHarro
    Accepted Answer
    Without cURL it's not going to work.

    Maybe this will give some pointers: http://stackoverflow.com/questions/19335305/composer-install-error-requires-ext-curl-when-its-actualy-enabled
  • Thax i can send email 
    installed all the dependencies that were appearing to succeed

Howdy, Stranger!

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

In this Discussion