Home Sending Email in Rails App
Reply: 0

Sending Email in Rails App

user1351 Published in June 20, 2018, 10:48 pm

I've been trying to create a RoR app that sends an outgoing email, where you can specify the message, subject, etc. I have not installed any type of email server and have no idea how to configure the smtp settings. I want the finished product to look something like this:


I am working in a pretty new version of Mac OS X and have been following this tutorial that uses the Action Mailer Class: http://www.tutorialspoint.com/ruby-on-rails/rails-send-email.htm

Unfortunately this tutorial doesn't comply with rails 4.0 so it's a bit dodgy. Anyway, when I set the smtp settings in environment.rb it looks like this:

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  address:              'smtp.gmail.com',
  port:                 587,
  domain:               'anythingworks',
  user_name:            'mygmail@gmail.com',
  password:             'mygmailpassword',
  authentication:       'plain',
  enable_starttls_auto: true  }

I actually have no idea what to put for the address, domain, and user_name and passwords. Is there anyway I can send the email from localhost and if so, how would I configure my smtp settings?

Any help would be really appreciated! Thank you in advance

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.309015 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO