We have a Ruby application hosted on an AWS Instance. We are sending emails from our application using the following setting in our code to send emails from our front end,
ActionMailer::Base.smtp_settings = { :enable_starttls_auto => true, #this is the important shit!
:address => 'smtp.gmail.com',
:port => 587,
:domain => 'www.gmail.com',
:authentication => :plain,
:user_name => 'support@exampleabc.com',
:password => '***************' }
With this, few of our emails are reaching the "spam" at the receiver end. Please suggest us if we can avoid this by setting a "SPF" record in our DNS file.
Thanks!