App engine is not sending emails - google-app-engine

my application deployed on app engine has been working succesfully half a year. One function is a sending of emails. But today it started to fail everytime with this error:
javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Illegal Arguments (java.lang.IllegalArgumentException: Unauthorized Sender: Unauthorized sender))
Of course sender email is registered in app engine console.
I didn't change anything!
Anyone who share same issue?

If someone have the same problem, the reason is the sender for the mail is incorrect or doesn't have permissions to send the email, I use the default noreply#your-application-id.appspot.com account to send the email.
InternetAddress from = new InternetAddress(
String.format("noreply#%s.appspotmail.com", SystemProperty.applicationId.get()),
"Your Application Name") ;
message.setFrom(from);

You can check if the account of your user is not marked as a spammer or disabled in Google Apps.

If you are sending a very large number of emails to a single email account, Google can throttle you. When we were sending emails whenever we got an error, we ran into a similar problem.

Also, there is a limit on number of calls to mail API per minute.
Maybe earlier you were sending mail to fewer people resulting in fewer calls to the mail api.
It's 8 calls per minute, unless you have provided a credit card number to enable your billing.

Does your sender email address has permission to access this app engine application ?
it's must have permission to access your application then it will work...

Related

Verified Application presented as "Unverified" to End Users

My company has an application that was verified through the Google OAuth Review/Verification process and is listed as "Published" in the Cloud Console; however, end users are starting to receive the "This app isn't verified" warning when needing to re-authorize.
We tried emailing them Google Cloud Platform/API Trust & Safety Team directly but immediately received the reply "Please note that your email was not received because api-dev-oauth-verification#google.com is not a monitored alias."
Since the application is verified in the console, the "Submit for verification" button is greyed out so we can't contact them that way and we don't want to modify the scopes to require verification again as we want to preserve everything so Google can investigate it in its current state.
That's why I'm reaching out here:
Has anyone experienced this before and have any ideas what could be the cause?
Anyone know a way to reach the Google Cloud Platform/API Trust & Safety Team without the use of "Submit for verification" button?
You are receiving the "api-dev-oauth-verification#google.com is not a monitored alias." message because the address you are trying to send the email to, is a bit wrong.
The correct address to contact the trust and safety team is:
**
api-oauth-dev-verification#google.com
**
Remember that only the project owner should contact the T&S team.

Sending email stopped working using anything#testapp.appspotmail.com?

I'm trying to send an email using the java api. I've got my app running live, no custom domain, in fact it's just a default project. Billing is not enabled. My app name is 'testapp'.
I'm using this email address for the sender:
admin#testapp.appspotmail.com
That seems to be ok if I'm reading the docs correctly (criteria #2):
For security purposes, the sender address of a message must be one of the following:
The Gmail or Google Apps Account of the user who is currently signed in
Any email address of the form anything#appname.appspotmail.com or anything#appalias.appspotmail.com
Any email address listed in the Cloud Platform Console under Email API Authorized Senders
The email was sent successfully twice, but now it has stopped working (same sender address, same recipient address). Nothing appears in the recipient's spam.
I can see in the quota page that the # of emails-sent keeps incrementing. But nothing is actually going through.
What am I missing?
Thanks
This is a known issue that is currently being tracked on the App Engine public issue tracker. Please feel free to star this issue for updates.

Email sent from Google App Engine goes to Spam in Gmail

We are sending newsletters to users subscribed through a TV Show website, using Google App Engine Java Mail API.
The FROM address we are using are name#example.com but the problem occurs with name#[appid].appspotmail.com as well.
We already setup a SPF and DKIM records and we have a low score on SpamAssassin (about 0.7).
All others email providers receive the email normally (hotmail, yahoo, aol, etc.), but, in Gmail, ALL messages are sent straight to Spam folder. Every single one.
Anyone have a clue on this?
If all the other mail providers are working, you may want to look at gmail's spam policy: https://support.google.com/mail/bin/answer.py?hl=en&answer=81126 It may shed some light on the issues you're having.

sending email with GAE copies sender -- how to stop?

I'm creating an app with GAE to allow people to vote in elections and this involves sending an email to each voter. I do this in a loop:
mail.send_mail(sender = manager.email(),
to = email,
subject = election.title,
body = body)
where manager is the signed-in user.
This appears to BCC the manager on all emails, but I don't want that to happen. Is there a way to send the email only to the intended recipient?
You can't - App Engine automatically BCCs the sender. If you don't want to receive them, you could use one of your app's incoming email addresses as the sender address.
There is an Issue logged for this problem here:
http://code.google.com/p/googleappengine/issues/detail?id=2059
Please "star" it if you want Google to fix it.

InvalidSenderError: Unauthorized sender (Google App Engine)

I am having trouble sending email from my app at Google App Engine. I am experiencing several newbee hurdles and I would appreciate your help.
I take this function from the tutorial and for the "sender" field I put my gmail account that I used to create the app:
mail.send_mail(sender="owners_email_acco...#gmail.com",
to="xxxx...#gmail.com",
subject="test email from app",
body="hello")
when I try this, I get the error:
InvalidSenderError: Unauthorized sender
But the email
sender="owners_email_acco...#gmail.com",
is the email I use to log into the app; this is the email I used to create the app.
The tutorial says:
The email address of the sender, the From address. The sender address must be one of the following types: The address of a registered administrator for the application. You can add administrators to an application using the Administration Console.
So the email I used to create the app should work as a sender. What am I doing wrong? Thanks.
(I asked the same question in GAE group but there was no reply)
I read that aliases and nicknames through google apps won't be recognised as their underlying address so maybe that's the problem.
I approached this just a few days ago and after making sure all sender addresses were listed in the 'permissions' section of the application console, it all worked fine.

Resources