Sendgrid-nodejs: Sending attachments via url.

Created on 25 Aug 2016  路  7Comments  路  Source: sendgrid/sendgrid-nodejs

In [email protected] and below you were able to send attachments by providing sendgrid with a url, the structure of an attachment looked like so:

{
    filename: 'something.js',
    contentType: 'application/javascript',
    url: 'https://test.com/some/url'
}

Is this possible to do now? It seems rather expensive for me to download the file to my mail server, load the entire thing in ram and put it into a base64 string just to send it out to sendgrid.

non-library issue

Most helpful comment

Hello @DylanPiercey,

Ah, that's a great feature, I'm going to leave this ticket open so we can add this to the new Mail Helper.

For this ticket to climb priority in our queue, we need +1s and/or comments. A pull request with a signed CLA also jumps things up quickly in our queue.

Reference: https://github.com/sendgrid/sendgrid-nodejs/blob/967fb3105908617b41b761d3f18bbc623eb4579a/lib/file_handler.js

On a side note, how about just including a link to the attachment (assuming these are large files)? I ask because I'm heading to BoxDev in a few weeks and that is one of the use cases I will be demonstrating.

All 7 comments

Hello @DylanPiercey,

Ah, that's a great feature, I'm going to leave this ticket open so we can add this to the new Mail Helper.

For this ticket to climb priority in our queue, we need +1s and/or comments. A pull request with a signed CLA also jumps things up quickly in our queue.

Reference: https://github.com/sendgrid/sendgrid-nodejs/blob/967fb3105908617b41b761d3f18bbc623eb4579a/lib/file_handler.js

On a side note, how about just including a link to the attachment (assuming these are large files)? I ask because I'm heading to BoxDev in a few weeks and that is one of the use cases I will be demonstrating.

Hello Everyone,

Here is the follow up materials from the Box demo I referenced earlier: https://sendgrid.com/blog/using-box-with-sendgrid-to-simplify-inboundoutbound-email-attachments

where is the solution guys ?

Hi @sidimomo,

We have not implemented a solution yet within the library, but I have added your +1 to help this issue gain priority in our backlog. Thanks!

With Best Regards,

Elmer

We created issues for Hacktoberfest for Box, DropBox, and S3 - this being solved for any URL within the library would be pretty awesome!

Any status on this issue? Has it already been added maybe?

I've created an internal ticket to track this request (_reference ID: EID-2818_). I will circle back here when there's an update, but closing the issue here as it's not something that can be done in client-side code (w/o download/uploading/streaming the files).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agostonbonomi picture agostonbonomi  路  3Comments

murphman300 picture murphman300  路  4Comments

umarhussain15 picture umarhussain15  路  3Comments

Loriot-n picture Loriot-n  路  4Comments

amlcodes picture amlcodes  路  4Comments