mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
fix the build
This commit is contained in:
parent
4bb31daa2e
commit
51b2279af0
4 changed files with 35 additions and 24 deletions
|
@ -484,14 +484,6 @@ This is a link http://example.com"
|
|||
|
||||
end
|
||||
|
||||
def fill_email(mail, from, to, body = nil, subject = nil, cc = nil)
|
||||
result = mail.gsub("FROM", from).gsub("TO", to)
|
||||
result.gsub!(/Hey.*/m, body) if body
|
||||
result.sub!(/We .*/, subject) if subject
|
||||
result.sub!("CC", cc.presence || "")
|
||||
result
|
||||
end
|
||||
|
||||
def process_email(opts)
|
||||
incoming_email = fixture_file("emails/valid_incoming.eml")
|
||||
email = fill_email(incoming_email, opts[:from], opts[:to], opts[:body], opts[:subject], opts[:cc])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue