MailService (Google App Engine API for Java)

com.google.appengine.api.mail

Interface MailService



  • public interface MailService
    The MailService provides a way for user code to send emails to arbitrary destinations.
    • Method Detail

      • send

        void send(MailService.Message message)
           throws java.io.IOException
        Sends a mail that has been prepared in a MailService.Message.

        The message will be delivered asynchronously, and delivery problems will result in a bounce to the specified sender.

        Sender and at least one of the collections for to, cc, bcc must not be null.

        Parameters:
        message - The message to be sent.
        Throws:
        java.lang.IllegalArgumentException - when incorrect arguments are passed.
        java.io.IOException - on internal delivery errors.
      • sendToAdmins

        void sendToAdmins(MailService.Message message)
                   throws java.io.IOException
        Send an email alert to all admins of an application.

        The message will be delivered asynchronously, and delivery problems will result in a bounce to the admins.

        The content of the to, cc, bcc fields should be null.

        Parameters:
        message - The message to be sent.
        Throws:
        java.lang.IllegalArgumentException - when incorrect arguments are passed.
        java.io.IOException - on internal delivery errors.