首页 > 学院 > 开发设计 > 正文

开放源码-SMTP发信客户端 for Java

2019-11-18 13:50:01
字体:
来源:转载
供稿:网友

  //------------------------------------------------------------------
// //////
// // -^- //
// ( @ @ )
// +----------------------oOOo-(_)-oOOo---------------------+
//
// FREE SOFTWARE WRITEN BY NAVY, COPYLEFT (C) 2002
// SmtpClient Class 1.0
// Use smtp server with user authorization
// All rights reserved.
//
// Oooo
// +---------------------- oooO---( )---------------------+
// ( ) ) /
// / ( (_/
// /_)
//------------------------------------------------------------------


package encrypt;

import java.io.*;
import java.net.*;
import java.util.Vector;
//import org.apache.commons.logging.Log;
//import org.apache.commons.logging.LogFactory;
import encrypt.Base64;

/***
* 标准SMTP发信类
* <p>
* 标准的纯JAVA的SMTP发信客户端程序,支持用户认证。
* <p>
* <p>
* @author Naven
* @see SmtpClient
***/

public class SmtpClient
{
//PRotected static final Log log = LogFactory.getLog(SmtpClient.class);

private static final String CMD_HELO = "HELO ";
private static final String CMD_AUTH_LOGIN = "AUTH LOGIN ";
private static final String CMD_MAIL_FROM = "MAIL FROM: ";
private static final String CMD_RCPT_TO = "RCPT TO: ";
private static final String CMD_DATA = "DATA";
private static final String CMD_HELP = "HELP";
private static final String CMD_RSET = "RSET";
private static final String CMD_NOOP = "NOOP";
private static final String CMD_QUIT = "QUIT";
private static final String END_OF_MAIL = "/r/n./r/n";

private static final String RCV_SERVOK = "220"; // 220 服务就绪
private static final String RCV_HELO = "250"; // 250 要求的邮件操作完成
private static final String RCV_AUTH_LOGIN = "334";
private static final String RCV_AUTH_USER = "334";
private static final String RCV_AUTH_PASSWD = "334";
private static final String RCV_AUTH_OK = "235";

上一篇:精通ejb(8)

下一篇:介绍访问控制

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表