Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is the working code referred from <a href="https://developers.google.com/appengine/docs/java/mail/usingjavamail" rel="nofollow">developers.google.com</a></p> <pre><code>public String sendMail(String from, String to, String replyTo, String subject, String message) { String output=null; Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); try { Message msg = new MimeMessage(session); msg.setFrom(new InternetAddress(from, "Gmail.com Admin")); msg.addRecipient(Message.RecipientType.TO, new InternetAddress(to, "Mr. User")); msg.setSubject(subject); msg.setText(message); msg.setReplyTo(new InternetAddress[]{new InternetAddress(replyTo)}); Transport.send(msg); } catch (Exception e) { output=e.toString(); } return output; } </code></pre> <p>By the reference from <a href="https://developers.google.com/appengine/docs/java/mail/usingjavamail" rel="nofollow">developers.google.com</a>, the sender address (<code>from</code>) must be one of the following types:</p> <ul> <li>The address of a registered administrator for the application</li> <li>The address of the user for the current request signed in with a Google Account. You can determine the current user's email address with the Users API. The user's account must be a Gmail account, or be on a domain managed by Google Apps.</li> <li><p>Any valid email receiving address for the app (such as xxx@APP-ID.appspotmail.com).</p> <p>I tried it and it works in a hosted <em>gwt</em> application.</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload