title: Rails mailer does not send email
body: <p>When I try to use rails (5.1.4) mailer, I don't receive any email like I should do. I followed the official rails guide to make it. My config/environment/development.rb :</p>
  
  <pre><code>  config.action_mailer.delivery_method = :smtp
    config.action_mailer.smtp_settings = {
      address:              'smtp.gmail.com',
      port:                 587,
      domain:               'gmail.com',
      user_name:            'username@gmail.com',
      password:             'app-password-from-google',
      authentication:       'plain',
      enable_starttls_auto: true 
    }
  </code></pre>
  
  <p>With this config I made a new mailer in mailers/appointement_mailer.rb :</p>
  
  <pre><code>class AppointementMailer &lt; ApplicationMailer
    default :from =&gt; "username@gmail.com"
  
    def appointement_information(user_email, data)
      @email = user_email
      @body = data
      mail(:to =&gt; "username@gmail.com", :subject =&gt; "xxx")
    end
  end
  </code></pre>
  
  <p>This mailer is triggered by a form controlled by a controller, it is located under controllers/contacts_controller.rb :</p>
  
  <pre><code>      def new
  
        end
  
        def create
          @appointement = appointement_params
          AppointementMailer.appointement_information(@appointement['email'], @appointement['body'])
          flash[:notice] = "Some message"
          redirect_to articles_path
        end
  
        private
        def appointement_params
          params.require('appointement').permit(:email, :body)
        end
  </code></pre>
  
  <p>The form correctly display the flash "Some Message" and no error is written in the console.</p>