1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use create_and_extract_message_id! to create an inbound email.

This makes sure the created email has checksum and message id columns set.
This commit is contained in:
Pratik Naik 2019-01-17 14:19:37 -06:00
parent a823b7d56f
commit 57cb8d7924

View file

@ -28,8 +28,7 @@ module Rails
end
def create_inbound_email(mail)
ActionMailbox::InboundEmail.create! raw_email: \
{ io: StringIO.new(mail.to_s), filename: "inbound.eml", content_type: "message/rfc822" }
ActionMailbox::InboundEmail.create_and_extract_message_id!(mail.to_s)
end
end
end