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...
精彩评论