Email feature not working

24 views
Skip to first unread message

Deepak Singh

unread,
Sep 6, 2011, 12:15:04 PM9/6/11
to google-a...@googlegroups.com
Hi,

Application id:   fareguglytestenv.appspot.com
Custom domain: www.goglytrip.com

I have linked my domain goglytrip.com to google apps and modified CNAME and MX records as suggested on docs.

I created one email id ad...@goglytrip.com as an administrator to the domain goglytrip.com
Email is working seperately and my app is running on www.goglytrip.com. Everything fine.

But Sending email through app is not working. Here is my code,

private static final Logger log = Logger.getLogger(GwtRpcServiceImpl.class.getName());
Properties props = new Properties();
Session session = Session.getDefaultInstance(props, null);

MimeMessage message = new MimeMessage(session);

message.setSender(new InternetAddress("ad...@goglytrip.com", "Goglytrip admin"));
message.setSubject(subject);
message.setContent(body, "text/plain");
                        message.setRecipients(Message.RecipientType.TO, new InternetAddress("deepaks...@gmail.com"));

                        Transport.send(message);
                        log.info("Mail sent");

What is wrong here that email is not being sent to the address. The log records doesnt show any error as well.
But the last log statement is also not printend.

Anyone pls suggest.

Thanks
Deepak

Ronoaldo José de Lana Pereira

unread,
Sep 6, 2011, 12:44:08 PM9/6/11
to google-a...@googlegroups.com
The sender must be an admin user in your app "Permission" settings, at least a Viewer.

-Ronoaldo

Deepak Singh

unread,
Sep 6, 2011, 2:24:02 PM9/6/11
to google-a...@googlegroups.com
I have my gmail account deepaksingh.kr@gmail as owner. 
If i use this id as a sender, even then email is not being sent.

Thanks 

2011/9/6 Ronoaldo José de Lana Pereira <rper...@beneficiofacil.com.br>
The sender must be an admin user in your app "Permission" settings, at least a Viewer.

-Ronoaldo

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/J_U6tslmIhsJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

Wen (Google)

unread,
Sep 6, 2011, 7:32:49 PM9/6/11
to Google App Engine
In your code, "message.setRecipients(...); " should be
"setRecipient(...)", not "setRecipients()" since your arguments does
not match plural.

With that change, the same code works in my app. when sender is the
owner of application.

- Wen


On Sep 6, 11:24 am, Deepak Singh <deepaksingh...@gmail.com> wrote:
> I have my gmail account deepaksingh.kr@gmail as owner.
> If i use this id as a sender, even then email is not being sent.
>
> Thanks
>
> 2011/9/6 Ronoaldo José de Lana Pereira <rpere...@beneficiofacil.com.br>
Reply all
Reply to author
Forward
0 new messages