Reputation: 706
Why would Contact form email not be coming into my inbox? I am using Mail form gem Here is what is showing up in my server after a contact form is successful submitted by No email is appearing in my inbox:
Started GET "/assets/static_pages-fcec5b5a277ac7c20cc9f45a209a3bcd.js? body=1" for ::1 at 2015-04-05 21:45:16 -0500
Started POST "/contacts" for ::1 at 2015-04-05 21:45:42 -0500
Processing by ContactsController#create as */*
Parameters: {"utf8"=>"✓","authenticity_token"=>"xXXdK5vV8XncTG9ohjC6B0/V5N/s+wWDpxJlBq6h62KaHMtmRpkj1lUATQc6U+evtPFJ0eOv64lfhIyt9LRSsQ==", "contact"=>{"name"=>"Luke", "email"=>"[email protected]", "message"=>"wjfejwfjeowf4i43fj4jfsdjkofjdsjfdojsdfkodsjicdowirbfrerjhgjs"}, "commit"=>"Send Message"}
DEPRECATION WARNING: `#deliver` is deprecated and will be removed in Rails 5. Use `#deliver_now` to deliver immediately or `#deliver_later` to deliver through Active Job. (called from create at /Users/corneliusmurphy/spartan_strength_and_power/app/controllers/contacts_controller.rb:9)
Rendered /usr/local/lib/ruby/gems/2.2.0/gems/mail_form-1.5.0/lib/mail_form/views/mail_form/contact.erb (0.7ms)
MailForm::Notifier#contact: processed outbound mail in 98.0ms
Sent mail to [email protected] (4.7ms)
Date: Sun, 05 Apr 2015 21:45:42 -0500
From: Luke <[email protected]>
To: [email protected]
Message-ID: <[email protected]>
Subject: My Contact Form
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<h4 style="text-decoration:underline">My Contact Form</h4>
<p><b>Name:</b>
Luke</p>
<p><b>Email:</b>
[email protected]</p>
<p><b>Message:</b>
wjfejwfjeowf4i43fj4jfsdjkofjdsjfdojsdfkodsjicdowirbfrerjhgjs</p>
Rendered contacts/create.html.erb within layouts/application (0.1ms)
Rendered layouts/_header.html.erb (0.8ms)
Rendered layouts/_messages.html.erb (0.5ms)
Rendered layouts/_footer.html.erb (0.4ms)
Completed 200 OK in 352ms (Views: 246.9ms | ActiveRecord: 0.0ms)
Here is my development.rb
Rails.application.configure do
config.cache_classes = false
config.eager_load = false
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.active_support.deprecation = :log
config.active_record.migration_error = :page_load
config.assets.debug = true
config.assets.digest = true
config.assets.raise_runtime_errors = true
config.assets.compile = true
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors= true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'spartanstrengthandpower.com',
user_name: 'MyGmail.com',
password: 'MyPassword',
authentication: 'plain',
enable_starttls_auto: true }
end
Upvotes: 0
Views: 379
Reputation: 10349
You need to set config.action_mailer.perform_deliveries = true
in your configuration file.
Determines whether deliveries are actually carried out when the deliver method is invoked on the Mail message.
Upvotes: 1