Cannot send mail

503 views
Skip to first unread message

Petr Balogh

unread,
Mar 1, 2016, 6:14:20 PM3/1/16
to Google App Engine
Hello, 

I've met problem in my application.. problem is that I cannot send email.. or behaviour seems weird..

First time I've got email.. but after that haven't..  if app was running day, maybe two it started sending email.. but after I sent some changes to app, it stopped sending mails again..

I tried create different testing page but doesn't work :( :

from google.appengine.api import mail                                           
import webapp2                                                                  
                                                                                

[code]                                                                                
class emailTest(webapp2.RequestHandler):                                        
    def get(self):                                                              
        message = mail.EmailMessage(                                            
            sender="noreply <nor...@ID-OF-APP.appspotmail.com>",          
            subject="Testing email"                                             
        )                                                                       
                                                                                
        message.to = "My Name <m...@email.com>"                      
        message.body = """                                                      
        Dear Albert:                                                            
                                                                                
        Your example.com account has been approved.  You can now visit          
        http://www.example.com/ and sign in using your Google Account to        
        access new features.                                                    
                                                                                
        Please let us know if you have any questions.                           
                                                                                
        The example.com Team                                                    
        """                                                                     
                                                                                
        message.send()                                                          
        self.response.out.write(message.body)           
[code]


Any idea what I am doing wrong?  I have still free version of app and can see in quota that sent email value is increasing if I send email.  

Thanks                       
~                                                                                                                    
~                                              

Nick (Cloud Platform Support)

unread,
Mar 1, 2016, 6:35:12 PM3/1/16
to Google App Engine
Hey Petr,

If you're experiencing an issue on the platform, you should post to the Public Issue Tracker and include a minimal application which can be used to reproduce the behaviour on our end. The example email you show is likely breaking exactly the specific conditions needed to observe the behaviour - often mail will fail to send due to matching a spam signature, although without seeing the message content (or the error output in the logs, for that matter), it's impossible to know.

If you post to the Public Issue Tracker and then post the link to the created thread here, I'll be happy to take a look and help you out. As it is, this thread is somewhat off-topic since this forum is meant for general and high-level discussion of the platform and services, not specific-issue technical support requests.

Best wishes,

Nick


On Tuesday, March 1, 2016 at 6:14:20 PM UTC-5, Petr Balogh wrote:
Hello, 

I've met problem in my application.. problem is that I cannot send email.. or behaviour seems weird..

First time I've got email.. but after that haven't..  if app was running day, maybe two it started sending email.. but after I sent some changes to app, it stopped sending mails again..

I tried create different testing page but doesn't work :( :

from google.appengine.api import mail                                           
import webapp2                                                                  
                                                                                

[code]                                                                                
class emailTest(webapp2.RequestHandler):                                        
    def get(self):                                                              
        message = mail.EmailMessage(                                            
            sender="noreply <noreply@ID-OF-APP.appspotmail.com>",          

Rob Williams

unread,
Mar 2, 2016, 12:49:42 PM3/2/16
to Google App Engine
Hi,

I've seen the same since yesterday, 1-March-2015. Existing code queues mails to not send too fast. Test case has a small number of receivers.

Have found that:
  • Logs indicate mail was sent
  • Quota is updated to show mail being sent
  • Only a small random subset of the sent mails are received by remote hosts
    • Have tested with multiple receiving domains
    • Emails are not in junk folders
    • The few emails that are delivered arrive instantly
  • No bounce backs have been delivered


Several people are seeing similar behaviour on stack overflow. http://stackoverflow.com/questions/35727054/google-app-engine-python-mail-sent-but-not-received  http://stackoverflow.com/questions/35737937/sending-email-stopped-working-using-anythingtestapp-appspotmail-com


Is email transmission broken? Is email being radically queued?

Thanks!



On Tuesday, March 1, 2016 at 6:14:20 PM UTC-5, Petr Balogh wrote:

Rob Williams

unread,
Mar 2, 2016, 12:55:12 PM3/2/16
to Google App Engine
*2016.

Nick (Cloud Platform Support)

unread,
Mar 3, 2016, 6:38:11 PM3/3/16
to Google App Engine
Hey Rob,

The best way to get us to look at a potential issue is to make a report in the Public Issue Tracker. Feel free to do so, with as much technical information as possible, and you'll find that the responses are quick and the issue will make progress. Posting in a forum meant for general discussion (such as this one) is far less likely to find its way to people who can help.

Best wishes,

Nick




On Wednesday, March 2, 2016 at 12:49:42 PM UTC-5, Rob Williams wrote:

Rob Williams

unread,
Mar 4, 2016, 10:56:02 AM3/4/16
to Google App Engine

Nick (Cloud Platform Support)

unread,
Mar 4, 2016, 3:58:57 PM3/4/16
to Google App Engine
Hey Rob,

Thanks for the link, and for posting in the right place :) We'll be active on that thread shortly. 

Marek Dusek

unread,
Mar 10, 2016, 8:15:46 AM3/10/16
to Google App Engine
Hello,

may I ask how you solved the issue (as the link is no longer valid and the ticket ID disappeared from the public ticket listing)?

We are facing similar issue on our GAE application - emails suddenly (within last days) stopped being delivered, although no change was made to the settings or code (and the mail quota in dev console is being updated properly).

I believe there are similar posts on SO without any conclusion.

Thank you,
Marek Dusek

Rob Williams

unread,
Mar 10, 2016, 9:15:57 AM3/10/16
to Google App Engine
Hi,

The issue is still being investigated. The google team made it private.

I'm supposed to hear back from their investigation by/on tomorrow, Friday 10/March/2016.

Thanks.

Rob Williams

unread,
Mar 10, 2016, 9:17:51 AM3/10/16
to Google App Engine
:D That's twice in this thread I've got the date wrong. Friday 11/March/2016.

Nick (Cloud Platform Support)

unread,
Mar 10, 2016, 7:59:56 PM3/10/16
to Google App Engine
Hey Mark,

We continue to look into this issue. The best thing to do would be to create a Public Issue Tracker thread with your specific information so that we can have a focused and clear context in which to track your issue, which might be different or overlapping (we don't know from this point). We monitor the Public Issue Tracker every day, so not to worry, we'll be in contact quickly after your posting.


On Thursday, March 10, 2016 at 8:15:46 AM UTC-5, Marek Dusek wrote:

Gert

unread,
Mar 15, 2016, 7:23:35 AM3/15/16
to Google App Engine
https://code.google.com/p/googleappengine/issues/detail?id=12819

Can this be a higher priority please then medium. Not be able to send confirmation mails is critical to my app

Rob Williams

unread,
Mar 15, 2016, 11:49:36 AM3/15/16
to Google App Engine
Sounds like it's happening to a big number of sites.

I wonder how many people it's happening to that just haven't noticed it yet...

Nick (Cloud Platform Support)

unread,
Mar 16, 2016, 12:42:24 PM3/16/16
to Google App Engine
Hey All,

Thanks for your reports. We're noticing that there are more than a normal number of reporters on this issue and we're looking into it with a high priority. Feel free to post the specific details of your case in a self-contained comment on the thread linked above (now public again) and we'll take it into account. If, after the resolution of this issue, yours turns out to be slightly different, or persists, feel free to post an entirely separate thread. We'll be, as always, actively monitoring the new threads and will respond quickly with questions or progress updates.

Nick (Cloud Platform Support)

unread,
Mar 23, 2016, 7:25:37 PM3/23/16
to Google App Engine
This issue appears to have been resolved. If anybody is still experiencing the issue, feel free to post in the linked PIT thread and / or here and we can look into your specific case.

Cheers!

Nick
Cloud Platform Community Support

Gert

unread,
Mar 23, 2016, 9:35:40 PM3/23/16
to Google App Engine
For me it's working thanks, can we have a explanation please what went wrong?

Nick (Cloud Platform Support)

unread,
Mar 24, 2016, 7:22:08 PM3/24/16
to Google App Engine
Hey All,

As some post-mortem analysis as requeset by Gert:

These issues just happened to be fixed by a change made to the way the mail filters determined what was spam and what wasn't. Some points to note:
  
There is no guarantee it won't happen in the future and GAE doesn't provide insight into dropped messages for the most part.

The best advice we can really give is to move to Sendgrid if you have a higher standard requirement for programmatic email sending, and this is recommended in the documentation. Sendgrid has SLAs and other stuff surrounding mail delivery which put it above the Mail API, which is recommended for admin mail and other light tasks. It also gives users more visibility into what's actually going on with the mail than the Mail API [1].

[1] https://cloud.google.com/appengine/docs/php/mail/sendgrid


Cheers!

Nick
Cloud Platform Community Support

Rob Williams

unread,
Mar 28, 2016, 11:24:45 AM3/28/16
to Google App Engine
Hi Nick,

From your link:

"Using SendGrid can improve your deliverability and provide transparency into what actually happens to those emails your app sends." That's the extent of the recommendation?

Reading the docs - there's nothing super compelling to try SendGrid. The App Engine Mail API is fully featured and fully documented. If people have followed this documentation and internal changes are going to cripple their apps - this really needs to be made clearer...

Thanks.

Nick (Cloud Platform Support)

unread,
Mar 31, 2016, 6:32:52 PM3/31/16
to Google App Engine
Hey Rob,

I understand your concerns about reliability. I'll do my best to assure you that this is not a regular or expected occurrence. Spam detection filters will have false positives, but the rate here was not normal and corresponded to a hiccup in upgrading our systems. It's generally recommended to test any email campaigns on a known receiver before sending them to ensure they won't be caught in a filter. If you notice a message bouncing which should not, as this thread reinforced, the best thing is to immediately get in contact with us via the Public Issue Tracker and we can take a look at the message and ensure it clears. Stronger guarantees and minimal spam filtering are part of SendGrid's sales pitch as a service, and it does very well in these areas, this is why it's recommended. 

I hope that this has balanced out any perception of risk and clarified the question of choices. Feel free to reply if you have any further questions. 

Sincerely,


Nick
Cloud Platform Community Support

Rob Williams

unread,
Apr 1, 2016, 10:33:54 AM4/1/16
to Google App Engine
Thanks Nick!

Jeff Schnitzer

unread,
Apr 3, 2016, 12:04:12 PM4/3/16
to Google App Engine
On Mon, Mar 28, 2016 at 8:24 AM, Rob Williams <r...@workshoptwelve.com> wrote:

The App Engine Mail API is fully featured and fully documented. 


I hate hearing people say things like this. The _bare minimum_ expected of a service that delivers email is some tracking of whether or not that email was delivered. If you actually care about whether your customers receive the email you are sending, you should not be using the App Engine Mail API. It is not “fully featured”.

Jeff

Nick (Cloud Platform Support)

unread,
Apr 4, 2016, 11:37:29 AM4/4/16
to Google App Engine, je...@infohazard.org
Hey Jeff,

While in this case, failure of sending was coming from an unexpected direction, prompting engineering action to fix the issue, and leading to our recommendations to run test emails before any campaigns, there does exist a bounce notification feature which can be used to detect the most common email failures. I hope this helps ease your concerns. 

Best wishes,


Nick
Cloud Platform Community Support

Jeff Schnitzer

unread,
Apr 4, 2016, 5:01:22 PM4/4/16
to Nick (Cloud Platform Support), Google App Engine
My only concern is getting the Mail API turned off as soon as possible so whoever is working on it can go do something more useful :-)

Jeff

PK

unread,
Apr 4, 2016, 5:29:31 PM4/4/16
to google-a...@googlegroups.com, Nick (Cloud Platform Support)
I want to state that I disagree with Jeff. Whoever maintains the mail service is doing a great job and something very useful. Just for the record...


-- 
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-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CADK-0ugPR63z9OgLShEtYqqz7OOBNxB5Ya4C6BpmdeHdtQ2v6g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Gert Cuykens

unread,
Apr 4, 2016, 6:24:02 PM4/4/16
to google-a...@googlegroups.com, Nick (Cloud Platform Support)
Actually I think the mail api is getting a little bit to good, and
developers may implement a google apps from scratch :) So my
conspiracy theory is that if the mail api gets production status it
makes google apps for business obsolete :P

The fact is many web applications need some sort of confirmation
mails, think invoice etcetera. Third party solutions or a own mail
server is such a pain or expensive compared to the mail API.

So I am not complaining, I just hope google engineers are not putting
the brake on it on purpose because no way that the creators of gmail
can not make this mail api perfect in every way imaginable :P
> You received this message because you are subscribed to a topic in the
> Google Groups "Google App Engine" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-appengine/QzTQ9v_hjZs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-appengi...@googlegroups.com.
> To post to this group, send email to google-a...@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/A4605220-FBCF-478C-948F-64F758BD6275%40gae123.com.

Anastasios Hatzis

unread,
Apr 4, 2016, 7:02:09 PM4/4/16
to Google App Engine, pay...@google.com
I agree with you PK. Using Mail API was easy to achieve and never had trouble with spam filters or anything (unlike with other services). Would be great if the quotas would be increased significantly, so we could use it for more than confirmation emails.

I understand, there are services providing more features (in exchange for another billing account, credit card exposure, and money), and it's great to have options available. But in my opinion Mail API is great for what it is, it just needs higher (paid) quota.


On Monday, April 4, 2016 at 11:29:31 PM UTC+2, PK wrote:
I want to state that I disagree with Jeff. Whoever maintains the mail service is doing a great job and something very useful. Just for the record...


On Apr 4, 2016, at 2:00 PM, Jeff Schnitzer <je...@infohazard.org> wrote:

My only concern is getting the Mail API turned off as soon as possible so whoever is working on it can go do something more useful :-)

Jeff

On Mon, Apr 4, 2016 at 8:37 AM, Nick (Cloud Platform Support) <pay...@google.com> wrote:
Hey Jeff,

While in this case, failure of sending was coming from an unexpected direction, prompting engineering action to fix the issue, and leading to our recommendations to run test emails before any campaigns, there does exist a bounce notification feature which can be used to detect the most common email failures. I hope this helps ease your concerns. 

Best wishes,

Nick
Cloud Platform Community Support

On Sunday, April 3, 2016 at 12:04:12 PM UTC-4, Jeff Schnitzer wrote:
On Mon, Mar 28, 2016 at 8:24 AM, Rob Williams <r...@workshoptwelve.com> wrote:

The App Engine Mail API is fully featured and fully documented. 


I hate hearing people say things like this. The _bare minimum_ expected of a service that delivers email is some tracking of whether or not that email was delivered. If you actually care about whether your customers receive the email you are sending, you should not be using the App Engine Mail API. It is not “fully featured”.

Jeff


-- 
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+unsub...@googlegroups.com.

Chad Vincent

unread,
Apr 5, 2016, 4:36:38 PM4/5/16
to Google App Engine, pay...@google.com
I'm going to sit in the middle here.  We have had several issues with spam filters (including one yesterday), the "from" address is masked for bounce purposes, so our IT staff always spends half an hour trying to figure out why a notice got caught before they remember to search for "*.apphosting.bounces.google.com" instead of "nor...@appid.appspotmail.com" as the sender.

On the flip side it's nice that we don't have to mess with storing credentials for SendGrid, worrying about delay from the trip outside causing timeouts (a lot of our outbound mail is process-intensive and occasionally hits the timeout just from waiting for external data that I need to start caching...), etc.

So ultimately, I like having the mail API just because I don't have to change anything and can put the rare issue off on a different department.  But I can see where it could be lacking for anyone less staffed or higher volume than us.

Jeff Schnitzer

unread,
Apr 6, 2016, 3:43:10 PM4/6/16
to Google App Engine, Nick (Cloud Platform Support)
Are you calling the mail api directly or from the task queue?

Even when I was using the mail api, I always sent mail by enqueueing a task (usually in a transaction). Timeouts are never an issue that way.

Jeff

To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.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-appengi...@googlegroups.com.

To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.

Keith Chan

unread,
Apr 10, 2016, 7:06:33 PM4/10/16
to Google App Engine
Using the following java code:

Properties props = new Properties();
Session session = Session.getDefaultInstance(props, null);
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(FROM_EMAIL, "Sender"));
msg.addRecipient(Message.RecipientType.TO, new InternetAddress(email, name));
msg.setSubject(title);
msg.setText(msgBody);
Transport.send(msg);

If the msgBody contains a URL like
MyApplication.appspot.com
the message won't be received by the recipient, but system has no error log
If I change the content to:
MyApplication.appspot._com
then everything works fine

This happens on both Java and Python, seems the email server has a filter not sending message with valid URL.


Nick (Cloud Platform Support)

unread,
Apr 13, 2016, 1:27:11 PM4/13/16
to Google App Engine
Hey Keith,

If you can open a Public Issue Tracker thread using label "Restrict-View-EditIssue", posting an example message which fails in the thread, we'll be able to take a look and potentially get the issue resolved, if you've already configured bounce notifications and can confirm that it's not a case of the mail bouncing. 

Regards,

Nick
Cloud Platform Community Support

Keith Chan

unread,
Apr 15, 2016, 2:55:29 PM4/15/16
to Google App Engine
Hi Nick,
Today the email problem is fixed.

Thanks,
Keith

Kim Lewandowski

unread,
Apr 15, 2016, 3:21:45 PM4/15/16
to Google App Engine
Hey everyone,

As you're probably aware, some outbound mail from App Engine was being blocked. This was a result of some overzealous spam filters. We've re-tuned them. However, if you are still seeing problems, please email me at lil...@google.com.

Also, the best way to make sure your (non-spam) emails have the greatest chance of being delivered is to make sure your account is in good standing. Enabling a billing account with a valid credit card on your account is one signal to us that you're not an abuser of the system. If you do enable billing and want to make sure you stay within the free tier of App Engine, you can easily set a spending limit of $0 for your account.

-Kim
Product Manager, App Engine

Tomasz Jamróz

unread,
May 13, 2016, 11:30:11 PM5/13/16
to Google App Engine
Hi there,
I have a similar problem. I tested a few outgoing emails from the app to my own gmail account and at first everything was OK. After a day or two, though, emails stopped being sent and yesterday my app was suspended without any warning for "violating ToS". What's happening? Is sending emails from my app violating ToS? (app id: # 652775937356)
Tomasz

Nick (Cloud Platform Support)

unread,
May 17, 2016, 1:20:51 PM5/17/16
to Google App Engine
Hey Tomasz,

Thanks for reaching out.

You should have received (or will soon receive) an email from google-clou...@google.com regarding your usage of the Google Cloud Platform. This generally indicates a need to clarify usage that appears to be against the Google APIs Terms of Service:

https://developers.google.com/terms/

In case that email doesn't arrive, please feel free to fill out the form available at https://support.google.com/code/contact/unusual_api_activity?rd=1 and someone from the team will get back to you as soon as possible.

That email will contain more detailed information on how to resolve the issue. Once you respond to that message and the issues are resolved, cloud support will be able to assist you further in this inquiry. 

Thanks,

Nick
Cloud Platform Community Support

Nick (Cloud Platform Support)

unread,
May 17, 2016, 1:29:34 PM5/17/16
to Google App Engine
Hey Tomasz,

As an addition, it may have been the Cloud Platform ToS, and the contact form would be: https://support.google.com/accounts/contact/suspended.

Cheers,


Nick
Cloud Platform Community Support

On Tuesday, May 17, 2016 at 1:20:51 PM UTC-4, Nick (Cloud Platform Support) wrote:
Hey Tomasz,

Thanks for reaching out.

You should have received (or will soon receive) an email from google-cloud-compliance@google.com regarding your usage of the Google Cloud Platform. This generally indicates a need to clarify usage that appears to be against the Google APIs Terms of Service:

Tomasz Jamróz

unread,
May 23, 2016, 10:39:26 AM5/23/16
to Google App Engine
Hi Nick,
Thanks for the reply. I have tried https://support.google.com/accounts/contact/suspended
but I got the feedback that everything is ok with my account.
I have just given it a shot with the second link and hope that my case will be examined. 10 days have already passed since my app was suspended, but I have still not been contacted despite the appeal.
Best,
Tomasz
 

On Wednesday, May 18, 2016 at 2:29:34 AM UTC+9, Nick (Cloud Platform Support) wrote:
Hey Tomasz,

As an addition, it may have been the Cloud Platform ToS, and the contact form would be: https://support.google.com/accounts/contact/suspended.

Cheers,

Nick
Cloud Platform Community Support

On Tuesday, May 17, 2016 at 1:20:51 PM UTC-4, Nick (Cloud Platform Support) wrote:
Hey Tomasz,

Thanks for reaching out.

You should have received (or will soon receive) an email from google-clou...@google.com regarding your usage of the Google Cloud Platform. This generally indicates a need to clarify usage that appears to be against the Google APIs Terms of Service:
Reply all
Reply to author
Forward
0 new messages