最新下载
热门教程
- 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();
相关文章
- 比特币突破10.5万美元大关:在地缘政治动荡中长期持有者筑牢市场稳定基石 06-15
- 奇迹暖暖第二卷第四章套装有哪些攻略 06-15
- 明日之后步枪兵技能怎么点攻略 06-15
- 奇迹暖暖花语藤蔓午夜玫瑰获得方式有哪些 06-15
- 深空之眼Roguelike模式多维变量怎么样 06-15
- SQD币怎么操作?2025OKX交易所新手投资 06-15