I know I must be doing something really simple wrong here, but I
followed the example (http://code.google.com/appengine/docs/java/mail/
overview.html) for sending mail through GAE and I getting:
WARNING: /invoiceactions.do
java.lang.NoClassDefFoundError: java.net.InetAddress is a restricted
class. Please see the Google App Engine developer's guide for more
details.
at
com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:
51)
at
javax.mail.internet.InternetAddress.getLocalAddress(InternetAddress.java:
479)
at
javax.mail.internet.UniqueValue.getUniqueMessageIDValue(UniqueValue.java:
75)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:
1933)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1911)
My code looks like (email addresses have been changed to protect the
innocent):
java.util.Properties props = new Properties();
Session session = Session.getDefaultInstance(props, null);
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress("[email protected]", "Admin"));
msg.addRecipient(Message.RecipientType.TO, new
InternetAddress("[email protected]", "Bob"));
msg.setSubject("Invoice Payment Email");
msg.setText(writer.toString());
Transport.send(msg);
pm.close();
Thanks!
Shaun
Any ideas? Thanks!
--
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.