java-wave incoming mail question

8 views
Skip to first unread message

maxsap

unread,
Nov 10, 2009, 2:31:48 PM11/10/09
to Google App Engine
Hello all, I am using google wave and I am testing a robot so far I am
able to send a mail with google AppEngine, the problem starts when the
robot has to be notified for an incoming message, so this is my
question how can I get notified for an incoming mail? is there a way?
also I have an other question here(http://code.google.com/intl/el/
appengine/docs/java/mail/receiving.html) it says that my app should
have an str...@appid.appspotmail.com address if my app id is maxsap
what is the exact url(stupid question but i dont get it).
p.s.I am posting to this forum and not to google wave's because I
think problem has to do with the appengine
thanks in advanced maxsap

Ikai L (Google)

unread,
Nov 10, 2009, 8:13:17 PM11/10/09
to google-a...@googlegroups.com
The Wave robot should be able to address the blip. For more information, you'll probably want to look to the Wave group.

The email address will be handler@maxsap.appspotmail.com, where handler is a string specified by your configuration file:
<servlet-mapping>
  <servlet-name>handleowner</servlet-name>
  <url-pattern>/_ah/mail/handler</url-pattern>
</servlet-mapping>

The handler will use the standard Servlet Mapping rules to map handler to the string after /_ah/mail/.
--
Ikai Lan
Developer Programs Engineer, Google App Engine

maxsap

unread,
Nov 11, 2009, 3:23:08 AM11/11/09
to Google App Engine
thanks for the responce and for clearing out this for me
regards maxsap

maxsap

unread,
Nov 11, 2009, 7:13:20 AM11/11/09
to Google App Engine
Ikai I have tried to do this but I dont have any success.
my web.xml looks like this :<servlet>
<servlet-name>mailhandler</servlet-name>
<servlet-class>MailHandlerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>mailhandler</servlet-name>
<url-pattern>/_ah/mail/*</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
<url-pattern>/_ah/mail/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>

I have a servlet called MailHandlerServlet gust like the tutorial at
google. when I try to send a mail to
*mailhandler*@javasippy.appspotmail.com
(where javasippy is the ID of my app) I only get a mail from mail
delivery subsystem saying:"Delivery to the following recipient failed
permanently"
when I go to the address javasippy.appspot.com/_ah/mail/ I get an
error saying initialization error
any ideas?
thanks in advanced, regards maxsa

Ikai L (Google)

unread,
Nov 11, 2009, 7:07:49 PM11/11/09
to google-a...@googlegroups.com
Maxsa,

Can you double check that this is in your appengine-web.xml?
<inbound-services>
<service>mail</service>
</inbound-services>
This is documented here: http://code.google.com/appengine/docs/java/mail/receiving.html

One of the "gotchas" of the development server is that the Admin console will be able to invoke the incoming mail handler even if this is not enabled. App Engine will not deliver incoming email unless this service is defined.

maxsap

unread,
Nov 12, 2009, 5:50:05 AM11/12/09
to Google App Engine
Ikai Lan, thanks for the response yes the service is enabled and I was
finally able to send get mail in(*test*@javasippy.appspot.com
including the * ), But i have made the servlet send a response mail
every time it receives one mail(for testing reasons ) the problem is
that know when I sen one mail (from Gmail) I will get about 10 mail
back and there isn't any code error (the same I used for sending from
the wave and worked fine) does the appengine invokes my mail handler
more than one time is this possible?

Ikai L (Google)

unread,
Nov 12, 2009, 3:01:58 PM11/12/09
to google-a...@googlegroups.com
No, only one action should be invoked. It's invoked in standard servlet-mapping precedence order.

--

You received this message because you are subscribed to the Google Groups "Google App Engine" group.
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=.


Reply all
Reply to author
Forward
0 new messages