Skip to content

Instantly share code, notes, and snippets.

@bogdan
Created May 23, 2014 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogdan/a38730c215dbe0f1fc7d to your computer and use it in GitHub Desktop.
Save bogdan/a38730c215dbe0f1fc7d to your computer and use it in GitHub Desktop.
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