Are you making these calls in a task queue? There are known issues where a
timeout exception will be thrown by the Mail API even though the mail was
successfully sent - this'll cause the task to retry and resend the email.

--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger: http://googleappengine.blogspot.com
Reddit: http://www.reddit.com/r/appengine
Twitter: http://twitter.com/app_engine



On Wed, Dec 8, 2010 at 2:33 PM, byraray <[email protected]> wrote:

> When sending 1 email request using  [email protected]
> app engine send 5 extra emails replies to the same address.
>
> public class PickupMailHandlerServlet extends HttpServlet {
>
>        public static final long serialVersionUID = 1L;
>
>        public void doPost(HttpServletRequest req, HttpServletResponse resp)
>                        throws IOException {
>
>                final Logger log =
> Logger.getLogger(PickupMailHandlerServlet.class.getName());
>
>                Properties sendprops = new Properties();
>                Session session = Session.getDefaultInstance(sendprops,
> null);
>
>                try {
>
>                Message msg = new MimeMessage(session,req.getInputStream());
>
>                        String summary = msg.getSubject();
>                        String description = getText(msg);
>
>                        msg.setFrom(new InternetAddress("[email protected]",
> "me"));
>                      msg.addRecipient(Message.RecipientType.TO, new
> InternetAddress("[email protected]", ""));
>                        msg.setSubject(summary);
>                        msg.setText(description);
>                        Transport.send(msg);
>                }
>
>                catch (UnsupportedEncodingException e) {
>                        log.severe("UnsupportedEncodingException");
>                        log.severe(e.getMessage());
>                        return;
>                        }
>
>                catch (MessagingException e) {
>                        log.severe("MessagingException");
>                        log.severe(e.getMessage());
>                        return;
>                }
>
>                catch (Exception e) {
>                        log.severe("Exception");
>                        log.severe(e.getMessage());
>                        }
>        }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to