cancel
Showing results for 
Search instead for 
Did you mean: 

Mail Adapter Configuration

Former Member
0 Kudos

Hello All,

Does the Basis need to do some configuration for the mail adapter to work in XI??

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Balu,

Only thing you need to know is the SMTP address of your mail server. Then you can send the mails.

You can also get this address from your current outlook. Go to this path for this;

Outlook-->Tools Menu -->Mail setup --> E-Mail Accounts --> Next --> Change --> You will have the name in Microsoft Exchange Server. Take this and put it in the mail adapter as:

smtp://<name>

Thats it. You will see the mails in the mailbox.

---Satish

Former Member
0 Kudos

Satish,

I tried the correct smtp address and I'm getting thr following error msg.

2007-05-10 14:04:31 Success Mail: sending a delivery error ack ...

2007-05-10 14:04:31 Success Mail: sent a delivery error ack

2007-05-10 14:04:31 Error Mail: error occured: com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: server not responding OK to MAIL FROM; 454 5.7.3 Client does not have permission to submit mail to this server.

2007-05-10 14:04:31 Error Exception caught by adapter framework: java.io.IOException: server not responding OK to MAIL FROM; 454 5.7.3 Client does not have permission to submit mail to this server.

2007-05-10 14:04:31 Error Delivery of the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: server not responding OK to MAIL FROM; 454 5.7.3 Client does not have permission to submit mail to this server..

2007-05-10 14:04:31 Success The asynchronous message was successfully scheduled to be delivered at Thu May 10 14:09:31 CDT 2007.

2007-05-10 14:04:31 Success The message status set to WAIT.

Any Clues??

Former Member
0 Kudos

Balu,

are you able to log on to the SMTP server you specified in the config using ur UID & pwd??

let us know ur adapter config details

praveen

Former Member
0 Kudos

Hey

>>Client does not have permission to submit mail to this server..

are u sending the mail to external address or within ur own landscape,if its an external address then check ur firewall settings

thanx

ahmad

Former Member
0 Kudos

Praveen / Ahmad,

Thanks for your help. The problem partially worked out. I could receive the email from the XI mail adapter. Earlier I was using the wrong smtp address in the url. The next hurdle I have is it to dynamically send the email to an email address thats in the payload of the message. I have no problem getting the email address from the payload. The only problem I have is implementing this dynamic emailing

I had gone through the Michal Krawczyk blog, but didnt quite understand how it works.

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

Any help in this regard??

Thanks

henrique_pinto
Active Contributor
0 Kudos

Michal's example uses Mail Package concept, where your payload needs to be mapped to a specific format (defined by .xsd file) where you have mail address.

Instead of using that, you could alternatively try to set the 'To' header field (using Dynamic Configuration in UDF, for example) and then setting "Use variable Transport Binding" in Adapter Specific Message Attributes in Receiver Mail Adapter.

Check this for receiver mail adapter reference:

http://help.sap.com/saphelp_nw2004s/helpdata/en/6b/4493404f673028e10000000a1550b0/frameset.htm

As per documentation, technical Name of dynamic configuration object should be "THeaderTO" and Namespace should be "http://sap.com/xi/XI/System/Mail".

Regards,

Henrique.

Former Member
0 Kudos

hey

its pretty straight forward,which portion u didnt understand properly?

thanx

ahmad

Former Member
0 Kudos

I guess the XI Configuration.

Is there any step by step guide to what Michel explained.

Thanks.

Former Member
0 Kudos

You just import this as an external definiton and do the mapping in message mapping. Map the source to address to the To in XSD.

The configuration is just like you are configuring a normal mail receiver adapter.

---Satish

Former Member
0 Kudos

Ahmad,

I created the mapping objects using Michels blog in the XI design. I dont understand where exactly I will be using this mapping portion of it in the XI Configuration. I appreciate any help.

Thanks.

Former Member
0 Kudos

hey

after message mapping,u have to create an interface mapping using this message mapping.then in configuration use this interface mapping in interface determination.

thanx

ahmad

Former Member
0 Kudos

But how do I use my original payload to send as an attachment?

Former Member
0 Kudos

Hey

if ur getting a text or csv file in ur e-mail then use the mail package from marketplace and it will automatically map the text/cvs to the <contents> tags on the sender side,so simply do 1-1 mapping between source and receiver in MM.

if u are getting XML in the payload,then dont download any mail package from marketplace.

create a sender data type as per ur XML payload and map it to the receiver file as a 1-1 mapping.also do u have mail adapter on sender or receiver side?

thanx

ahmad

Message was edited by:

Ahmad

Former Member
0 Kudos

Ahmad,

I guess I didn't explain you my scenario properly. Here is the criteria.

We are getting the 855 X12 message from the Vendor. Conversion Agent Translator translates that to an IDoc XML and sends it to XI.

If there is a reject code (I guess its RA) in the IDoc XML, I need to grab the email address and the reject reason from one of the tags on the IDoc XML and send an email to the email address which we got from the IDoc XML message.

I appreciate any help.

Thanks.

Former Member
0 Kudos

Hey

u need to use BPM for this.

but how will u get the Reject code from IDOC?we can only get response from IDOC in the form of ALEAUDT.make sure ur design is correct,for response like rejection or acception,we usually use RFC.

anyways for the second part XML-XI-Mail

have a look at the following to see how to attach payloads in ur mail

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

thanx

ahmad

Message was edited by:

Ahmad

Former Member
0 Kudos

Ahmad,

We map the Reject Code to the IDoc from the 855 X12 document we received from the partner. This 855 will be in response to the 850 we send to the Trading Partner. If the TP rejects the 850, that send up a 855 response with the reason for the rejection and the reason code in the the X12 document. We map this X12 to the IDoc format and send it to ECC.

If there is a reject code in the X12, we map the same to an IDoc Segment and send the Reject reason the the internal user who created the original PO (We get his email address as part of the X12 document which in turn gets mapped to the IDoc)

I know we need to use BPM for this particular issue in Question. My question would be how we will be using the Repository Objects that Michal mentioned in his blog.

I appreciate any help.

Thanks.

Former Member
0 Kudos

Ahmad,

Quick Question. Using Michal's mail package method, do we need to specify the useid and passwords in the communication channel created for the mail package.

Thanks

Former Member
0 Kudos

Hey

it depends how ur mail server is set-up,if its setup in such a way that u need authorizations even to post mails to it,then u need to provide user id and pwd,but if not then u don't have to.

thanx

ahmad

Former Member
0 Kudos

I tried the same configuration that was specified in Michal's blog, but an getting a Java Exception Error

failed to send mail: com.sap.aii.messaging.util.XMLScanException: expecting start tag: Mail, but found Mail at state

Any idea whats causing this error?

Thanks

Former Member
0 Kudos

Hey

have u selected XIPAYLOAD in message protocol and checked the "use mail package" check box?

if yes then the namespace might be the problem.

http://sap.com/xi/XI/Mail/30 is the SAP recommended namespace which should be used under which u import the mail package XSD from marketplace,even though it works under any namespace but it looks like its giving u problem.

try making the namespace change and see if it works

thanx

ahmad

Message was edited by:

Ahmad

Former Member
0 Kudos

Yes thats how I configured. You think changing the

<b>

<xs:schema targetNamespace="http://sap.com/xi/XI/Mail/30"

xmlns:xi="http://sap.com/xi/XI/Mail/30"

</b>

to my namespace in the imported mail package would solve the problem?

Former Member
0 Kudos

Hey

>><xs:schema targetNamespace="http://sap.com/xi/XI/Mail/30" xmlns:xi="http://sap.com/xi/XI/Mail/30" >

This tells me that the namespace for mail package is the SAP recommended one.now have u created a namespace in IR with the name http://sap.com/xi/XI/Mail/30 and use that as the namespace for mail package?if not then u can either change the namespace in the XSD to your namespace,which i dont recommend(coz u need to make changes in file and then import again) or u can import the XSD under .a new namespace http://sap.com/xi/XI/Mail/30 and use this namespace as the namespace for mail package.

thanx

ahmad

Message was edited by:

Ahmad

Former Member
0 Kudos

Ahmad,

I imported this under a new name Space..<b> http://xxxxx.com/xi/PI/Training/Mail/30 </b>. Thats the reason am trying to change the name space in the imported mailpackage xsd. I'm trying to import the modified schema into my current namespace and work around it instead of changing all the directory and repository objects. You think this would work??

Thanks.

Former Member
0 Kudos

Hey

yeah it will work as long as u use http://xxxxx.com/xi/PI/Training/Mail/30 as ur namespace everywhere now(ofcourse u have to replace xxxxx with ur naming convention).

make sure the XSD also uses http://xxxxx.com/xi/PI/Training/Mail/30

thanx

ahmad

Former Member
0 Kudos

Ahmad,

Thanks a lot helping me resolve this issue. I tried changing the name space in the XSD to reflect the name space that I'm using, but gave up as I'm getting some parsing errors when I lood the schema as an external definition and used the same url that was used in the downloaded schema.

Thanks.

Answers (2)

Answers (2)

Former Member
0 Kudos

No,u dont need any basis jobs for Mail but remember that u can only send mail within ur landscape.

u shud have a mailbox setup in ur company to accept local mails

thanx

ahmad

Former Member
0 Kudos

ahmad,

using SMTP protocol you can send mail to any external mail address like..yahoo...gmail etc...no limitation on the adresses you can mail.

the SMTP URL which is specified in adapter is used to send a mail to recipient but not the mail server of the recipinet. It is required because XI doesnt have a in-built mail server..it used the mail server of available in intranet.

praveen

Former Member
0 Kudos

sorry,i confused mails with alerts but in most cases XI server is protected behind a firewall and we dont have access to external SMTP and basis guys are too ignorant to open access to external SMTP's due to security reasons.

thanx

Ahmad

Former Member
0 Kudos

Praveen,

Have you sent mail to any external mail address practically? As far as my knowledge goes we cannot send mail to external mail address using receiver mail adapter. Have you done this? If yes just eager to know how we can do it.

---Satish

Former Member
0 Kudos

Satish,

Yes, I did configure the receiver file to send emails to my gmail account. All you need to do is specify the address in the "To" address.

However, the SMTP server used to send the emails should be in the intranet.

praveen

Former Member
0 Kudos

Praveen,

<i>However, the SMTP server used to send the emails should be in the intranet.</i>

If it is true then how we will send to gmail account (gmail is not intranet). Is there any process you have done for this?

---Satish

Former Member
0 Kudos

Satish,

SMTP Server - a mail server for sending a mail to recipient email address i.e. 'To' address

To - Recepient email address (xi_admin@mycompany.com)

I've specified my gmail address in 'To' field on mail adapter. SMTP server is in the intranet.

am I clear?

praveen

PS: I still get emails delivered to my gmail from one of the XI servers at my previous clients

Former Member
0 Kudos

Yes Praveen. I can see my mails in my gmail mailbox. Thanks for your inputs.

---Satish

Former Member
0 Kudos

hi balu,

Mail adapter doesnt require any set up by Basis admins. All you need is SMTP or POP config details.

You may find this blog useful <a href="/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure">Mail Adapter scenarios – SAP Exchange Infrastructure</a>

praveen