JavaMail Section Index | Page 4
What is the format of the Content-ID header?
The Content-ID header, set with setContentID, needs to be formatted like <cid>. You need to make sure the < and > signs are present. Some mail readers work without them, many don't.more
Is it possible to send a message that identifies if the mailreader is configurate to read HTML or text mail?
The MIME content-type "multipart/alternative" is intended so you can send different versions of the same "message" all bundled together, e.g. an HTML version, a plain text version, maybe an audio ...more
Can I create a MimeMessage using one Session say session1 and send the mail using another Session session2?
Sure.
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
public class MailExample {
public static void main (String args[]) throws Exception {
String host = ar...more
Can someone please specify the technique of message sorting within folder according to some criteria say Header Information?
Since the Message class doesn't implement the Comparable interface, you'll need to create a custom Comparator. Then, you can call Arrays.sort(arrayOfMessages, comparator).
How do I display POP3 message body properly in a browser? When i use message.writeTO() it displays without line breaks.
How do I display POP3 message body properly in a browser?
When i use message.writeTO() it displays without line breaks.
Why do binary file attachment sizes increase by about 15-20% when sending a message?
When included as an attachment, binary files are encoded to be 7-bit safe. This means that what used to be 8-bits per byte is now 7, hence the increase.
Can JavaMail be used from a Message Driven Bean? The EJB specifictation requires that the bean implementation must be single-threaded. Isn't JavaMail multi-threaded? If so, can it be used from a Message Driver Bean?
You should configure a JavaMail resource for your EJB container and access it by JNDI. It works just like JavaMail in an application without setting up the connection first. You just get it from t...more
How can I configure sendmail to route messages through James for filtering/scanning?
See the help document at http://james.apache.org/james_and_sendmail.html.
How can I contribute to the James project?
Contribution information is available from http://james.apache.org/contribute.html.
How much does James cost?
James can be freely used and is released under the Apache Software License. http://james.apache.org/license.html.
Where can I get a custom JavaMail javax.mail.Store to access an RSS feed?
The open source app ZOE offers one.
How can I optimize sendmail for use with JavaMail-based programs?
According to Joseph Shraibman on the JAVAMAIL-INTEREST mailing list:
JavaMail checks if the connection is good by sending a NOOP command. It does this before sending each mail message. The probl...more
How are connection timeouts implemented?
According to Bill Shannon, primary JavaMail engineer: The timeout is implemented
by starting a thread to make the connection and if it doesn't complete before
the timeout, the thread is abandoned ...more
How do I send a message where a character with an accent is in the subject?
Email headers can only contain 7-bit US ASCII characters, according to the Internet standards (mainly RFC 2822, also 2821). For any characters outside that charset, they have to be encoded first. ...more
JavaMail 1.3 supports group addresses. What are group addresses?
RFC 822 defines what a group address is. It allows one to prefix a list of email addresses with a label, followed by a colon, as in:
jGurus: a@example.com, John <b@example.com>, "Joe" <c...more