3
votes

I have this really weird problem and I'm not able to find a solution... I hope you can help me...

I'm working in Google App Engine to build my App (lets call it "MyApp"), to test, I have a cloned app renamed as "sandbox-MyApp".

I need to allow my users send a mail with some data, so I have a form where they can fill some information that will be added to the message.

I've working with this scenario a long time ago, but now I'm having issues, because, for some reason, my out-coming mails are not being received by the recipients...

It's a really weird thing about this, because, I can send one or two mails without problem, but after that, they suddenly stop, and after some code-changes, they work again.

My code it's real simple, based on the Google Documentation.

MimeMessage msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(senderAddress, MimeUtility.encodeText(senderLabel, "UTF-8", "B"), "UTF-8"));
           msg.addRecipient(javax.mail.internet.MimeMessage.RecipientType.TO, new InternetAddress(receiverAddress, receiverLabel, "UTF-8"));
                if(responseAddress != null && !responseAddress.trim().isEmpty()){
                    msg.setReplyTo(new Address[] {
                        new InternetAddress(responseAddress, MimeUtility.encodeText(senderLabel, "UTF-8", "B"))
                    });
                }
                msg.setSubject(MimeUtility.encodeText(subject, "UTF-8", "B"), "UTF-8");

                    msg.setContent(msgBody, "text/html;charset=UTF-8");

                Transport.send(msg);

I've tried changing "from" to something like "[email protected]" and it works for a while, but after some mails (about 5 or 6), stop working too.

Most shocking thing: There aren't any error message on logs... The Cuota Viewer counts every sent mail (so I suppose it must being blocked somewhere else),

I've modiffied the message to omit any URL on the body and It works better, but I need to include it!.

1
If changing the content of the message changes whether the message is received, it sounds like some spam filter is stopping the message. Did you look in the spam mailbox for the recipient? Are you sure you're not actually sending spam? :-) - Bill Shannon
I've checked a lot of times the Spam mailbox, but it's empty... i've tried to send the mail to different mailboxes of gmail, hotmail, yahoo with same results: no message incoming... I've tested the mail message using different spam testers and it seems to be ok... It's not spam... I'm working with 3 different messages: - Welcome to the platform - Remember password - Invitation to the platform (sended by an user) They all fails if the message contains an URL... even on plain text... - ThanatosMK
Have you tried it without including the sender label? - jmehrens
If you change the URL to something obviously innocuous, like google.com, does it work? - Bill Shannon
Yes, I've already omited the sender label, but nothing changes... U_U - ThanatosMK

1 Answers

0
votes

Problem is tracked on https://code.google.com/p/googleappengine/issues/detail?id=12786

Workaround which worked for my application is to not use appspot.com domain. Register custom domain for the application and then mails to the application using the custom domain work.