Hey PK,

The Mail API is really meant for more admin-purpose mail sending, and if 
you have a requirement for mass email sending, heavy attachments, or 
advanced features, Sendgrid is really the way to go. To overcome the 
problem of reading files into memory, you could always create links on your 
own app which map to a given file and would send a redirect response to the 
temporary signed serving URL for the Cloud Storage object 
<https://cloud.google.com/storage/docs/access-control?hl=en>. This will 
make your mail messages much smaller and faster as well.

If you're interested in sending attachments themselves, you will have to 
load the data into memory in order to send the email, since the bytes have 
to actually be written into the body of the message, and this is no 
different as for any email service. The mail message simply has to contain 
the data of the file. Of course in theory the infrastructure could find a 
way to insert this into some kind of proto-messsage lacking the file data 
which is intercepted, filled, and then sent on its way, you'd need to make 
a feature request, which you've already done, so that's good. 

Best wishes,

Nick

On Monday, September 14, 2015 at 12:33:03 PM UTC-4, PK wrote:
>
> Unfortunately, the send mail API does not have a way to send as an 
> attachment files from cloud storage. In our applications, this forces us to 
> read the whole attachment to main memory and then use the mail API to send 
> it. For big attachments this quickly overwhelms small footprint instances.
>
> The same goes for incoming e-mail with attachments, it would be nice to go 
> directly to cloud storage.
>
> Please star this: 
> https://code.google.com/p/googleappengine/issues/detail?id=10560
>
> Does anybody have experience how this would work with sendgrid? Can I 
> stream an big attachment to a storage location and then send an e-mail 
> referring to that location and the same for incoming messages with 
> attachments?
>
> On Sep 14, 2015, at 9:13 AM, Nick (Cloud Platform Support) <
> pay...@google.com> wrote:
>
> Hi Snahasish,
>
> It's definitely possible to do what you're thinking of. You can use Cloud 
> Storage <https://cloud.google.com/storage/> or Blobstore 
> <https://cloud.google.com/appengine/docs/python/blobstore/> to upload and 
> read files to/from your App Engine instances, and you can use the Mail API 
> <https://cloud.google.com/appengine/docs/python/mail/> or Sendgrid 
> <https://sendgrid.com/> to send the mail. You should use Sendgrid if you 
> intend to use more than the quota allowed for the Mail API. 
>
> I hope you are able to find what you need by reading in the docs related 
> to those services. 
>
> Sincerely,
>
> Nick
>
> On Saturday, September 12, 2015 at 7:12:02 AM UTC-4, snahasis ghosh wrote:
>>
>>
>>
>> <http://stackoverflow.com/questions/32538058/file-upload-in-google-stroage-and-send-mail-using-app-enngine#>
>>
>> Hi,  
>>
>> I am new in Google app engine.
>>
>> I need some help and suggestion from you.
>>
>>
>> I have an project in Google app engine, 
>>
>> for example http://devSend.appspot.com/ <http://devsend.appspot.com/>
>>
>>
>> <http://devsend.appspot.com/>
>>
>> I have another application written in GWT 2.7.0 and SmartGWT5.1 and 
>> deployed in Tomcat 7 java 1.8 (64 bit).
>>
>> From this application I want to upload a file(.np3) 
>> https://devSend.appspot.com/devstore/indfs01 
>> <https://devsend.appspot.com/devstore/indfs01> location. 
>>
>> Also I want to send mail using Google app engine from http://devSend 
>> <https://devsend.appspot.com/devstore/indfs01>send.appspot.com/dev 
>> <https://devsend.appspot.com/devstore/indfs01>send.
>>
>>
>> All the path are configured.
>>
>>
>> Is it possible to achieve this ?
>>
>>
>> From where I have to start ?
>>
>>
>> Please help me.
>>
>>
>> Regards
>>
>>
>> Snahasish
>>
>>
>>
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-appengine.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/google-appengine/9a0ee09a-6259-4c1b-96f3-219517ed8904%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/google-appengine/9a0ee09a-6259-4c1b-96f3-219517ed8904%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> PK
> p...@gae123.com
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ed958c63-0522-4c03-8c31-3281bce6ef1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to