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
没有合适的资源?快使用搜索试试~ 我知道了~
jdev.rar_java 短信 邮件_jdev_短信_签名_邮件
共561个文件
class:356个
java:160个
jar:13个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 138 浏览量
2022-09-24
13:59:05
上传
评论
收藏 9.53MB RAR 举报
温馨提示
短信发送,邮件发送,基于myeclipse开发环境
资源推荐
资源详情
资源评论
收起资源包目录
jdev.rar_java 短信 邮件_jdev_短信_签名_邮件 (561个子文件)
sms.bat 755B
server.bat 603B
email.bat 601B
dbreader.bat 597B
client.bat 579B
SmtpMailSender.class 18KB
UtilValidate.class 17KB
UtilValidate.class 17KB
SmtpMailSender.class 15KB
msgshow.class 11KB
msgshow.class 11KB
StringUtil.class 11KB
StringUtil.class 11KB
RSATools.class 10KB
RSATools.class 10KB
MimeTypeFactory.class 9KB
MimeTypeFactory.class 9KB
smtpsend.class 8KB
smtpsend.class 8KB
UtilCache.class 8KB
uidmsgshow.class 8KB
UtilCache.class 8KB
uidmsgshow.class 8KB
search.class 8KB
Debug.class 8KB
search.class 8KB
ConnectPool.class 8KB
ConnectPool.class 8KB
Debug.class 8KB
ConcreateDataAccessor.class 8KB
ConcreateDataAccessor.class 8KB
DataAccess.class 7KB
DataAccess.class 7KB
UtilDateTime.class 7KB
UtilDateTime.class 7KB
DbReader.class 7KB
DbReader.class 7KB
EmailClient.class 7KB
EmailClient.class 7KB
FidsClient.class 7KB
DbClient.class 7KB
DesedeTools.class 7KB
FidsClient.class 7KB
DbClient.class 7KB
DesedeTools.class 6KB
transport.class 6KB
transport.class 6KB
sendhtml.class 6KB
Consumer.class 6KB
Consumer.class 6KB
sendhtml.class 6KB
msgsend.class 6KB
msgsend.class 6KB
EmailQueueHelper.class 6KB
EmailQueueHelper.class 6KB
XMLFilterBase.class 6KB
XMLFilterBase.class 6KB
XMLProperties.class 5KB
XMLProperties.class 5KB
populate.class 5KB
populate.class 5KB
ReadMailText.class 5KB
ConnectPool$DBConnectionPool.class 5KB
ReadMailText.class 5KB
SimpleClient.class 5KB
MessageViewer.class 5KB
MessageViewer.class 5KB
SimpleClient.class 5KB
ConnectPool$DBConnectionPool.class 5KB
folderlist.class 5KB
FileUtil.class 5KB
folderlist.class 5KB
registry.class 5KB
FileUtil.class 5KB
mover.class 5KB
registry.class 5KB
SMSDaoImpl.class 5KB
mover.class 5KB
EmailPush.class 5KB
EmailPush.class 5KB
TcpHelper.class 4KB
TcpHelper.class 4KB
TcpClient.class 4KB
TcpClient.class 4KB
SocketDataHelper.class 4KB
SocketDataHelper.class 4KB
DbUtil.class 4KB
MultipartViewer.class 4KB
DbUtil.class 4KB
MultipartViewer.class 4KB
SmsQueueHelper.class 4KB
SmsQueueHelper.class 4KB
namespace.class 4KB
PoolMan.class 4KB
FidsQueueHelper.class 4KB
namespace.class 4KB
PoolMan.class 4KB
FidsQueueHelper.class 4KB
MailFetch.class 4KB
MailFetch.class 4KB
共 561 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
四散
- 粉丝: 49
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功