class Webmail::Webmail
Your code goes hereā¦
Public Class Methods
contactProduct(userEmail,emailSubject,emailBody)
click to toggle source
# File lib/webmail.rb, line 7 def self.contactProduct(userEmail,emailSubject,emailBody) @emailSubject = emailSubject @emailBody = emailBody options = { :address => "smtp.gmail.com", :port => 587, :domain => 'your.host.name', :user_name => 'andersonmr266@gmail.com', :password => 'MatrixNeo', :authentication => 'plain', :enable_starttls_auto => true } Mail.defaults do delivery_method :smtp, options end Mail.deliver do from 'andersonmr266@gmail.com' to userEmail subject emailSubject body emailBody end end