For an easy confirmation Please set and execute x...@gmail.com by which setFrom/setRecipient logged in both dashboards of GAE. In this way I was able to send things to normal.
please try. thanks. On 12月13日, 午後1:51, GregD <greg.du...@gmail.com> wrote: > 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 > ("ad...@mygaeaccount.com")); > msg.setRecipient(Message.RecipientType.TO, new > InternetAddress("g...@mygaeaccount.com")); > 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 google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.