Package org.apache.naming.factory
Class SendMailFactory
java.lang.Object
org.apache.naming.factory.SendMailFactory
- All Implemented Interfaces:
ObjectFactory
Factory class that creates a JNDI named javamail MimePartDataSource
object which can be used for sending email using SMTP.
Can be configured in the Context scope of your server.xml configuration file.
Example:
<Resource name="mail/send" auth="CONTAINER" type="jakarta.mail.internet.MimePartDataSource" factory="org.apache.naming.factory.SendMailFactory" mail.smtp.host="your.smtp.host" mail.smtp.user="someuser" mail.from="someuser@some.host" mail.smtp.sendpartial="true" mail.smtp.dsn.notify="FAILURE" mail.smtp.dsn.ret="FULL" />
- Author:
- Glenn Nielsen Rich Catlett
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
DataSourceClassName
- See Also:
-
-
Constructor Details
-
SendMailFactory
public SendMailFactory()
-
-
Method Details
-
getObjectInstance
public Object getObjectInstance(Object refObj, Name name, Context ctx, Hashtable<?, ?> env) throws Exception- Specified by:
getObjectInstance
in interfaceObjectFactory
- Throws:
Exception
-