JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.795

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
com.amazonaws.services.simpleemail

Class AWSJavaMailTransport



  • public class AWSJavaMailTransport
    extends Transport
    A transport implementation using Amazon Web Service's E-mail Service. For JavaMail purposes this transport implementation uses the "aws" protocol. In order to send messages through the E-mail Service your AWS Credentials (http://aws.amazon.com/security-credentials) need to be either in the JavaMail Session's Properties (mail.aws.user and mail.aws.password), passed into the connect() method, or set in the Session's setPasswordAuthentication method. Parameters passed into the connect method as well as PasswordAuthentication information supersedes the properties field for a particular session. When connecting your AWS Access Key is your username and your AWS Secret Key is your password.

    This transport implementation only accepts MIME encoded messages (see MimeMessage class) and RFC822 E-mail addresses (see InternetAddress class).

    • Constructor Detail

      • AWSJavaMailTransport

        public AWSJavaMailTransport(Session session,
         URLName urlname)
    • Method Detail

      • sendMessage

        public void sendMessage(Message msg,
         Address[] addresses)
         throws MessagingException,
         SendFailedException
        Sends a MIME message through Amazon's E-mail Service with the specified recipients. Addresses that are passed into this method are merged with the ones already embedded in the message (duplicates are removed).
        Parameters:
        msg - A Mime type e-mail message to be sent
        addresses - Additional e-mail addresses (RFC-822) to be included in the message
        Throws:
        MessagingException
        SendFailedException
      • close

        public void close()
         throws MessagingException
        Throws:
        MessagingException
      • getLastMessageId

        public String getLastMessageId()

        The unique message identifier ot the last message sent by sendMessage

        Returns:
        The unique message identifier sent by the last sendMessage action.
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /