how to send mail from esb

heng005.hotmail.com's picture

Can i send an e-mail from WSO2 ESB with these requirements:
1. custom confingue subject
2. custom CC and BCC.

Are there any example or how can i do?

indika's picture

Hi You can do . Please look

Hi

You can do . Please look at Sample 256. It only set 'Subject' and with the same way (i.e using property mediator), you can set following.

// transport / mail headers
"Subject"
"To"
"From"
"Cc"
"Bcc"
"Reply-To"
"In-Reply-To"
"Message-ID"
"References"

Thanks

Indika

heng005.hotmail.com's picture

Thank you very much. i'm

Thank you very much. i'm going to try it

werdex86.yahoo.com's picture

Hi! I want to send SOAP

Hi!
I want to forward SOAP request to mail. Not sure how sample 256 can solve my problem because it listens for MAIL messages and not for SOAP requests. Is there any way to forward soap request to mail? Maybe i need to move "header name="To" expression="fn:concat('mailto:'" to inSeuquence in http proxy?

rajika's picture

You just need to use a mail

You just need to use a mail endpoint.
http://wso2.org/project/esb/java/3.0.0/docs/samples/transport_samples.html#Sample255

Spending some time on the samples index would help.

Rajika

werdex86.yahoo.com's picture

Hi! Sorry, i skipped 255

Hi!
Sorry, i skipped 255 sample because it was related to vfs transport. Now mail sending works fine.

I need to modify content which goes to mail. Now mailendpoint sends the whole soapenv:Envelope as attachment. I want to compose human readable mail: extract some arguments from request,insert them to mail template and send this message. Is it possible to send non soap content using mail endpoint?

Thx!

rajika's picture

This is not possible. When

This is not possible. When sending out the message using the mail transport your payload will pack into a SOAP envelope and it'll deliver as the email.

Rajika

Hot Topic
Hot
Topic

Google Gadgets are a nice way to develop user interfaces for distributed services. The fact that they can be hosted anywhere over a network, not necessarily in the very portal server they eventually run in makes them re-usable and allows users to quickly...

Latest Webinar
In this webinar we'll share the range of concerns we've heard from the industry, and survey some of the new and sometimes subtle types of lock-in associated with cloud technologies.
Wednesday, 8 September, 10.00 AM (PDT)