Intermittently Delay in Receiving Email Messages by Gmail Api - delay

I'm facing intermittently delay with polling email messages via Gmail API from GSuite user's inbox. Those calls origin from automatic jobs and use multiple G-Suite users to disperse the work and avoid reaching Quota limits.
However, there are still delay of at least 3 minutes in reading the email. Investigating message email headers showed neither errors (429) or delay time, nor quota limits are being reached.
I examined the push notification method and I'm limited to use it.
Are limit units calculated according to domain rather than per G-Suite user so I'm indeed reach quota?
What else can cause those delays?

The Gmail API has usage limits per method and per user.
Email sending limits are calculated per user per day, not per domain.
Limit units are calculated from all requests made from your application per day
You can check your quota in the Cloud console, choosing your project and API (in this case Gmail).

In my case, I could clearly see the email inside the 'Sent' folder but the recipient had not got any email, so I knew the limits for using the API had not been crossed. It was spam protection taking a ton of time to figure out if the sent email was spam or not. The most common case would be if your emails are all similar with a link in them. I removed the hyperlink in my template email notification and it started working again without any delay.

Related

Notification not received for some Gmail watched accounts

We use Google Pub/Sub service for being notified when our users receive emails on their Gmail accounts.
We use the Ruby Gmail client (https://googleapis.dev/ruby/google-api-client/latest/Google/Apis/GmailV1/GmailService.html) for watching the Gmail accounts of our user (connected with OAuth authorisation). We expose an endpoint in our Rails app for getting the posted notifications from Google.
It has worked for years without any problem for more than 1000 Gmail accounts. Since two weeks ago, we stopped receiving notifications for some accounts (I would say around 20).
Each account is re-watched once a day (with stop_user() and then watch_user()), so it's not a problem of expired subscription.
Once a notification is not received for an account when there is a new mail, we never receive a notification anymore until it's re-watched. Then, it works for several minutes/hours and then it's broken again. It always happens for the same accounts.
The quotas page on GCP shows that there is not quotas limit exceeded.
I don't know if it's directly related to the Pub/Sub service or if it's a Gmail issue...
Does someone already experienced the same issue ? How can it be investigated / fixed ?
Thank you in advance for your help !
RĂ©mi
As talked in the comments, this seems to be a bug. Adding it as an answer for visibility purposes. You can click on the star next to the issue number to give more priority to the report and to receive updates.
A bug has been created here on the Google issue tracker : https://issuetracker.google.com/issues/208369302

Howto email notifications from your web application

What is the correct way to setup mail notifications from your web app in the cloud era? Previously I always had some SMTP server, which I could use for that purpose, but this time my company mail is hosted and there is a limit of 500 mails per day sent from certain address in this system, so with rather high chances I can hit that limit. My first thought was to use services like sendpulse or mailchimp, but it seems that all these services are built having mass marketing campaigns in mind and I'm concerned about security in case of sensitive emails, like password restore or details about orders. I spent several hours searching for solution in the web, but did not find anything reasonable.
Ideally the service I'm looking for would guarantee, that content of my messages would never be stored or shown to anyone, besides email this service might also be able to send SMS (for password restore case) and have integration with messengers.

Is there a way to add an identity to Amazon SES through a form in Javascript? [duplicate]

I am developing PHP application that, after sign-up, sends an activation mail to the registered email address using Amazon SES (Simple Email Service).
But SES is only sending emails to verified users.
How can I send the activation link to any non-verified email address, too?
While running in sandbox mode you can only send to verified users - once your account has been activated, you can send to anyone.
Getting out of the sandbox:
http://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html
By default you can only send to email addresses that have been verified in your SES account. As others have said, this is called "sandbox mode". This is to prevent spam.
To enable "production mode", where you can send emails to non-verified email addresses, you need to request this manually through a support ticket, which will also be examined manually by an AWS employee. This is all explained clearly in the same link that the top answer gave back in 2016 but I've also preserved the 7-step instructions (just in case the link changes or can't be opened for some reason):
In the account details modal, fill out the following account details.
For Enable production access, choose Yes or No. You can only move out of the sandbox by choosing Yes.
For Mail Type, choose the type of email that you plan to send. If more than one value applies, choose the option that applies to the
majority of the email that you plan to send.
For Website URL, enter the URL of your website. Providing this information helps us better understand the type of content that you
plan to send.
For Use case description, explain how you plan to use Amazon SES to send email. To help us process your request, you should answer the
following questions:
How do you plan to build or acquire your mailing list?
How do you plan to handle bounces and complaints?
How can recipients opt out of receiving email from you?
How did you choose the sending rate or sending quota that you specified in this request?
For Additional contact addresses, tell us where you want to receive communications about your account. This can be a
comma-separated list of up to 4 email addresses.
For Preferred contact language, choose whether you want to receive communications for this case in English or Japanese.
When you finish, choose Submit for review.
If you are successful, you will get an email from no-reply-aws#amazon.com saying:
Hello,
Thank you for submitting your request to increase your sending limits.
Your new sending quota is 50,000 messages per day. Your maximum send
rate is now 14 messages per second. We have also moved your account
out of the Amazon SES sandbox.
This takes effect immediately in the XXXX region. You can
view the current sending rate and sending quota for your account on
the Sending Statistics page of the Amazon SES console, or by using the
GetSendQuota API.
If unsuccessful, you will get an email saying the following:
Thank you for providing us with additional information about your
Amazon SES account in the Europe (London) region. We reviewed this
information, but we are still unable to grant your request.
We made this decision because we believe that your use case would
impact the deliverability of our service.
We cannot assist you further with this issue, and we will not respond
to additional messages on this subject.
The SES forum is full of frustrated people who got the second message (indicated an unsuccessful application to send emails to non-verified email addresses), but I can assure that that this morning I got the first message (indicating a successful application to exit the sandbox and enter production mode where I can send to non-verified email addresses).
The forums indicate that this can be very hit-or-miss, depending on which staff members reads your application (people have pointed out that they have had some accounts approved with barely any description, and other accounts not approved despite giving what they felt were sufficient details). Therefore I'd advise you to be thorough during this application.
These are the restrictions in SES sandbox :
You can only send mail to the Amazon SES mailbox simulator and to verified email addresses and domains.
You can only send mail from verified email addresses and domains.
You can send a maximum of 200 messages per 24-hour period.
Amazon SES can accept a maximum of one message from your account per second.
You have to move out of sandbox to send email to non-verified email address using AWS SES.
After you move out from sandbox mode, you need to handle complains and bounds about SES.
AWS asking us ,you are sending a mail to an unregistered mail adress.what if mail adress doesn't exist? .AWS needs notificate you about the sending status of mail which you sent.
There are three sending status : complaints,bounds(mandatory),deliver(optional)
So you can get a notification about the mail if it sent or not with the reason.
To handle complaints and bounds,you need to create SNS topics and need to relate them with the SES.now AWS can notificate you about the mail it is sent or failed or something else..
Here is the detailed description how to relate SNS and SES :
https://docs.aws.amazon.com/en_us/ses/latest/DeveloperGuide/configure-sns-notifications.html
NEW UPDATE:
You can now go to the SES account page and directly drop a request for production access.
https://ap-south-1.console.aws.amazon.com/ses/home#/account

Gmail API - Adding an attribute for each mail. Is it possible?

Let's suppose I want to create a tracking time web app and one of the features allows the user to track the time spent sending mails. So, when receiving or sending an email, there would be an option for indicating how long it took the user to send or read that email. Then, from the website of my web app (mytrackingtimeapp.com), the users could create custom charts and reports for listing, for example, all the emails that took him more than 10 minutes to read and were sent in June.
If I had in a database of mine all the emails, this would be as simple as create a column for each email storing that value.
So my question is: would it be possible with the current Gmail API do so?

Mass Emails Getting Rejected by Google

I need help automating mass emails I'm sending daily.
I'm trying to send out automated mass emails through a Gmail account (My Business uses Google Apps). I built a Java program that allows me to enter my credentials (gmail username & password), Subject Line, Email List, and enter is a body template. The program then sends out emails one at a time to each of the contacts which are in a comma delimited list. This isn't spam as I'm getting the users to submit their email address.
I got this Mail Delivery Message today: "Technical details of permanent failure: Message rejected." I read that Google will only allow a maximum of 100 recipients to any message through its smtp gateway - and there's a maximum of 500 messages in any 24 hr period.
I need a new strategy. How do I build a program to automate sending of ~100-200 emails a day? Do I need to be buying IP's, SMTP Servers, write a new PHP application? I need a place to start because this is out of my scope.
Gmail is not designed for email marketing as you have seen. In the past I have used a Google App Engine account for sending tens to hundreds of thousands of emails (because that was where the domain was managed), but that can be a pain to manage.
You could consider using a service that specializes in email marketing. I have heard good things about Campaign Monitor and MailChimp. Plus MailChimp can integrate into Google Apps.
We use www.authsmtp.com but I was looking at switching to Google when we switch to Google Apps in the near future. I'll have to drill in a bit more. IN the meantime, give authsmtp a try.
Google specifically rejects this type of behavior/use of their system. https://support.google.com/mail/bin/answer.py?hl=en&answer=69585
I would suggest trying a system that is built for this type of activity such as MailChimp or Aweber.

Resources