Skip to content

Commit

Permalink
Bounce non-user email replies (publiclab#9126)
Browse files Browse the repository at this point in the history
* added reply email

* resolve merge conflict

* trigger build

* Update app/models/comment.rb

* Update app/models/comment.rb

Co-authored-by: Jeffrey Warren <[email protected]>
  • Loading branch information
2 people authored and reginaalyssa committed Oct 16, 2021
1 parent ec720da commit 44bc55e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/models/comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,14 @@ def self.new_comment_from_email(mail)
end
end
return node_id
else
email = mail.select { |s| s.match(/.*@.*/) }
ActionMailer::Base.mail(
from: "[email protected]",
to: email,
subject: "Could not post your reply",
body: "Your reply wasn't posted since we couldn't find your account on publiclab.org. Please sign up at https://publiclab.org or try sending email from the account matching your username. Thank you!"
).deliver
end
end

Expand Down

0 comments on commit 44bc55e

Please sign in to comment.