Created
May 23, 2014 09:08
-
-
Save bogdan/a38730c215dbe0f1fc7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def feedback(feedback, user) | |
@feedback = feedback | |
@user = user | |
@is_spam = @feedback.is_spam? | |
bcc = "alexey+feedback@curebit.com" if @is_spam | |
mail( | |
subject: (@is_spam ? "[POSSIBLE SPAM]" : "") + "Curebit Feedback from #{@feedback.email}", | |
from: @feedback.email.presence || SUPPORT_ACCOUNT, | |
to: curebit_sales_address('feedback'), | |
bcc: bcc, | |
reply_to: @feedback.email | |
) | |
end | |
def enterprise_feedback(feedback, user) | |
@feedback = feedback | |
@user = user | |
@is_spam = @feedback.is_spam? | |
subject = (@is_spam ? "[POSSIBLE SPAM]" : "") + "Enterprise account inquiry by #{@feedback.email} #{@feedback.name}" | |
to = [ENTERPRISE_FEEDBACK_EMAIL, notification_address('enterprise_feedback')] | |
bcc = "alexey+feedback@curebit.com" if @is_spam | |
mail(subject: subject, to: to, from: "#{@feedback.email}", bcc: bcc) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment