Package i2p.susi.webmail.smtp
Class SMTPClient
java.lang.Object
i2p.susi.webmail.smtp.SMTPClient
public class SMTPClient extends Object
- Author:
- susi
-
Field Summary
Fields Modifier and Type Field Description static long
BINARY_MAX_SIZE
About 23.25 MB.static long
DEFAULT_MAX_SIZE
31.84 MB smtp.postman.i2p as of 2017-12.String
error
-
Constructor Summary
Constructors Constructor Description SMTPClient()
-
Method Summary
Modifier and Type Method Description boolean
sendMail(String host, int port, String user, String pass, String sender, String[] recipients, StringBuilder body, List<Attachment> attachments, String boundary)
static void
writeMail(Writer out, StringBuilder body, List<Attachment> attachments, String boundary)
Caller must close out
-
Field Details
-
DEFAULT_MAX_SIZE
public static final long DEFAULT_MAX_SIZE31.84 MB smtp.postman.i2p as of 2017-12.- Since:
- 0.9.33
- See Also:
- Constant Field Values
-
BINARY_MAX_SIZE
public static final long BINARY_MAX_SIZEAbout 23.25 MB. Base64 encodes 57 chars to 76 + \r\n on a line- Since:
- 0.9.33
- See Also:
- Constant Field Values
-
error
-
-
Constructor Details
-
SMTPClient
public SMTPClient()
-
-
Method Details
-
sendMail
public boolean sendMail(String host, int port, String user, String pass, String sender, String[] recipients, StringBuilder body, List<Attachment> attachments, String boundary)- Parameters:
body
- headers and body, without the attachmentsattachments
- may be nullboundary
- non-null if attachments is non-null- Returns:
- success
-
writeMail
public static void writeMail(Writer out, StringBuilder body, List<Attachment> attachments, String boundary) throws IOExceptionCaller must close out- Parameters:
body
- headers and body, without the attachmentsattachments
- may be nullboundary
- non-null if attachments is non-null- Throws:
IOException
-