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 content is the core
Http://www.javaeye.com/topic/49031
In the past few days, a project was designed to use a large number of email sending APIs, So I sorted out the scatteredCodeAnd organize it into a class. We hope to use it for comrades who need it.Define a mail configuration file to facilitate configuration modification,ProgramYou only need to read this configuration file, so that you do not need to modify it later.Source code Java code
/**
* Provide the ema
Mailing list services are often used to provide an e-mail-based discussion environment for a workgroup, through which subscribers discuss issues of common interest.
The sample program provided in this article listserver is a simple mailing list forwarding server that reads new messages from a specified account and sends them to all subscribers. The Java Mail API
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
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:
Server | Mailing List Related Resources
1. Java Mail API Package Download (version 1.1.2)
Ftp://usmt.java.sun.com/pub/javamail/tyo39/javamail1_1_2.zip
Default POP3 Implementation Package Download:
Ftp://usmt.java.sun.com/pub/javamial/tyo39/pop31_1.zip
The above files can also be downloaded from the Sun's Java Mail API
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.
(readers who do not have the JavaMail
deleted the email with subject $ ($individualEmail. Subject) from $Mailbox "}}}#=============================== script end ===== =============================================== 7 to perform bulk deletion of a specified topic list message The Saves the above script as a. PS1 script, which is saved as EWS01.PS1 in this example. Next, create a ACTION_EWS.PS1 script to invoke the Ews01.ps1 script so that when execution of the Action_ews.ps1 script completes, a delet_log text file is generated
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 loading the JavaMail
There is mail technology in Java. Use spring's mail to simplify your code
The demo code on the Spring Mail API, the annotation on the code is enough to explain everything, actually this is a very simple technology ....
Package org.mail.test;
Import Java.io.File;
Import java.util.Properties;
Import Javax.mail.inter
We all know that fetion is able to send text messages for free, but fetion and no official interface, so can not borrow the official mobile interface to achieve free text messaging, but there are some cracked interface can be used.Get method:Submission formatHttp://66.zzuobiao.sinaapp.com/get.php?tel= Mobile phone number pwd=passwordaim= The other number text= SMS contentReturn the current state of excess content for China Mobile return can be ignored, if there is no return content or did not re
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.