Java Doc for MailSender.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.mail 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.cocoon.mail.MailSender

All known Subclasses:   org.apache.cocoon.mail.MailMessageSender,
MailSender
public interface MailSender (Code)
A helper component used by the org.apache.cocoon.acting.Sendmail action and the sendmail.xsl logicsheet for sending email messages.

Please note that this component is not (and can not) be org.apache.avalon.framework.thread.ThreadSafe , so you need to lookup new instance in each processing thread.
since:
   2.1.5
version:
   $Id: MailSender.java 469258 2006-10-30 20:21:40Z vgritsenko $



Field Summary
 StringROLE
    


Method Summary
 voidaddAttachment(Object attachment)
     Add an attachement to the message to be send.
 voidaddAttachment(Object attachment, String type, String name)
     Add an attachement to the message to be send.
 voidaddAttachmentURL(String url)
     Add an attachement to the message to be send.
 voidaddAttachmentURL(String url, String type, String name)
     Add an attachement to the message to be send.
 ExceptiongetException()
     Accesses any Exception caught by MailSender.sendIt(SourceResolver) .
 voidsend()
     Assemble the message from the defined fields and send it.
 voidsend(SourceResolver resolver)
     Assemble the message from the defined fields and send it.
 booleansendIt()
     Invokes the MailSender.send() method but catches any exception thrown.
 booleansendIt(SourceResolver resolver)
     Invokes the MailSender.send(SourceResolver) method but catches any exception thrown.
 voidsetBcc(String bcc)
     Sets the address(es), which should receive a black carbon copy of the message.
 voidsetBody(String body)
     Sets the body text of the email message.
 voidsetBody(Object body)
     Sets the body content of the email message.
 voidsetBody(Object body, String type)
     Sets the body content of the email message.
 voidsetBodyFromSrc(String src)
     Sets the body source URL of the email message.
 voidsetBodyFromSrcMimeType(String srcMimeType)
     Sets the optional body source Mime Type of the email message.
 voidsetBodyURL(String url)
     Sets the body content of the email message.
 voidsetBodyURL(String url, String type)
     Sets the body content of the email message.
 voidsetCc(String cc)
     Sets the address(es), which should receive a carbon copy of the message.
 voidsetCharset(String charset)
     Sets the character set for encoding the message.
 voidsetFrom(String from)
     Set the from address of the message.
 voidsetReplyTo(String replyTo)
     Sets the reply-to address(es) for the message.
 voidsetSmtpHost(String hostname)
     Set SMTP hostname to use for mail sending.
 voidsetSmtpHost(String hostname, String username, String password)
     Set SMTP hostname, username, and password to use for mail sending.
 voidsetSubject(String subject)
     Sets the subject line of the message.
 voidsetTo(String to)
     Sets the destination address(es) for the message.

Field Detail
ROLE
String ROLE(Code)





Method Detail
addAttachment
void addAttachment(Object attachment)(Code)
Add an attachement to the message to be send.

The attachment can be any of: org.apache.excalibur.source.Source , org.apache.cocoon.servlet.multipart.Part , java.io.InputStream , byte[], String , or a subclass.
Parameters:
  attachment - to be send with the message




addAttachment
void addAttachment(Object attachment, String type, String name)(Code)
Add an attachement to the message to be send.

The attachment can be any of: org.apache.excalibur.source.Source , org.apache.cocoon.servlet.multipart.Part , java.io.InputStream , byte[], String , or a subclass.
Parameters:
  attachment - to be send with the message
Parameters:
  type - mime type (optional)
Parameters:
  name - attachment name (optional)




addAttachmentURL
void addAttachmentURL(String url)(Code)
Add an attachement to the message to be send.
Parameters:
  url - URL to attach to the message
See Also:   org.apache.excalibur.source.Source



addAttachmentURL
void addAttachmentURL(String url, String type, String name)(Code)
Add an attachement to the message to be send.
Parameters:
  url - URL to attach to the message
Parameters:
  type - mime type (optional)
Parameters:
  name - attachment name (optional)
See Also:   org.apache.excalibur.source.Source



getException
Exception getException()(Code)
Accesses any Exception caught by MailSender.sendIt(SourceResolver) . AddressException or MessagingException



send
void send() throws AddressException, MessagingException(Code)
Assemble the message from the defined fields and send it. The source resolver is obtained from the hosting component container.
throws:
  AddressException - when problems with email addresses are found
throws:
  MessagingException - when message could not be send.



send
void send(SourceResolver resolver) throws AddressException, MessagingException(Code)
Assemble the message from the defined fields and send it.
throws:
  AddressException - when problems with email addresses are found
throws:
  MessagingException - when message could not be send.MailSender.send()



sendIt
boolean sendIt()(Code)
Invokes the MailSender.send() method but catches any exception thrown. This method is intended to be used from the sendmail logicsheet. The source resolver is obtained from the hosting component container. true when successful



sendIt
boolean sendIt(SourceResolver resolver)(Code)
Invokes the MailSender.send(SourceResolver) method but catches any exception thrown. This method is intended to be used from the sendmail logicsheet. true when successfulMailSender.sendIt()



setBcc
void setBcc(String bcc)(Code)
Sets the address(es), which should receive a black carbon copy of the message. The address is in the format, that javax.mail.internet.InternetAddress.parse(String) can handle (one or more email addresses separated by a commas).
Parameters:
  bcc - the address(es), which should receive a black carbon copy.
See Also:   javax.mail.internet.InternetAddress.parse(String)



setBody
void setBody(String body)(Code)
Sets the body text of the email message. If both a text body and a body read from a source are set, only the latter will be used.
Parameters:
  body - The body text of the email messageMailSender.setBody(Object)



setBody
void setBody(Object body)(Code)
Sets the body content of the email message.

The body can be any of: org.apache.excalibur.source.Source , org.apache.cocoon.servlet.multipart.Part , java.io.InputStream , byte[], String , or a subclass.
Parameters:
  body - The body text of the email message




setBody
void setBody(Object body, String type)(Code)
Sets the body content of the email message.

The body can be any of: org.apache.excalibur.source.Source , org.apache.cocoon.servlet.multipart.Part , java.io.InputStream , byte[], String , or a subclass.
Parameters:
  body - The body text of the email message
Parameters:
  type - mime type (optional)




setBodyFromSrc
void setBodyFromSrc(String src)(Code)
Sets the body source URL of the email message. If both a text body and a body read from a source are set, only the latter will be used.
Parameters:
  src - The body source URL of the email messageMailSender.setBodyURL(String)



setBodyFromSrcMimeType
void setBodyFromSrcMimeType(String srcMimeType)(Code)
Sets the optional body source Mime Type of the email message.
Parameters:
  srcMimeType - The optional body source Mime Type of the email messageMailSender.setBodyURL(String,String)



setBodyURL
void setBodyURL(String url)(Code)
Sets the body content of the email message.
Parameters:
  url - URL to use as message body
See Also:   org.apache.excalibur.source.Source



setBodyURL
void setBodyURL(String url, String type)(Code)
Sets the body content of the email message.
Parameters:
  url - URL to use as message body
Parameters:
  type - mime type (optional)
See Also:   org.apache.excalibur.source.Source



setCc
void setCc(String cc)(Code)
Sets the address(es), which should receive a carbon copy of the message. The address is in the format, that javax.mail.internet.InternetAddress.parse(String) can handle (one or more email addresses separated by a commas).
Parameters:
  cc - the address(es), which should receive a carbon copy.
See Also:   javax.mail.internet.InternetAddress.parse(String)



setCharset
void setCharset(String charset)(Code)
Sets the character set for encoding the message. This has effect only on text set via MailSender.setBody(String) .
Parameters:
  charset - the character set to be used for encoding the messageMailSender.setBody(Object,String)



setFrom
void setFrom(String from)(Code)
Set the from address of the message.
Parameters:
  from - The address the message appears to be from.



setReplyTo
void setReplyTo(String replyTo)(Code)
Sets the reply-to address(es) for the message. The address is in the format, that javax.mail.internet.InternetAddress.parse(String) can handle (one or more email addresses separated by a commas).
Parameters:
  replyTo - the address(es) that replies should be sent to
See Also:   javax.mail.internet.InternetAddress.parse(String)



setSmtpHost
void setSmtpHost(String hostname)(Code)
Set SMTP hostname to use for mail sending.



setSmtpHost
void setSmtpHost(String hostname, String username, String password)(Code)
Set SMTP hostname, username, and password to use for mail sending.



setSubject
void setSubject(String subject)(Code)
Sets the subject line of the message.
Parameters:
  subject - the subject line of the message



setTo
void setTo(String to)(Code)
Sets the destination address(es) for the message. The address is in the format, that javax.mail.internet.InternetAddress.parse(String) can handle (one or more email addresses separated by a commas).
Parameters:
  to - the destination address(es)
See Also:   javax.mail.internet.InternetAddress.parse(String)



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