View RSS Feed

Mail Message

  1. Sending Mail with Attachments

    by , 04-25-2012 at 09:37 PM
    There could be no or more than one file attachments present with an outgoing message.
    File data and file name is present with an attachment. File data may be extracted from some source like data store or application data file. Attachmentís MIME type is determined by the filename.

    Below is given MIME types list and also their file name extensions which are permitted for the attachments, to an email. You are not just bound to such extensions. If an unknown extension is used, ...
  2. Receiving Mail

    by , 04-25-2012 at 09:36 PM
    Email could be received by your application at such kind of addresses.

    string@appid.appspotmail.com

    It shall be noted that even application gets deployed at the customized domain, application couldnít get the mail that has been sent to those addresses which are present at that domain.

    To applications, email messages are being sent as HTTP requests. Such requests are basically generated by the help of app Engine and are being posted to the applications. ...
    Categories
    Mail Message
  3. Email Multi-Part Messages

    by , 04-25-2012 at 09:33 PM
    Message could be sent with text, HTML message body or file attachment by using multi part messages. MimeMultipart object can be created to hold parts, then MimeBodyPart objects are created for every attachment/ message body and added to container. Lastly, container is assigned to MimeMessage content.

    Java Code:
    import javax.activation.DataHandler;
    import javax.mail.Multipart;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMultipart;
    ...
  4. Email Senders and Recipients

    by , 04-25-2012 at 09:31 PM
    Recipient and sender of email addresses are presented in JavaMail, by InternetAddress class instances. Email addresses are taken by the constructor as a string, & AddressException are raised when there is no resemblance b/w valid email address and address. Personal name is provided as a string, for 2nd parameter.
    Sender address could be set by calling setForm() method, at MimeMessage object. Sender address has these given types:
    • Registered administrationís address, for application.
    • Userís
    ...
  5. Sending Email Messages

    by , 04-25-2012 at 09:28 PM
    A MimeMessage object is prepared by an application so that to send email. Email is sent along with static method send(), on Transport class. JavaMail session object is used to create the message. Transport and session work along with App Engine Mail service, with no extra configuration.

    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.AddressException; ...
    Categories
    Mail Message