当前位置: 技术问答>java相关
哪位大虾知道在JSP中如何下载邮件的附件,用JAVAMAIL
来源: 互联网 发布时间:2015-01-10
本文导语: | 看dumpPart()部分,如果是一个流就把他写到response.getOutputStream() /* * @(#)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.*; i...
|
看dumpPart()部分,如果是一个流就把他写到response.getOutputStream()
/*
* @(#)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