thoughtbot / griddler

Simplify receiving email in Rails (deprecated)
http://griddler.io/
MIT License
1.38k stars 199 forks source link

Receiving emails from Amazon s3 #307

Closed Startouf closed 4 months ago

Startouf commented 5 years ago

I am trying to integrate griddler with amazon SES through s3. Using s3 allows for bigger message size / supporting message attachments

The basic flow is the following

Return-Path: <cyril@example.com>\r\n
Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42])\r\n 
by inbound-smtp.eu-west-1.amazonaws.com with SMTP id 
[...]
Content-Type: multipart/alternative;\r\n 
boundary=\"------------BE6CAE00EDF4F8577083EAD7\"\r\n
Content-Language: en-US\r\n\r\n
This is a multi-part message in MIME format.\r\n--------------BE6CAE00EDF4F8577083EAD7\r\nContent-Type: text/plain; charset=utf-8; format=flowed\r\nContent-Transfer-Encoding: 8bit\r\n\r\n
[My Message]
[...]

So basically, I don't need to mount any engine, since I am processing emails asynchronously via queues. How would I go about plugging this into griddler ? Actually is there any point in using Griddler at all ? (I thought I could still take advantage of the "reply above this line" and other hash builtin, is it still the case ?)

EDIT : basically I am easily parsing a Mail with ::Mail.new(s3_object), what do I do next to leverage other griddler functionalities ?