Package com.jcabi.email

Object-oriented email sending SDK.

See: Description

Package com.jcabi.email Description

Object-oriented email sending SDK.

The best way to use it is to make an instance of Postman.Default:

 Postman postman = new Postman.Default(
   new SMTP(
     new Token("user", "password").access(
       new Protocol.SMTP("smtp.gmail.com", 587)
     )
   )
 );
 postman.send(
   new Envelope.MIME(
     new Array<Stamp>(
       new StSender("Yegor Bugayenko <yegor@jcabi.com>"),
       new StRecipient("Jeff Lebowski <jeff@gmail.com>"),
       new StSubject("dude, how are you?"),
       new StBCC("my-boss@jcabi.com")
     ),
     new Array<Enclosure>(
       new EnPlain("Hi, long time no see! :) Check my pic!"),
       new EnBinary(
         new File("/tmp/picture.gif"),
         "my-picture.gif",
         "image/gif"
       )
     )
   )
 );

The only dependency you need is (check our latest version available at email.jcabi.com):

<depedency>
   <groupId>com.jcabi</groupId>
   <artifactId>jcabi-email</artifactId>
 </dependency>
Since:
1.0
Version:
$Id: 6df8573fbf99943fd662c32ba8dda55735f7d0d8 $
Author:
Yegor Bugayenko (yegor256@gmail.com)
See Also:
project website

Copyright © 2012–2017 jcabi.com. All rights reserved.