marcosvidolin / messagefy

✉️ This is a very small helper java library to easily build a JavaMail MIME object (javax.mail.internet.MimeMessage).

Repository from Github https://github.commarcosvidolin/messagefyRepository from Github https://github.commarcosvidolin/messagefy

Messagefy

Codacy Badge Build Status Download

This is a very small helper java library to easily build a JavaMail MIME object (javax.mail.internet.MimeMessage).

To add Messagefy on your project:

Messagefy is release by publishing in to the JCenter. So add the following configuration to your "build.gradle".

repositories {
    ...
    jcenter()
}

Maven:

<dependency>
	<groupId>com.vidolima</groupId>
	<artifactId>messagefy</artifactId>
	<version>1.1.1</version>
	<type>pom</type>
</dependency>

Gradle:

dependencies {
  compile 'com.vidolima:messagefy:1.1.1'
}

Getting started

Example:

 Messagefy messagefy = new Messagefy.Builder()
       .from("sender@sender.com")
       .to("vidolima@vidolima.com")
       .subject("Messagefy")
       .content("Hello Messagefy!")
       .build();
       
javaMailSender.send(messagefy.getMailMessage());

More Options

Attribute Type Description
attachment byte[] The file to be attached to the message.
attachmentMimeType String Attachment MIME type.
attachmentName String Attachment name. Default name is "Untitled".
ccList Collection List of "Cc" (carbon copy) recipients.
content String The Message's content to a Multipart object.
contentType String The Message's Content Type. Default content type is "text/html".
from String The sender e-mail.
senderName String The sender name.
subject String The Message's subject.
toList Collection List of "To" (primary) recipients.

License

Messagefy is released under the terms of the MIT License.

Contributors

About

✉️ This is a very small helper java library to easily build a JavaMail MIME object (javax.mail.internet.MimeMessage).

License:MIT License


Languages

Language:Java 100.0%