cancel
Showing results for 
Search instead for 
Did you mean: 

Mail to File Scenario

Former Member
0 Kudos

Hi Experts,

i am trying out a simple mail to file Scenario. But i am facing some issue. Pls help me to solve the issue.

My Source structure is

<Subject>subject pi</Subject>

<From><ABCD></From>

<To><XYZ></To>

<Content_Type>text/plain; charset="ISO-8859-1"</Content_Type>

<Date>2011-12-08T05:56:13Z</Date>

<Message_ID><CAABb8cU+oXFPYHc-DUaaoQfd_seEMToE=UbqZ-CLOfUw9ei8uQ></Message_ID>

<Content>content pi</Content>

This we have reed the Subject and the content of the mail. When we note the From ID we can see that the mail id is generated inside a tag i.e <ABCD> how can we avoid the tag symbol. here in Forum i am not able give a mail address so thats y i didnt mention the From and to id fully.

Regard's

Preethi.

Accepted Solutions (1)

Accepted Solutions (1)

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

You can remove the tags in mapping using UDF...try this

From>UDF>target

UDF:


int start = input.indexOf('<')') ;

int end = input.lastIndexOf('>');

String result = input.subString(start+1, end-1);

return result;

Regards,

Priyanka

Former Member
0 Kudos

Hi,

Thanks for your reply.

Now need another help. If u note the source XML the From id is inside tag. to avoid tage and make it as lt; instead of '<', this should happen when we generate the Source XML so , i want to know is there any parameters in Mail adapter to do this.

Regard's

Preethi.

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

try with this..


String result = input.replaceAll("<"'", "lt");

Regards,

Priyanka

Answers (0)