1. Introduction to javamail API
Javamail API is a set of standard development kits provided by Sun to facilitate Java developers to send and receive emails in applications. It supports common mail protocols, such: SMTP, POP3, IMAP, and mime. When developers use the javamail
(parameter: TRUE)
As long as the previous practice, here will not wordy, ... omitted here .... 1w Word .....
JavaMail API Series:
JavaMail Email Demo Email-Basic Combat
JavaMail e-Mail Demo email-Intermediate Combat article "new attachment Sending method"
Javamail simulate mailbox function-delete mails-intermediate practice-[mail Tag Method] (javamail API email instance), javamailapi
Preface:
JavaMail jar package:Http://java.sun.com/products/javamail/downloads/index.html
This chapter may be the last article to explain
JavaBeans activation framework, because this framework is the javamail APIYes. If we use J2EE, we do not need to download javamail separately because it exists in J2EE. jar, and we only need to add J2EE. jarClasspath.
2. Install JavaBeans activation frameworkFrom http://java.sun.com/products/javans/glasgow/jaf.htmlLoad JavaBeans activation framework and add it t
common mail protocols such as SMTP, POP3, and IMAP. When developers use the JavaMail API to write mail processing software, they do not need to consider the implementation details of the underlying message protocol, just call the corresponding API class in the JavaMail development package.
Second,
directory for each user who uses this messaging system for a long time occupies a lot of space. This will directly cause a spike in disk space on the mail server.4.mime:mime is not a protocol for sending messages, it defines the format of the message content as an extension of a multipurpose message: The format of the message, the format of the attachment, and so on. Some RFC standards involve MIME:RFC 822, RFC 2045, RFC 2046, RFC 2047, and interested matrixer can read about it. As developers o
Using the JavaMail API provided by Sun, you can easily develop mail-sending programs. You may already be able to use it to send a simple text, but do you want to make your program send attachments like Outlook? After a brief introduction of JavaMail, this article explains in detail a complete messenger JavaBean and a very lightweight servlet.
(Readers without lo
With the development of Internet and the popularization of computer application, e-mail is becoming an important way of communication. At present, there are a variety of development tools that can be used to prepare mail-sending programs, which are easiest to use JavaMail API programming. This article provides a complete example of how to use the JavaMail
The program makes use of the JavaMail API provided by Sun Company to develop mail-sending programs easily. You may already be able to use it to send a simple text, but do you want to make your program send attachments like Outlook? After a brief introduction of JavaMail, this article explains in detail a complete messenger JavaBean and a very lightweight servlet.
Use JavaMail to send mail, required jar packs (please download JavaMail source file, official download page: http://www.oracle.com/technetwork/java/javamail/index-138643.html):Mailapi.jar. Defines the interface API used to send an
whether to update folder after the operation email is deleted.
H. Proceed!After explaining the definition and understanding of the above seven Java mail core classes and the simple code snippets, the following describes in detail how to use these classes to implement the advanced functions required by the javamail API.
5. Use javamail APIAfter clarifying how the
A: condition must download Sun's javamail API package, address: http://java.sun.com/products/javamail/
I use version 1.2 here and add the relevant package (JAR file) to classpath.
II. This program is very simple, and we don't need to consider a lot of ground layer things, because the
This article describes a method for sending and receiving messages based on the JavaMail API. Share to everyone for your reference. Specifically as follows:
The 1.JavaMail API can usually be divided into three main categories according to its function division
(1) The Api:message class for creating and parsing mail c
In my previous article "Use JavaMail and JSP combined to write a simple e-mail delivery system," introduced the JavaMail and JSP in combination with the method. In fact, the JavaMail API is a fairly large system, only then a small text is not able to introduce the end of JavaMail
. addbodypart (messagebodypart); // create and fill part for the forwarded contentmessagebodypart = new mimebodypart (); messagebodypart. setdatahandler (message. getdatahandler (); // Add part to multi partmultipart. addbodypart (messagebodypart); // associate multi-part with messageforward. setcontent (multipart); // send messagetransport. send (forward );
7. attachmentsAttachments are often used as email-related resources in text, tables, images, and other formats, such as popular mail client
Now that we have a clear concept of the JavaMail API and its core classes, let's write a simple program that will send simple email messages with attachments, emails, HTML content and e-mail embedded images.Then the basic steps in all the above scenarios are as follows:
Gets the session object.
Compose a message.
Send a message.
In the following chapters, we have shown a simple example:
.setcontent ("This is a spam message containing attachments", "text/html;charset=utf-8");/Add the main part to the collection List.addbodypart (part1);//create Mimebodypartmimebodypart part2 = new MimeBodyPart ();p Art2.attachfile (new File ("f:/f/bai Bing. jpg"));//Set the contents of the Attachment Part2.setfilename (Mimeutility.encodetext ("BBW. jpg"));//Set the name of the display, Which Encodetext used to deal with Chinese garbled problem List.addbodypart (part2); msg.setcontent (list);//Se
Java API, Chinese API (download) and Common English API (online)
Java API documentation is essential when writing Java programs.Download the Chinese API from sun.com.cn.You can download
--Aliyun upload Download API interface use
Related Data address: https://help.aliyun.com/document_detail/oss/sdk/dotnet-sdk/install.html?spm=5176.docoss/sdk/dotnet-sdk/ Preface.6.357.shx0qw
1. Before beginning programming need to quote Aliyun.OSS.dll, can download directly in Ali official website, also can install through NuGet.
2. On Ali's official website, ther
This time this really is dry goods oh, last night made a half night,,,, from 8 points after eating dinner began to write, has been nearly 12 o'clock to finish,,, novice, can't afford to hurt Ah ....First of all, Baidu provides a music search API, you want Baidu request similar to
http://box.zhangmen.baidu.com/x?op=12count=1title= best loss friend $$ Eason Chan $ $
Address, Baidu will return you a section of XML, as shown below
This
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.