cancel
Showing results for 
Search instead for 
Did you mean: 

Mail adapter

Former Member
0 Kudos

I have an XML file with subject and Content. Is there a way to convert this, so that an email is sent with subject from payload and content in the body of email?

I guess i can use 'XIPAYLOAD' and then using mapping set up my 'To Email id'. But I want an option to change the email id in different environments and would prefer to do this in ID.

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

do you have sp14?

if you do than it's a standard

you can set the subject in the message mapping

(adapter specific idenfitiers)

and then the content can go in the body easily

content in the body:

/people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter

using dynamic adapter identifiers:

/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

<i>if you do than it's a standard

you can set the subject in the message mapping

(adapter specific idenfitiers)

and then the content can go in the body easily </i>

Michal, I have sp14. Could you please elaborate a little more. Are you saying that we can achieve this using XIALL option? Because I would like to give my Output email id in the Integeration directory and email id is not part of the payload. Further I want the ability to change the email id based on environment, so It cannot be hardcoded in the mapping.

I have the following input XML payload

<Header>

<Title></Title>

<Content></Content>

</Header>

I see from Adapter specific attributes that I have a field called 'THeaderSUBJECT'. I presume that I have to set 'Adapter specific attributes ' in my receiver mail adapter. But how do I fill the THeaderSUBJECT field in my mapping?

How should my output XML Payload look in this scenario?

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>>Are you saying that we can achieve this using XIALL option?

you can use XIALL or payload doesn't matter

>>>>But how do I fill the THeaderSUBJECT field in my mapping?

just like described in this weblog:

/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping

you only need to change the namespace and THeaderSUBJECT

>>>>so It cannot be hardcoded in the mapping.

you can put all for all systems with an if statement

or you can take it from the property file

in your java function no problem with that

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

Thanks Michal. I was able to change the subject dynamically. I have another question regarding the email that we receive. At present I receive an email with two attachments one is soap.xml and other is payload.xml.If I want to see the payload in the body of my email what should I do?

moorthy
Active Contributor
0 Kudos

Hi,

If you uncheck "Keep Attachments" option then you will get the message in the mail body..

Check this-

/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure

Regards,

Moorthy

Former Member
0 Kudos

Krishna,

Thanks for the link. I was trying to define the email id in ID, meaning 'without checking use mail package ' option. I guess if I want the payload in the body of email, I have to use 'mail package' option..

Answers (1)

Answers (1)

moorthy
Active Contributor
0 Kudos

HI SSG,

Check this blog from Michal-

/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address

Regards,

Moorthy