Hi everyone,

I am trying to make my simple application send mails to myself.
I copied the example code from Mail API and it throws the following 
exception:

javax.servlet.ServletContext log: Exception while dispatching incoming RPC 
> call
> com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public 
> abstract int 
> com.pablo.pabloweb.client.communication.SendEmailService.send(java.lang.String)'
>  
> threw an unexpected exception: 
> com.google.apphosting.api.ApiProxy$FeatureNotEnabledException: The Socket 
> API will be enabled for this application once billing has been enabled in 
> the admin console.
> at 
> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:389)
> at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:579)
> at 
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
> at 
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
> ....


My question is: is there any way to use Mail API without setting up billing 
details?
My application is not likely to overtake the limit, by any means.. 

In case it is needed, this is the code which causes the exception:
        public boolean actualSend(String msgText, String subject) {
    Properties props = new Properties();
    Session session = Session.getDefaultInstance(props, null);
     try {
        Message msg = new MimeMessage(session);
        msg.setFrom(new InternetAddress("admin-gmail-email-address"));
        msg.addRecipient(Message.RecipientType.TO,
                         new 
InternetAddress("another-personal-email-address"));
        msg.setSubject(subject);
        msg.setText(msgText);
        Transport.send(msg);
        return true;
    } catch (AddressException e) {
     return false;
    } catch (MessagingException e) {
     return false;
    }
}

Thanks in advance!

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to