README for the demo programs in this directory
==============================================
These demo programs illustrate how to use the JavaMail API to
perform a number of common email functions. Note these these
programs are not intended to be examples of good user interfaces,
or good command line interfaces. No one is expected to actually
*use* these programs for anything real. Rather, their value is
in the source code. Don't look at their command line arguments
or user interface to figure out what JavaMail can do, look at
their source code. We strongly recommend that you read the
source code and understand what these programs are doing before
running them.
All of these programs are simple command line tools with a UNIX
style interface. On Windows you'll need to run them in an MS-DOS
window. We apologize in advance for the inconsistency in how these
programs accept options. There are generally two styles. The very
simple style (e.g., as used by copier.java) requires a fixed number
of arguments in a fixed order. Others (e.g., folderlist.java) take
UNIX-style options, many of which are optional, and which may appear
in any order. The following notes should help you figure it out,
but if in doubt, read the source code.
- copier.java
This program copies the specified messages from one folder to
another. Both folders must belong to the same store.
Usage:
java copier <urlname> <src> <dest> <start> <end>
Arguments (in order):
<urlname> : URL of the Store. The URL should include
the password as well (if needed).
Example: "imap://john:password@mailstore.com"
<src> : source folder
<dest> : destination folder
<start> : start message number
<end> : end message number
- folderlist.java
This program lists information about the folders in a Store.
Usage:
java folderlist -L <url> -T <protocol> -H <host> -U <user> -P <passwd>
[-R <root>] [-r] [-v] [-D] <pattern>
Options:
-L <url> : URL of the Store. The URL should include
the password as well (if needed).
Example: "imap://john:password@mailstore.com"
-T <protocol> : store protocol (Ex: "imap")
-H <host> : hostname of store.
-U <user> : username (if needed)
-P <passwd> : password (if needed)
-R <root> : root of the folder hierarchy. This is optional. If
not present, listing starts from the default folder.
-r : list recursively - folder and all subfolders.
-v : verbose - show more info about each folder.
-D : Turn on session debugging
<pattern> : folders that match this pattern are listed. Use "*"
as wildcard to match everything.
- monitor.java
Illustrates how to monitor a folder for interesting events,
like new mail arrival.
Usage:
java monitor <host> <user> <password> <mbox> <freq>
Arguments (in order):
<host> : hostname of store.
<user> : username (if needed)
<passwd> : password (if needed)
<mbox> : folder to monitor
<freq> : frequency of monitoring
- mover.java
Moves messages between folders. The folders must belong to the
same store.
Usage:
java mover -T <protocol> -H <host> -U <user> -P <passwd> [-v]
-s <src> -d <dest> [-x] <start> <end>
Options:
-T <protocol> : store protocol (Ex: "imap")
-H <host> : hostname of store.
-U <user> : username (if needed)
-P <passwd> : password (if needed)
-s <src> : source folder
-d <dest> : destination folder
-v : Optional verbose option
-x : Optional expunge option, to expunge the deleted
messages from src
Arguments (in order):
<start> : start message number
<end> : end message number
- msgmultisendsample.java
Demonstrates how to construct and send a multipart message.
Usage:
java msgmultisendsample <to> <from> <smtphost> true|false
Arguments (in order):
<to> : Recipient address
<from> : Sender address
<smtphost> : name of SMTP server
true|false : "true" to turn on session debugging, "false" otherwise
- msgsend.java
Send a simple text message. Optionally saves a copy
of the outgoing message in a folder (record-folder).
Most parameters to this program are optional. When
the program is run, it interactively asks for
the "To" and "Subject" fields if not already available.
Then the program expects the body of the message.
After you type in the body, hit Ctrl-D on Unix
systems or Ctrl-Z on Windows systems to send
the message.
Usage:
java msgsend -L <store-url> -T <protocol> -H <host> -U <user>
-P <passwd> -s <subject> -o <from> -c <cc> -b <bcc>
-f <record> -M <smtphost> [-d] <to>
Options:
-L <store-url> : URL of the store for the record-folder
-T <protocol> : If <store-url> is not present, this indicates
the store protocol for the record-folder.
-H <host> : If <store-url> is not present, this indicates
the hostname for the record-folder.
-U <user> : If <store-url> is not present, this indicates
the username for the record-folder.
-P <passwd> : If <store-url> is not present, this indicates
the password for the record-folder.
-f <record> : name of record-folder.
-M <smtphost> : Host name of SMTP server. Defaults to "localhost"
which often works on UNIX but rarely on Windows.
-s <subject> : Subject of message to be sent
-o <from> : From address of message to be sent
-c <cc> : Cc address of message to be sent
-b <bcc> : Bcc address of message to be sent
-d : Turn on session debugging.
-a <file> : Include file as an attachment with the message
Argument:
<to> : To address of message to be sent
- msgsendsample.java
Demonstrates how to construct and send a simple text message.
Usage:
java msgsendsample <to> <from> <smtphost> true|false
Arguments (in order):
<to> : Recipient address
<from> : Sender address
<smtphost> : name of SMTP server
true|false : "true" to turn on session debugging, "false" otherwise
- msgshow.java
Displays message(s) from a folder or from stdin.
Usage:
java msgshow -L <url> -T <protocol> -H <host> -p <port>
-U <user> -P <password> -f <mailbox>
[-D] [-s] [-S] [-a] [-v] [msgnum]
java msgshow -m [-D] [-s] [-S] [-v]
Options:
-L <url> : URL of the Store. The URL should include
the password as well (if needed).
Example: "imap://john:password@mailstore.com"
-T <protocol> : If <url> is not present, this indicates
the store protocol
-H <host> : If <url> is not present, this indicates
the hostname
-p <port> : If <url> is not present, this indicates
the port number (usually not needed)
-U <user> : If <url> is not present, this indicates
the username
-P <passwd> : If <url> is not present, this indicates
the password
-f <mailbox> : Folder to open
-m : Read message from standard input
-D : Turn on session debugging
-s : Show the structure of the message, but not the contents
-S : Save attachments to appropriately named files
-a : Show ALERTS and NOTIFICATIONS from the Store
-v : Verbose mode - show total messages and number of new messages
Argument:
<msgnum> : the message to be displayed. If this
parameter is not present, all messages in the
folder are displayed.
- namespace.java
Displays the namespaces supported by a store.
Usage:
java namespace -L <url> -T <protocol> -H <host> -p <port>
-U <user> -P <password> [-D]
Options:
-L <url> : URL of the Store. The URL should include
the password as well (if needed).
Example: "imap://john:password@mailstore.com"
-T <protocol> : If <url> is not present, this indicates
the store protocol
-H <host> : If <url> is not present, this indicates
the hostname
-p <port> : If <url> is not present, this indicates
the port number (usually not needed)
-U <user> : If <url> is not present, this indicates
the username
-P <passwd> : If <url> is not present, this indicates
the password
-D : Turn on session debugging
- populate.j
没有合适的资源?快使用搜索试试~ 我知道了~
javamail实现群发邮件
共134个文件
class:52个
java:39个
jsp:9个
4星 · 超过85%的资源 需积分: 16 118 下载量 170 浏览量
2010-11-02
09:21:41
上传
评论 1
收藏 1.1MB RAR 举报
温馨提示
运行 src\mail\MailTest.java类。 其他包是集成的官方javamail接口类型 有兴趣请参考!
资源推荐
资源详情
资源评论
收起资源包目录
javamail实现群发邮件 (134个子文件)
JavaMailServlet.class 18KB
msgshow.class 12KB
smtpsend.class 9KB
uidmsgshow.class 9KB
search.class 9KB
transport.class 7KB
MailHandlerDemo.class 7KB
sendhtml.class 6KB
msgsend.class 6KB
populate.class 5KB
MessageViewer.class 5KB
folderlist.class 5KB
SimpleClient.class 5KB
mover.class 5KB
SimpleMailSender.class 5KB
registry.class 5KB
FileErrorManager.class 4KB
MultipartViewer.class 4KB
namespace.class 4KB
msgsendsample.class 4KB
SimpleAuthenticator.class 4KB
msgmultisendsample.class 3KB
sendfile.class 3KB
MailSenderInfo.class 3KB
FolderModel.class 3KB
MailTest.class 3KB
SummaryFormatter.class 3KB
SummaryNameFormatter.class 3KB
MessageViewer$StructureAction.class 3KB
monitor.class 2KB
copier.class 2KB
StoreTreeNode.class 2KB
TextViewer.class 2KB
FolderViewer.class 2KB
Tx.class 2KB
monitor$1.class 2KB
FolderTreeNode.class 2KB
MailHandlerDemo$LevelAndSeqComparator.class 2KB
NewlineOutputStream.class 1KB
FolderViewer$FolderPressed.class 1KB
CRLFOutputStream.class 1KB
TreePress.class 1KB
MailUserData.class 1KB
msgshow$1.class 1KB
MultipartViewer$AttachmentViewer.class 1KB
ComponentFrame.class 934B
MailHandlerDemo$MessageErrorsFilter.class 814B
FileErrorManager$1.class 781B
MyAuthenticator.class 752B
MailHandlerDemo$1.class 723B
SimpleClient$1.class 618B
SimpleAuthenticator$1.class 571B
.classpath 631B
org.eclipse.wst.common.component 422B
org.eclipse.wst.jsdt.ui.superType.container 49B
JavaMail.html 5KB
JavaMail.html 5KB
index.html 4KB
mail.jar 451KB
mailapi.jar 244KB
imap.jar 169KB
smtp.jar 44KB
pop3.jar 35KB
dsn.jar 18KB
jtl.jar 1014B
JavaMailServlet.java 21KB
msgshow.java 12KB
MailHandlerDemo.java 12KB
smtpsend.java 11KB
FileErrorManager.java 9KB
uidmsgshow.java 9KB
search.java 8KB
transport.java 8KB
populate.java 7KB
msgsend.java 7KB
sendhtml.java 7KB
MessageViewer.java 7KB
registry.java 7KB
SimpleMailSender.java 6KB
folderlist.java 6KB
mover.java 6KB
SimpleClient.java 5KB
MultipartViewer.java 5KB
namespace.java 5KB
sendfile.java 5KB
SimpleAuthenticator.java 5KB
msgsendsample.java 5KB
FolderModel.java 4KB
monitor.java 4KB
msgmultisendsample.java 4KB
SummaryNameFormatter.java 4KB
StoreTreeNode.java 4KB
copier.java 4KB
FolderTreeNode.java 4KB
SummaryFormatter.java 3KB
FolderViewer.java 3KB
TextViewer.java 3KB
MailSenderInfo.java 3KB
CRLFOutputStream.java 3KB
NewlineOutputStream.java 3KB
共 134 条
- 1
- 2
UFO
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 直接插入排序,冒泡排序,直接选择排序.zip
- 在排序2的基础上,再次对快排进行优化,其次增加快排非递归,归并排序,归并排序非递归版.zip
- 实现了7种排序算法.三种复杂度排序.三种nlogn复杂度排序(堆排序,归并排序,快速排序)一种线性复杂度的排序.zip
- 冒泡排序 直接选择排序 直接插入排序 随机快速排序 归并排序 堆排序.zip
- 课设-内部排序算法比较 包括冒泡排序、直接插入排序、简单选择排序、快速排序、希尔排序、归并排序和堆排序.zip
- Python排序算法.zip
- C语言实现直接插入排序、希尔排序、选择排序、冒泡排序、堆排序、快速排序、归并排序、计数排序,并带图详解.zip
- 常用工具集参考用于图像等数据处理
- 音乐展示网页、基于Stenography的图像数字水印添加与提取,以及基于颜色矩和Tamura算法的图像相似度评估算法py源码
- 基于EmguCV(OpenCV .net封装),图像数字水印加解密算法的实现,其中包含最低有效位算法,离散傅里叶变换算法+文档书
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
前往页