GAE Mail Send Quota = 100/day? - google-app-engine

I have my own domain with G-Suite Business and application in GAE that sending emails to our clients. But limit 100 sendings per day is too low.
How to increase mail send quota above 100/day? That's possible?
Thanks for any ideas.

The build in GAE mail is not really intended for production use, on top of the 100 mail limit there is also a limit on how many unique email addresses can be sent to in 1 day if im not mistaken.
For production I would recommend SendGrid, documentation can be found here : https://cloud.google.com/appengine/docs/standard/python/mail/sendgrid
Good service with a lot of needed mail features, like custom domain etc.

Google Cloud Platform support no longer provides quota increases for the Mail API.
Besides that, Richard's reply is correct so you can use Sendgrid or other available mail providers mentioned in the documentation. Additionally, as you mentioned GSuite, you may consider using Sockets API with your GSuite accounts (subject to GSuite quota).

Related

Do outgoing emails using JavaMail through Gmail/Sendgrid SMTP count towards Mail API limits in Google App Engine?

I'm running an app on the Google App Engine standard environment. We need to send out a lot of emails and it looks like App Engine now lets us use JavaMail to send emails using SMTP - connecting to smtp.gmail.com or smtp.sendgrid.net.
I was wondering if this counts towards the Mail API limits/quotas in App Engine. I'm guessing it shouldn't, since the email is actually sent by the respective SMTP server and it's only outbound traffic from App Engine. Is this correct?
Note: I'm not a Java user, the answer is based on documentation only.
Indeed, using 3rd party partner mail services is the Google recommendation for sending lots of emails. From Quotas and limits:
Each Mail service request counts toward the Mail API Calls quota.
There are also quotas for the number of messages you can send, the
number of Admin messages you can send, and the amount of data and
attachments you can send. For more details, see Mail quotas.
[...]
If you need to send more mail then the quota allows, you can use a
third-party mail provider, such as SendGrid or Mailgun.
And JavaMail can, indeed, use these 3rd party SMTP servers. From Sending email messages:
To send email messages, use the JavaMail classes included with the App
Engine SDK.
When you create a JavaMail Session, if you do not provide any SMTP
server configuration, App Engine uses the Mail service for sending
messages. Alternatively, add SMTP configuration for supported
third-party mail providers such as Mailgun, Mailjet, or
SendGrid.
This last quote appears (depending on how you interpret it, I guess) to support your assumption that when SMTP servers are specified the Mail service would not be used, thus those calls wouldn't be counted against the Mail API Calls quota.
Also each of the 3rd-party mail integration documentation page referenced in these quotes doesn't (or at least doesn't directly) use JavaMail, instead they require specific libraries/modules. Which might have some relationship with bypassing the GAE Mail Api quota limits. For example, from Sending Email with SendGrid:
Sending an email
It's easy to get started with the Java library for SendGrid to
send emails from your App Engine apps.
With the prerequisites complete, make sure you are set up for
Java on your local machine. The last thing you'll need before
writing code is to copy Sendgrid.java to the src directory of
your app. You'll import this class so that you can create a SendGrid
instance and send mail with simple commands.
So, to gain certainty, my suggestion is to actually put your assumption to the test: send some emails using JavaMail while specifying your SMTP server info, then check your actual usage in the developer console Quotas page for matching increases. Notes:
give some ample room for propagation delays - the usage counts might not be immediately updated
if you don't see the Mail section in the Usage table check also, towards the bottom of the page, a Show resources not in use button/link (but, if it's in there, it means the usage is zero).
You could also directly follow the recommended specific instructions for your 3rd party provider of choice and practically avoid the question altogether :)

GAE - mail API - dialy limits

According to https://developers.google.com/appengine/docs/quotas#Mail
a GAE app developed by a third party (anyone of us) and hosted in GA Cloud has a limit of 20.000 messages that can send each day, right ?
What if an app has registered 100.000 end-users that accepted to receive a daily email notification ?
isnt GAE a platform for this kind of apps ? do we have to find out for another provider ?
does the app must use a third-party service like mailchimp api or similar to do this job ?
thanks,
d.-
GAE no longer supports sending more than 100 emails and they will not increase your quota using this form request. They are nudging people to SendGrid (why SendGrid specifically in unclear). Its an unfortunate reduction in GAE capabilities.
They have a nice little footnote in there that says:
The new limit of 20,000 messages per day only applies to applications
created on or after December 14th, 2012. Applications created before
this date will not be subject to this limit, even if they enable
billing after December 14th.
You may be able to go around this by converting an old and unused GAE project to send the emails. If you don't have one, you can ask your friends if they do. Pretty much everybody I know has at least one or two dead GAE projects.
You can request a quota-increase here: http://support.google.com/code/bin/request.py?&contact_type=AppEngineCPURequest
Explain what you are doing and why you need more of your mail-quota.

Google Application Engine For Sending Emails

I have a newsletter with 13k subscribers. I would like to use Google to send the newsletter instead of the free edition of mailenable I am using currently.
The main thing that has put me off is the 2,000/day sending limit as it would take a week to send out a bi weekly newsletter which may have time sensitive information in it.
I saw a post here that said you can send over the 2,000/day limit if you use the GAE.
I went to the GAE page and had a look at the limits and it does say that you can make 1,700,000 email queries. However, I called the Google apps sales team and they said Google says anything above 2,000 emails is spam and has no legitimate purpose (I had the feeling though that the person I was talking to was poorly trained and had no idea what the GAE was).
So would I need to create my own google app that acts like a SMTP server and uses the GAE to send the email? Would this be the same as sending through Google Apps, i.e. DKIM header added and trusted IP?
Any help anyone can give me is greatly appreciated.
Many thanks in advance.
From my experience GAE is a very bad platform to send bulk emails.
For a long time it didn't support DKIM or Sender Id, its hard to mange bounces, and on top of everything you need to write your own framework for bulk sending using tasks or backends.
The cost of instances time for sending those emails might even double your cost (in $$$) for sending the newsletter.
We choose to go with Mailchimp which is IMHO the best tool for sending bulk newsletters.
Billed applications can indeed send more than the default daily free limit of emails with App Engine. Once you have enabled billing, you can choose how much quota you want to dedicate to your app, including email sending.

Gmail Send Quota, When Sending Using Google App Engine

Gmail imposes a daily 500 recipient quota for sending emails. If you send through their POP/IMAP interface that quota is only 100 recipients per day.
What is the sending quota for sending an email on a gmail account using the google app engine? Would it follow the POP/IMAP limit or the standard gmail limit?
Here is all the official gmail quota information I found:
http://mail.google.com/support/bin/answer.py?hl=en&answer=22839
The answer depends on how you decide to send the email.
Are you using the built in App Engine mailing API? If so you, can send lots and lots of emails (see amir's answer).
Are you sending your mail through Gmail's SMTP server? ( I assume you meant SMTP when you said POP, as POP is only for reading email) If so, the limit is 100, as you state.
Is your app connecting to gmail through http and pretending to be a human using the normal interface? Then the 500 limit would apply.
When using app engine api to send emails (and you have billing enabled), you can send 4900 emails/minute. See the quotas on this page:
http://code.google.com/appengine/docs/quotas.html#Mail
Apparently, Google has changed the quota for email recently. The limit has gone down to 100 emails per day, with no option to buy more.
Google advises to use SendGrid to send more email.
If anyone could post Java code to use sendgrid, that would be helpful, as Google's documentation is lacking, as usual.
Edit: There is documentation for Java. I have not tried this yet.

Google App Engine Emails Going to SPAM folder

When I send emails through google app engine using the mail's send_mail function, they often get placed in the receiver's SPAM folder. Although this problem does not happen for GMail accounts, it does for Yahoo Mail accounts (and presumably several others)
Is there a way to get the emails GAE sends around the SPAM filter?
This is going to depend a great deal on what about the messages you're sending gets them marked as spam. Google's documentation suggests that it's the app engine that actually does the SMTP, so there might be some other google app engine app that someone's marked as spam and your sending IP (which happens to be the same) is getting tarred with the same brush, or it might be something about the content of your messages. Many big mail providers give you some way to determine how 'spammy' they'll think a particular message will be; perhaps you could get information that way?
Another option is the standard 'be careful to add [some address] to your safe senders list if you want to get email from us!' warning in your app.
See this reasoning, provided by Gmail on how it filters incoming email based on the header information. The key thing to note here is that all emails sent via GAE's SMTP infrastructure are sent via email IDs of the format xyz.apphosting.bounces.google.com, which by Gmail's definition itself brings the emails under the category of falsely / apparently bounced email messages, hence they get categorized as spam. The same would hold true for other email service providers that follow similar logic for spam filtering.
GAE still needs to come up with a good solution to this problem. In the meanwhile, the suggestion I would give you is to use an external email service. Since GAE does not allow you to open arbitrary TCP sockets, you can use the URLFetch service to submit requests to external services that can open SMTP connections and send email on behalf of your email ID.
While this approach shifts your email sending costs to the external service, it consumes additional GAE resources, namely- UrlFetch service API calls and UrlFetch Data sent.
Update: Google App Engine plans to launch support for outbound sockets soon as part of their production feature roadmap, so making external SMTP connections directly would become a possibility.

Resources