Class SMTPClient

java.lang.Object
i2p.susi.webmail.smtp.SMTPClient

public class SMTPClient extends Object
Author:
susi
  • Field Details

    • DEFAULT_MAX_SIZE

      public static final long DEFAULT_MAX_SIZE
      31.84 MB smtp.postman.i2p as of 2017-12.
      Since:
      0.9.33
      See Also:
    • BINARY_MAX_SIZE

      public static final long BINARY_MAX_SIZE
      About 23.25 MB. Base64 encodes 57 chars to 76 + \r\n on a line
      Since:
      0.9.33
      See Also:
    • error

      public String 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 attachments
      attachments - may be null
      boundary - non-null if attachments is non-null
      Returns:
      success
    • writeMail

      public static void writeMail(Writer out, StringBuilder body, List<Attachment> attachments, String boundary) throws IOException
      Caller must close out
      Parameters:
      body - headers and body, without the attachments
      attachments - may be null
      boundary - non-null if attachments is non-null
      Throws:
      IOException