I am creating a simple non-profit application with Ruby on Rails. I have to set up the following settings in order to be able to send emails with Gmail:
Depot::Application.configure do
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address:"smtp.gmail.com",
port:587,
domain:"domain.of.sender.net",
authentication: "plain",
user_name:"dave",
password:"secret",
enable_starttls_auto: true
}
end
I am completely new with this stuff and have no idea what exactly I should do.
- How to populate the settings above if I have gmail account? Do I need to buy a domain and can be it bought from google in order to use the settings above?
- Is it better to set up mail server on my PC? I looked though this tutorial but as far as I understand I still need to buy a domain.
Also, as it is said here:
Setting up an email server is a difficult process involving a number of different programs, each of which needs to be properly configured.
because of this and my poor skills I am looking for the simplest solution.
I have read the rails action mailer tutorial and have an idea about what these parameters are used for, but the things around the Gmail and the mail server are not clear at all.