Method: Easyemail#smtp_settings
- Defined in:
- lib/easyemail.rb
#smtp_settings(smtp) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/easyemail.rb', line 36 def smtp_settings smtp # common settings for smtp, all provided by user. begin ActionMailer::Base.smtp_settings = { address: smtp['address'], port: smtp["port"], authentication: smtp["authentication"], user_name: smtp['user_name'], password: smtp['password'], enable_starttls_auto: smtp["enable_starttls_auto"] } @from = smtp["user_name"] @config = true rescue raise "wrong parameters for smtp settings." end end |