Java Doc for MultiPartEmail.java in  » Net » apache-common-Email » org » apache » commons » mail » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » apache common Email » org.apache.commons.mail 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.mail.Email
      org.apache.commons.mail.MultiPartEmail

All known Subclasses:   org.apache.commons.mail.HtmlEmail,  org.apache.commons.mail.mocks.MockMultiPartEmailConcrete,
MultiPartEmail
public class MultiPartEmail extends Email (Code)
A multipart email.

This class is used to send multi-part internet email like messages with attachments.

To create a multi-part email, call the default constructor and then you can call setMsg() to set the message and call the different attach() methods.
since:
   1.0
author:
   Quinton McCombs
author:
   Jon S. Stevens
author:
   Frank Y. Kim
author:
   Brett McLaughlin
author:
   Regis Koenig
author:
   Corey Scott
version:
   $Id: MultiPartEmail.java 279285 2005-09-07 09:52:44Z henning $





Method Summary
public  EmailaddPart(String partContent, String partContentType)
     Add a new part to the email.
Parameters:
  partContent - The content.
Parameters:
  partContentType - The content type.
public  EmailaddPart(MimeMultipart multipart)
     Add a new part to the email.
Parameters:
  multipart - The MimeMultipart.
public  EmailaddPart(MimeMultipart multipart, int index)
     Add a new part to the email.
Parameters:
  multipart - The part to add.
Parameters:
  index - The index to add at.
public  MultiPartEmailattach(EmailAttachment attachment)
     Attach an EmailAttachment.
Parameters:
  attachment - An EmailAttachment.
public  MultiPartEmailattach(URL url, String name, String description)
     Attach a file located by its URL.
public  MultiPartEmailattach(URL url, String name, String description, String disposition)
     Attach a file located by its URL.
Parameters:
  url - The URL of the file (may be any valid URL).
Parameters:
  name - The name field for the attachment.
Parameters:
  description - A description for the attachment.
Parameters:
  disposition - Either mixed or inline.
public  MultiPartEmailattach(DataSource ds, String name, String description)
     Attach a file specified as a DataSource interface.
Parameters:
  ds - A DataSource interface for the file.
Parameters:
  name - The name field for the attachment.
Parameters:
  description - A description for the attachment.
public  MultiPartEmailattach(DataSource ds, String name, String description, String disposition)
     Attach a file specified as a DataSource interface.
Parameters:
  ds - A DataSource interface for the file.
Parameters:
  name - The name field for the attachment.
Parameters:
  description - A description for the attachment.
Parameters:
  disposition - Either mixed or inline.
public  voidbuildMimeMessage()
    
protected  BodyPartcreateBodyPart()
     Method that can be overridden if you don't want to create a MimeBodyPart.
protected  MimeMultipartcreateMimeMultipart()
    
protected  MimeMultipartgetContainer()
     Gets the message container.
protected  BodyPartgetPrimaryBodyPart()
     Gets first body part of the message.
public  StringgetSubType()
     Get the MIME subtype of the email.
protected  voidinit()
     Initialize the multipart email.
public  booleanisBoolHasAttachments()
    
protected  booleanisInitialized()
    
public  voidsetBoolHasAttachments(boolean b)
    
protected  voidsetInitialized(boolean b)
    
public  EmailsetMsg(String msg)
     Set the message of the email.
Parameters:
  msg - A String.
public  voidsetSubType(String aSubType)
     Set the MIME subtype of the email.



Method Detail
addPart
public Email addPart(String partContent, String partContentType) throws EmailException(Code)
Add a new part to the email.
Parameters:
  partContent - The content.
Parameters:
  partContentType - The content type. An Email.
throws:
  EmailException - see javax.mail.internet.MimeBodyPartfor definitions
since:
   1.0



addPart
public Email addPart(MimeMultipart multipart) throws EmailException(Code)
Add a new part to the email.
Parameters:
  multipart - The MimeMultipart. An Email.
throws:
  EmailException - see javax.mail.internet.MimeBodyPartfor definitions
since:
   1.0



addPart
public Email addPart(MimeMultipart multipart, int index) throws EmailException(Code)
Add a new part to the email.
Parameters:
  multipart - The part to add.
Parameters:
  index - The index to add at. The email.
throws:
  EmailException - An error occured while adding the part.
since:
   1.0



attach
public MultiPartEmail attach(EmailAttachment attachment) throws EmailException(Code)
Attach an EmailAttachment.
Parameters:
  attachment - An EmailAttachment. A MultiPartEmail.
throws:
  EmailException - see javax.mail.internet.MimeBodyPartfor definitions
since:
   1.0



attach
public MultiPartEmail attach(URL url, String name, String description) throws EmailException(Code)
Attach a file located by its URL. The disposition of the file is set to mixed.
Parameters:
  url - The URL of the file (may be any valid URL).
Parameters:
  name - The name field for the attachment.
Parameters:
  description - A description for the attachment. A MultiPartEmail.
throws:
  EmailException - see javax.mail.internet.MimeBodyPartfor definitions
since:
   1.0



attach
public MultiPartEmail attach(URL url, String name, String description, String disposition) throws EmailException(Code)
Attach a file located by its URL.
Parameters:
  url - The URL of the file (may be any valid URL).
Parameters:
  name - The name field for the attachment.
Parameters:
  description - A description for the attachment.
Parameters:
  disposition - Either mixed or inline. A MultiPartEmail.
throws:
  EmailException - see javax.mail.internet.MimeBodyPartfor definitions
since:
   1.0



attach
public MultiPartEmail attach(DataSource ds, String name, String description) throws EmailException(Code)
Attach a file specified as a DataSource interface.
Parameters:
  ds - A DataSource interface for the file.
Parameters:
  name - The name field for the attachment.
Parameters:
  description - A description for the attachment. A MultiPartEmail.
throws:
  EmailException - see javax.mail.internet.MimeBodyPartfor definitions
since:
   1.0



attach
public MultiPartEmail attach(DataSource ds, String name, String description, String disposition) throws EmailException(Code)
Attach a file specified as a DataSource interface.
Parameters:
  ds - A DataSource interface for the file.
Parameters:
  name - The name field for the attachment.
Parameters:
  description - A description for the attachment.
Parameters:
  disposition - Either mixed or inline. A MultiPartEmail.
throws:
  EmailException - see javax.mail.internet.MimeBodyPartfor definitions
since:
   1.0



buildMimeMessage
public void buildMimeMessage() throws EmailException(Code)
Builds the actual MimeMessage
throws:
  EmailException - see javax.mail.internet.MimeBodyPartfor definitions
since:
   1.0



createBodyPart
protected BodyPart createBodyPart()(Code)
Method that can be overridden if you don't want to create a MimeBodyPart.



createMimeMultipart
protected MimeMultipart createMimeMultipart()(Code)



getContainer
protected MimeMultipart getContainer()(Code)
Gets the message container. The message container.
since:
   1.0



getPrimaryBodyPart
protected BodyPart getPrimaryBodyPart() throws MessagingException(Code)
Gets first body part of the message. The primary body part.
throws:
  MessagingException - An error occured while getting the primary body part.
since:
   1.0



getSubType
public String getSubType()(Code)
Get the MIME subtype of the email. MIME subtype of the email
since:
   1.0



init
protected void init()(Code)
Initialize the multipart email.
since:
   1.0



isBoolHasAttachments
public boolean isBoolHasAttachments()(Code)
boolHasAttachments
since:
   1.0



isInitialized
protected boolean isInitialized()(Code)



setBoolHasAttachments
public void setBoolHasAttachments(boolean b)(Code)

Parameters:
  b - boolHasAttachments
since:
   1.0



setInitialized
protected void setInitialized(boolean b)(Code)

Parameters:
  b -



setMsg
public Email setMsg(String msg) throws EmailException(Code)
Set the message of the email.
Parameters:
  msg - A String. An Email.
throws:
  EmailException - see javax.mail.internet.MimeBodyPartfor definitions
since:
   1.0



setSubType
public void setSubType(String aSubType)(Code)
Set the MIME subtype of the email.
Parameters:
  aSubType - MIME subtype of the email
since:
   1.0



Fields inherited from org.apache.commons.mail.Email
final public static String ATTACHMENTS(Code)(Java Doc)
final public static String CONTENT_TYPE(Code)(Java Doc)
final public static String EMAIL_BODY(Code)(Java Doc)
final public static String EMAIL_SUBJECT(Code)(Java Doc)
final public static String FILE_SERVER(Code)(Java Doc)
final public static String ISO_8859_1(Code)(Java Doc)
final public static String KOI8_R(Code)(Java Doc)
final public static String MAIL_DEBUG(Code)(Java Doc)
final public static String MAIL_HOST(Code)(Java Doc)
final public static String MAIL_PORT(Code)(Java Doc)
final public static String MAIL_SMTP_AUTH(Code)(Java Doc)
final public static String MAIL_SMTP_FROM(Code)(Java Doc)
final public static String MAIL_TRANSPORT_PROTOCOL(Code)(Java Doc)
final public static String RECEIVER_EMAIL(Code)(Java Doc)
final public static String RECEIVER_NAME(Code)(Java Doc)
final public static String SENDER_EMAIL(Code)(Java Doc)
final public static String SENDER_NAME(Code)(Java Doc)
final public static String SMTP(Code)(Java Doc)
final public static String TEXT_HTML(Code)(Java Doc)
final public static String TEXT_PLAIN(Code)(Java Doc)
final public static String US_ASCII(Code)(Java Doc)
protected Authenticator authenticator(Code)(Java Doc)
protected List bccList(Code)(Java Doc)
protected String bounceAddress(Code)(Java Doc)
protected List ccList(Code)(Java Doc)
protected String charset(Code)(Java Doc)
protected Object content(Code)(Java Doc)
protected String contentType(Code)(Java Doc)
protected boolean debug(Code)(Java Doc)
protected MimeMultipart emailBody(Code)(Java Doc)
protected InternetAddress fromAddress(Code)(Java Doc)
protected Map headers(Code)(Java Doc)
protected String hostName(Code)(Java Doc)
protected MimeMessage message(Code)(Java Doc)
protected boolean popBeforeSmtp(Code)(Java Doc)
protected String popHost(Code)(Java Doc)
protected String popPassword(Code)(Java Doc)
protected String popUsername(Code)(Java Doc)
protected List replyList(Code)(Java Doc)
protected Date sentDate(Code)(Java Doc)
protected String smtpPort(Code)(Java Doc)
protected String subject(Code)(Java Doc)
protected List toList(Code)(Java Doc)

Methods inherited from org.apache.commons.mail.Email
public Email addBcc(String email) throws EmailException(Code)(Java Doc)
public Email addBcc(String email, String name) throws EmailException(Code)(Java Doc)
public Email addCc(String email) throws EmailException(Code)(Java Doc)
public Email addCc(String email, String name) throws EmailException(Code)(Java Doc)
public void addHeader(String name, String value)(Code)(Java Doc)
public Email addReplyTo(String email) throws EmailException(Code)(Java Doc)
public Email addReplyTo(String email, String name) throws EmailException(Code)(Java Doc)
public Email addTo(String email) throws EmailException(Code)(Java Doc)
public Email addTo(String email, String name) throws EmailException(Code)(Java Doc)
public void buildMimeMessage() throws EmailException(Code)(Java Doc)
public InternetAddress getFromAddress()(Code)(Java Doc)
public String getHostName()(Code)(Java Doc)
public Session getMailSession() throws EmailException(Code)(Java Doc)
public MimeMessage getMimeMessage()(Code)(Java Doc)
public Date getSentDate()(Code)(Java Doc)
public String getSmtpPort()(Code)(Java Doc)
public String getSubject()(Code)(Java Doc)
public String send() throws EmailException(Code)(Java Doc)
public String sendMimeMessage() throws EmailException(Code)(Java Doc)
public void setAuthentication(String userName, String password)(Code)(Java Doc)
public void setAuthenticator(Authenticator newAuthenticator)(Code)(Java Doc)
public Email setBcc(Collection aCollection) throws EmailException(Code)(Java Doc)
public Email setBounceAddress(String email)(Code)(Java Doc)
public Email setCc(Collection aCollection) throws EmailException(Code)(Java Doc)
public void setCharset(String newCharset)(Code)(Java Doc)
public void setContent(MimeMultipart aMimeMultipart)(Code)(Java Doc)
public void setContent(Object aObject, String aContentType)(Code)(Java Doc)
public void setDebug(boolean d)(Code)(Java Doc)
public Email setFrom(String email) throws EmailException(Code)(Java Doc)
public Email setFrom(String email, String name) throws EmailException(Code)(Java Doc)
public void setHeaders(Map map)(Code)(Java Doc)
public void setHostName(String aHostName)(Code)(Java Doc)
public void setMailSession(Session aSession)(Code)(Java Doc)
abstract public Email setMsg(String msg) throws EmailException(Code)(Java Doc)
public void setPopBeforeSmtp(boolean newPopBeforeSmtp, String newPopHost, String newPopUsername, String newPopPassword)(Code)(Java Doc)
public void setSentDate(Date date)(Code)(Java Doc)
public void setSmtpPort(int aPortNumber)(Code)(Java Doc)
public Email setSubject(String aSubject)(Code)(Java Doc)
public Email setTo(Collection aCollection) throws EmailException(Code)(Java Doc)
protected InternetAddress[] toInternetAddressArray(List list)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.