defhello(name) @name = name mail to:'send_to@example.com', subject:'Hello' end end
🎂 Configuration
Following configuration is for development:
# config/environments/development.rb AppName::Application.configure do config.action_mailer.raise_delivery_errors = true config.action_mailer.default_url_options = { host:"localhost", port:3000 } config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { address:"SMTP MAIL SERVER", port:587, domain:'DOMAIN', user_name:"USER NAME FOR AUTHORIZATION TO MAIL SERVER", password:"USER PASSWORD FOR AUTHORIZATION TO MAIL SERVER" } end
In addition, a test configuration is as follows:
# config/environments/test.rb AppName::Application.configure do config.action_mailer.delivery_method = :test end
VULTR provides high performance cloud compute environment for you.
Vultr has 15 data-centers strategically placed around the globe, you can use a VPS with 512 MB memory for just $ 2.5 / month ($ 0.004 / hour).
In addition, Vultr is up to 4 times faster than the competition, so please check it => Check Benchmark Results!!