· 7 years ago · Aug 28, 2018, 06:40 AM
1my mail is being sent to Google's spam folder
2:from value
3
4# config/development.rb
5config.action_mailer.smtp_settings = {
6 :address => "smtp.gmail.com",
7 :port => 587,
8 :domain => 'gmail.com',
9 :user_name => 'youremail@gmail.com',
10 :password => SECRET[:email_password],
11 :authentication => 'plain'
12 # :enable_starttls_auto => true
13 }
14
15# app/mailers/user_mailer.rb
16class UserMailer < ActionMailer::Base
17
18 default :from => "youremail@gmail.com"
19
20 def welcome_email(user)
21 @user = user
22 mail(:to => user.profile.email,
23 :subject => "Registration Successful")
24 end
25end