T
- type a EmailMultiPartBuilder.Part
Typepublic class EmailMultiPartBuilder<T> extends Object
http://stackoverflow.com/questions/2996514/inline-images-in-email-using-javamail
,
http://www.rgagnon.com/javadetails/java-0504.html
,
http://java.sun.com/developer/onlineTraining/JavaMail/contents.html#IncludingImagesWithHTML
Modifier and Type | Class and Description |
---|---|
static class |
EmailMultiPartBuilder.FilePart<T> |
static class |
EmailMultiPartBuilder.ImagePart<T> |
static class |
EmailMultiPartBuilder.Part<T> |
Constructor and Description |
---|
EmailMultiPartBuilder() |
EmailMultiPartBuilder(List<EmailMultiPartBuilder.Part> parts) |
Modifier and Type | Method and Description |
---|---|
static EmailMultiPartBuilder.ImagePart<byte[]> |
createBase64ImagePartFromImageFile(File file)
BaseEncode 64 an Image file and also produce the corresponding
EmailMultiPartBuilder.ImagePart |
static byte[] |
getBase64EncodedStringForImage(File file,
String imageType) |
javax.mail.Multipart |
getMultiPartMessage(EmailMultiPartBuilder.Part.MultiPartType multiPartType) |
List<EmailMultiPartBuilder.Part> |
getParts() |
void |
setParts(List<EmailMultiPartBuilder.Part> parts) |
public EmailMultiPartBuilder()
public EmailMultiPartBuilder(List<EmailMultiPartBuilder.Part> parts)
public javax.mail.Multipart getMultiPartMessage(EmailMultiPartBuilder.Part.MultiPartType multiPartType) throws javax.mail.MessagingException
javax.mail.MessagingException
public List<EmailMultiPartBuilder.Part> getParts()
public void setParts(List<EmailMultiPartBuilder.Part> parts)
public static EmailMultiPartBuilder.ImagePart<byte[]> createBase64ImagePartFromImageFile(File file) throws IOException
EmailMultiPartBuilder.ImagePart
file
- as File
EmailMultiPartBuilder.ImagePart
IOException
public static byte[] getBase64EncodedStringForImage(File file, String imageType) throws IOException
file
- as File
for the imageimageType
- as String (png, jpg, gif etc)IOException
Copyright © 2018. All rights reserved.