当前位置: 技术问答>java相关
請問在JavaMail中如何判斷Message中有附件﹖謝謝﹗﹗
来源: 互联网 发布时间:2015-02-19
本文导语: | /* * @(#)msgshow.java 1.18 98/10/28 * * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved. * */ import java.util.*; import java.io.*; import javax.mail.*; import javax.mail.internet.*; import javax.activation.*; /* * Demo app that...
|
/*
* @(#)msgshow.java 1.18 98/10/28
*
* Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
*
*/
import java.util.*;
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
/*
* Demo app that exercises the Message interfaces.
* Show information about and contents of messages.
*
* @author John Mani
* @author Bill Shannon
*/
public class msgshow {
static String protocol;
static String host = null;
static String user = null;
static String password = null;
static String mbox = "INBOX";
static String url = null;
static int port = -1;
static boolean verbose = false;
static boolean debug = false;
public static void main(String argv[]) {
int msgnum = -1;
int optind;
for (optind = 0; optind
* @(#)msgshow.java 1.18 98/10/28
*
* Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
*
*/
import java.util.*;
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
/*
* Demo app that exercises the Message interfaces.
* Show information about and contents of messages.
*
* @author John Mani
* @author Bill Shannon
*/
public class msgshow {
static String protocol;
static String host = null;
static String user = null;
static String password = null;
static String mbox = "INBOX";
static String url = null;
static int port = -1;
static boolean verbose = false;
static boolean debug = false;
public static void main(String argv[]) {
int msgnum = -1;
int optind;
for (optind = 0; optind