Top Fields Constructors Methods
com.mchange.net

public final Class SmtpUtils

extends Object
Class Inheritance
Imports
java.io.IOException, .BufferedReader, .BufferedOutputStream, .ByteArrayOutputStream, .DataOutputStream, .InputStreamReader, .OutputStreamWriter, .PrintWriter, .UnsupportedEncodingException, java.net.Socket, .InetAddress, java.util.Enumeration, .Properties, com.mchange.io.OutputStreamUtils, .ReaderUtils, com.mchange.net.SocketUtils

Field Summary

Modifier and TypeField and Description
private static final String
private static final int
private static final String
public static final int
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static byte[]
private static String
private static void
ensureResponse(BufferedReader br, int begin_inclusive, int end_exclusive)

public static void
main(String[] argv)

public static void
sendMail(InetAddress smtpHost, int smtpPort, String mailFrom, String[] rcptTo, Properties headers, byte[] bodyBytes)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CHARSETback to summary
private static final String CHARSET
CHARSET_LENback to summary
private static final int CHARSET_LEN
CRLFback to summary
private static final String CRLF
DEFAULT_SMTP_PORTback to summary
public static final int DEFAULT_SMTP_PORT
ENCback to summary
private static final String ENC

Constructor Detail

SmtpUtilsback to summary
private SmtpUtils()

Method Detail

bytesFromBodyStringback to summary
private static byte[] bytesFromBodyString(String body, String enc) throws UnsupportedEncodingException
encodingFromContentTypeback to summary
private static String encodingFromContentType(String contentType)
ensureResponseback to summary
private static void ensureResponse(BufferedReader br, int begin_inclusive, int end_exclusive) throws IOException, SmtpException
mainback to summary
public static void main(String[] argv)
sendMailback to summary
public static void sendMail(InetAddress smtpHost, int smtpPort, String mailFrom, String[] rcptTo, Properties headers, byte[] bodyBytes) throws IOException, SmtpException