Changes for page Sending Emails
Last modified by Pascal Robert on 2012/08/12 21:24
From version 11.1
edited by David Avendasora
on 2011/05/03 04:38
on 2011/05/03 04:38
Change comment:
There is no comment for this version
To version 15.1
edited by Pascal Robert
on 2012/08/12 21:24
on 2012/08/12 21:24
Change comment:
Migrated to Confluence 5.3
Summary
-
Page properties (4 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - Development-Sending Emails1 +Sending Emails - Parent
-
... ... @@ -1,0 +1,1 @@ 1 +How-tos - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. avendasora1 +XWiki.probert - Content
-
... ... @@ -1,17 +1,17 @@ 1 1 == Overview == 2 2 3 -Sending emails is a very common requirement in a web application. 3 +Sending emails is a very common requirement in a web application. There are several methods you can choose from, each with varying levels of complexity and power. 4 4 5 -== JavaMail == 5 +== ERJavaMail == 6 6 7 - [[JavaMail>>http://java.sun.com/products/javamail/]] isSun'sAPIdefinitionand open-sourcereference implementationofvariousmethodsof sendingand receiving mail.lloftheotherWOmail-sendingtechniquesarebased on JavaMail,butyoucan choose touse it directlyratherthanusehehighervel API'sdescribedbelow.If youwould likeouse JavaMailonyourown, youwillneedtodownloadandinstallthefollowingjarsandput them intoyourWOA's classpath:7 +ERJavaMail is part of Project Wonder and provides an API for sending component-based emails. ERJavaMail also uses the JavaMail API's underneath, but it includes the jars inside its framework, so you don't need to manually install JavaMail to use it. Because it does not have any external dependencies on other Project Wonder frameworks, you can use it without bringing in any other Project Wonder frameworks. For more information on ERJavaMail, see the [[ERJavaMail>>doc:ERJavaMail Framework]] page. 8 8 9 -* [[JavaMail>>http://java.sun.com/products/javamail/downloads/index.html]] 10 -* [[Java Activation Framework>>http://java.sun.com/products/javabeans/jaf/downloads/index.html]] 9 +== JavaMail == 11 11 12 -= =ERJavaMail==11 +[[JavaMail>>url:http://java.sun.com/products/javamail/||shape="rect"]] is Sun's API definition and open-source reference implementation of various methods of sending and receiving mail. All of the other WO mail-sending techniques are based on JavaMail, but you can choose to use it directly rather than use the higher level API's described below. If you would like to use JavaMail on your own, you will need to download and install the following jars and put them into your WOA's classpath: 13 13 14 -ERJavaMail is part of Project Wonder and provides an API for sending component-based emails. ERJavaMail also uses the JavaMail API's underneath, but it includes the jars inside its framework, so you don't need to manually install JavaMail to use it. Because it does not have any external dependencies on other Project Wonder frameworks, you can use it without bringing in any other Project Wonder frameworks. For more information on ERJavaMail, see the [[ERJavaMail>>Project WONDER-Frameworks-ERJavaMail]] page. 13 +* [[JavaMail>>url:http://java.sun.com/products/javamail/downloads/index.html||shape="rect"]] 14 +* [[Java Activation Framework>>url:http://java.sun.com/products/javabeans/jaf/downloads/index.html||shape="rect"]] 15 15 16 16 == WOMailDelivery == 17 17 ... ... @@ -19,13 +19,13 @@ 19 19 You really should use ERJavaMail, WOMailDelivery is not as flexible as ERJavaMail is. 20 20 {{/warning}} 21 21 22 -Built into WebObjects is the WOMailDelivery class. 22 +Built into WebObjects is the WOMailDelivery class. It provides a very simple API for sending mails, but lacks the power of Project Wonder's version. To use WOMailDelivery, you will need to set your SMTP server in one of the following ways: 23 23 24 -* Add DWOSMTPHost=smtp.yourmailserver as a launch parameter 24 +* Add -DWOSMTPHost=smtp.yourmailserver as a launch parameter 25 25 * Set WOSMTPHost=smtp.yourmailserver.com in your Properties file 26 26 * Hardcode it with WOApplication.application().setSMTPHost("smtp.yourmailserver.com"); 27 27 28 -Refer to the [[WOMailDelivery API>>http://w ebobjects.mdimension.com/javadoc/WebObjects/5.4.2/com/webobjects/appserver/WOMailDelivery.html]] for more information, but to simply send an email, you can use the following command:28 +Refer to the [[WOMailDelivery API>>url:http://wocommunity.org/documents/javadoc/WebObjects/5.4.2/com/webobjects/appserver/WOMailDelivery.html||shape="rect"]] for more information, but to simply send an email, you can use the following command: 29 29 30 30 {{code}} 31 31 ... ... @@ -39,4 +39,4 @@ 39 39 40 40 {{/code}} 41 41 42 -By default, WOMailDelivery with use Sun's old SMTP implementation. 42 +By default, WOMailDelivery with use Sun's old SMTP implementation. However, if you install JavaMail (as described above) into your WOA or /Library/WebObjects/Extensions, WOMailDelivery will use it instead.