sendgrid / sendgrid-php

The Official Twilio SendGrid PHP API Library
https://sendgrid.com
MIT License
1.49k stars 624 forks source link

Save inbound email attachments to S3 #469

Closed thinkingserious closed 3 years ago

thinkingserious commented 6 years ago

When emails come to inbound parse, sometimes they have attachments It would be nice to be able to send the files to an S3 bucket when they are received

shrink commented 6 years ago

@thinkingserious Regarding this issue (and #470, #471) I would like to implement this, however, I have noticed that this project does not have any third-party dependencies. Does this project intentionally have no third party dependencies and therefore a solution for this would require all first-party code, or is it okay to introduce dependencies?

phpleague/flysystem is an excellent, well-tested package that provides all of the functionality you're looking for -- easy to configure remote filesystem storage, with many remote providers. This package would be my chosen approach to implement the remote file storage functionality.

Edit to add: looking through this library, I don't see any functionality for managing inbound webhook requests. Have I misunderstood this issue, or is the intention to also add that functionality? As far as I can tell this library is for making requests to the Sendgrid API (which includes the ability to configure new webhooks).

thinkingserious commented 6 years ago

You are correct @citricsquid, this issue is dependent on this one: https://github.com/sendgrid/sendgrid-php/issues/297

itsfreddyrb commented 6 years ago

Yeah, I've taken the Dropbox save issue and had the same thought as @citricsquid about phpleague/flysystem. It takes many providers and can be an excellent solution. It covers S3, Dropbox and many others (even DO Spaces) leaving Box outside tho. Don't know what you guys think about it.

SendGridDX commented 6 years ago

Hi @geekfred, @citricsquid,

I think that instead of adding this functionality directly into the project, we describe the solution in the USE_CASES.md section. We can put the example code in a tutorials/s3 subfolder. And yes, the phpleague/flysystem solutions, seems just what we need.

Thoughts?

With Best Regards,

Elmer

thinkingserious commented 3 years ago

Since there has been no activity on this issue since March 1, 2020, we are closing this issue. Please feel free to reopen or create a new issue if you still require assistance. Thank you!