2011-03-27 22:56:15 +02:00
|
|
|
class Mailer < ActionMailer::Base
|
2014-02-17 18:05:39 +01:00
|
|
|
default :from => 'support@thingspeak.com'
|
2011-03-27 22:56:15 +02:00
|
|
|
|
|
|
|
def password_reset(user, webpage)
|
2014-02-17 18:05:39 +01:00
|
|
|
@user = user
|
|
|
|
@webpage = webpage
|
|
|
|
mail(:to => @user.email,
|
|
|
|
:subject => t(:password_reset_subject))
|
|
|
|
end
|
2011-03-27 22:56:15 +02:00
|
|
|
|
2014-05-09 02:01:41 +02:00
|
|
|
def contact_us(from_email, message)
|
|
|
|
mail(to: SUPPORT_EMAIL,
|
|
|
|
from: from_email,
|
|
|
|
reply_to: from_email,
|
|
|
|
body: message,
|
|
|
|
content_type: "text/html",
|
|
|
|
subject: "Contact Us Form")
|
|
|
|
end
|
|
|
|
|
2011-03-27 22:56:15 +02:00
|
|
|
end
|
2014-05-09 02:01:41 +02:00
|
|
|
|