Petals-BC-Mail 3.2.x

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (10)

View Page History
The component can expose directly a generic SendMail service without deploying a service unit.


To allow the component to provide his generic service, the component must have a wsdl with the name: component.wsdl. An example of this file is present in the component.To deactivate the generic service supplies by the component,simply erase the file: component.wsdl.

Parameters (host, port, user, passwordl) have to be defined at component level (cf section *Component Configuration*), otherwise the component can not know the technical information of the smtp server necessary for the generic sendMail service.
\\
This service offer two mode:

* In-Payload mode: The service allows the consumer to send a specific XML message to the component, which defines all the information needed to send an email.

Sample query:
The IN message looks like :

{code:lang=xml}
<ns0:mail xmlns:ns0="http://petals.ow2.org/components/mail/version-3.0">
* Out-Payload mode: The service allows the consumer to send a JBI message to the component by setting ws-addressing properties in the incoming message exchange which defines all the information needed to send an email.The content of the mail (body) is in the payload of the mesage.

The IN message looks like:
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<mail><body>My Mail Content</body></mail>
{code}

{table-plus:columnAttributes=,,style="text-align:center;",style="text-align:center;"}
















|| Attribute || Description || Default || Required ||
| \{[http://www.w3.org/2005/08/addressing]}To | email address of the recipient | \- | Yes |
Petals Mail binding component can be configured by deploying a new service unit to it. The jbi descriptor ( jbi.xml file) of this service unit must contain a provides node describing the link between an internal jbi endpoint and an external email address.

h3. Usage

Once a provides node is configured, you can start to send email via the mail binding component. You just have to send message exchange to endpoints activated by service unit deployments (containing jbi.xml with provides node).

{code}

{warning:title=warning}
InOnly message exchange patterns are allowed.
{warning}

h3. Configuration
{noformat}


?

h2. Usage
If the email content is a markup language, it's recommended to use CDATA section or to escape illegal XML character:
Example of IN message with CDATA section:
{code:lang=xml}
[...]
<body><![CDATA[<element>my content</element>]]></body>
[...]
{code}

Example of IN message with escaped illegal XML character:
{code:lang=xml}
[...]<body>&lt;element&gt;my content&lt;/element&gt;]]></body>
[...]
{code}

{warning:title=warning} InOnly message exchange patterns are allowed.{warning}

h1. Invoking service on incoming email







|| Parameter || Description || Default || Required ||
| scheme | the connection protocol (imap or pop3) | \- | Yes |