
Questions: 23,661 //
Answers: 52,176 //
Contributing Members: 17,932
May 12, 2016 at 04:04 AM, vinzonwsl answered with:
Hi @vijay,
Create an outbound property named subject, using set property or message properties:
<set-property propertyName="subject" value="#['Subject for the Email']" doc:name="Property" />
OR
<message-properties-transformer name="setEmailSubject" doc:name="Message Properties"> <add-message-property key="subject" value="#['Subject for the Email']" />
You can remove the subject= in your smtp:outbound-endpoint configuration
Cheers,
Thanks,
Could you please share the smtp outbound config..i could not able to realize "remove subject="
you can just remove this part of the smtp:outbound-endpoint since you already pass the subject on the outbound property
subject="#[flowVars.subject]"
May 11, 2016 at 05:08 AM, wsjsgeronimo answered with:
Hi @Vijay,
I created a sample flow, with a HTTP inbound (localhost:8081), create a variable named "subject" and send it to SMTP component. You may reference it by using MEL on the subject field which is #[flowVars.subject]
<flow name="sampleFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<logger message="#[message.inboundProperties.'http.query.string']" level="INFO" doc:name="Logger"/>
<set-variable variableName="subject" value="#['Subject for the Email']" doc:name="Subject for Email (SMTP)"/>
<smtp:outbound-endpoint host="localhost" to="anybody@gmail.com" from="someone@gmail.com" subject="#[flowVars.subject]" responseTimeout="10000" doc:name="SMTP"/>
</flow>
Hope this helps.
printing #[flowVars.subject] and not content of the variable
Invocation propertys are lost in Intercepting Message-Processor 8 Answers
Unable to connect to mail transport. 1 Answer
CTF and flowvars 1 Answer