最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
简单的收信的例子:SimpleReceiver
时间:2022-07-02 18:12:22 编辑:袖梨 来源:一聚教程网
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
import java.io.*;
/**
* A simple email receiver class.
*/
public class SimpleReceiver{
/**
* Main method to receive messages from the mail server specified
* as command line arguments.
*/
public static void main(String args[]){
try{
String popServer=args[0];
String popUser=args[1];
String popPassword=args[2];
receive(popServer, popUser, popPassword);
}catch (Exception ex){
System.out.println("Usage: java com.lotontech.mail.SimpleReceiver"+" popServer popUser popPassword");
}
System.exit(0);
}
/**
* "receive" method to fetch messages and process them.
*/
public static void receive(String popServer, String popUser, String popPassword){
Store store=null;
Folder folder=null;
try{
// -- Get hold of the default session --
Properties props = System.getProperties();
import javax.mail.internet.*;
import java.util.*;
import java.io.*;
/**
* A simple email receiver class.
*/
public class SimpleReceiver{
/**
* Main method to receive messages from the mail server specified
* as command line arguments.
*/
public static void main(String args[]){
try{
String popServer=args[0];
String popUser=args[1];
String popPassword=args[2];
receive(popServer, popUser, popPassword);
}catch (Exception ex){
System.out.println("Usage: java com.lotontech.mail.SimpleReceiver"+" popServer popUser popPassword");
}
System.exit(0);
}
/**
* "receive" method to fetch messages and process them.
*/
public static void receive(String popServer, String popUser, String popPassword){
Store store=null;
Folder folder=null;
try{
// -- Get hold of the default session --
Properties props = System.getProperties();
相关文章
- 碧蓝航线的里雅斯特期待的便当时间皮肤有什么 04-30
- 明日之后踏浪逐星服装展示攻略 04-30
- 深空之眼幽月塞勒涅刻印搭配核心思路 04-30
- 明日之后红杉茶会护卫队首领BOSS有哪些 04-30
- CF手游段位奖励汇总攻略 04-30
- 无期迷途5-13怎么走攻略 04-30