Any help please. I'm trying to send email from my servlet. I
basically copied the code from the gae site. Im setting the from
address as the admin of the gae account (fyi also tried a normal gmail
account). In the admin console its saying the mails were sent, but Im
not seeing the email on the receiving end. Also there are no
exceptions being logged. my code is below.
Properties props = new Properties();
Session session = Session.getDefaultInstance(props, null);
StringBuffer sb = new StringBuffer();
sb.append("Name: " + name);
sb.append("Email: " + email);
sb.append("Phone: " + phone);
sb.append("Message: " + message);
try {
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress
("[email protected]"));
msg.setRecipient(Message.RecipientType.TO, new
InternetAddress("[email protected]"));
msg.setSubject("Contact Us Website Request");
msg.setText(sb.toString());
Transport.send(msg);
} catch (Exception e) {
Logger log = Logger.getLogger("Greg");
log.severe("Sending Mail Exception");
log.severe(e.getMessage());
}
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" 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?hl=en.