Email content line feeds using receiver mail adapter - HELP!

Hi all,
I have read the threads on how to download the XSD from SAP for creating a mail message type with dynamic To and From addresses and this is working fine. However, I am unable to create multiple lines in my mail message. I have the following parameters in my config:
XML2Plain - Transform.Class - com.sap.aii.messaging.adapter.Conversion
XML2Plain - Tansform.ContentType - text/plain;charset=utf-8
XML2Plain - xml.conversionType - SimpleXML2Plain
XML2Plain - xml.addHeaderLine - 0
XML2Plain - xml.fieldFixedLengths - 12,150
XML2Plain - xml.fixedLengthTooShortHandling - Cut
XML2Plain - xml.fieldSeparator - '0x0D''0x0A'
I have not changed the message type in the Design so the mapped Content field currently just contains one long line of 162 characters (as does the resulting email). I want 12 characters on the first line and 150 characters on the second line. Do I need to concatenate something between by 12-character and 150-character strings to achieve this? Do I need a line.Separator parameter in my module configuration?
Many thanks,
Stuart Richards

Hi Sreeramulu,
As mentioned by Lucas, you can use the UDF. Inn addition to that, you need to define the Variable Headers under Variable transport binding after enabling the Adapter Specific Message Attributes.
For the Enabling ASMA, follow the below steps and check for the variable attributes.
Select the Advanced  tab page.
   To save adapter-specific attributes in the message header of the XI message, select Use Adapter-Specific Message Attributes and Variable Transport Binding.
The following attributes in the message header are then available for processing:
○       User: (technical name: TServerLocation)
○       Authentication key: (technical name: TAuthKey)
The following mail header fields are available for processing:
○       From: (technical name: THeaderFROM)
○       To: (technical name: THeaderTO)
○       Cc: (technical name: THeaderCC)
○       Bcc: (technical name: THeaderBCC)
○       Subject: (technical name: THeaderSUBJECT)
○       Reference to the mail that is to be replied to: (technical name: THeaderIN-REPLY-TO)
○       Reply to: (technical name: THeaderREPLY-TO)
○       Mail client program: (technical name: THeaderX-MAILER)
○       Send confirmation of receipt: (technical name: THeaderDISPOSITION-NOTIFICATION-TO)
○       Priority: (technical name: THeaderPRIORITY)
○       Importance of message: (technical name: THeaderIMPORTANCE)
   To transfer further header fields, set the relevant indicator for Variable Header. The technical names for the fields are XHeaderName1, XHeaderName2, and XHeaderName3.
The parameters are included in the mail header under the names specified here.
The attribute namespace for the adapter is http://sap.com/xi/XI/System/Mail.
Thanks,

Similar Messages

  • Cc header in the triggered mail  using  receiver mail adapter

    Hi,
    How can we  have cc option in the triggered mail using receiver mail adapter.
    message protocol is  XI payload with mail package.
    thanks,
    Ramya Shenoy

    Hi !
    Check this link:
    http://help.sap.com/saphelp_nw04s/helpdata/en/6b/4493404f673028e10000000a1550b0/frameset.htm
    under the title:
    "Mail Attributes for Message Protocol XIPAYLOAD"
    Regards,
    Matias
    ps:please award points if helpful.

  • How to send mails to "CC" and "BCC" using receiver mail adapter dynamically

    Hi,
    Due to business requirement PI need to send mails dynamically to u201CCCu201D and u201CBCCu201D using receiver mail adapter.
    We have an option to send mails to u201CTou201D dynamically, but are there any option to send mails u201CCCu201D and u201CBCCu201D dynamically.
    Please some help to resolve the issue. Thanks
    Regards,
    Sreeramulu Konjeti.

    Hi Sreeramulu,
    As mentioned by Lucas, you can use the UDF. Inn addition to that, you need to define the Variable Headers under Variable transport binding after enabling the Adapter Specific Message Attributes.
    For the Enabling ASMA, follow the below steps and check for the variable attributes.
    Select the Advanced  tab page.
       To save adapter-specific attributes in the message header of the XI message, select Use Adapter-Specific Message Attributes and Variable Transport Binding.
    The following attributes in the message header are then available for processing:
    ○       User: (technical name: TServerLocation)
    ○       Authentication key: (technical name: TAuthKey)
    The following mail header fields are available for processing:
    ○       From: (technical name: THeaderFROM)
    ○       To: (technical name: THeaderTO)
    ○       Cc: (technical name: THeaderCC)
    ○       Bcc: (technical name: THeaderBCC)
    ○       Subject: (technical name: THeaderSUBJECT)
    ○       Reference to the mail that is to be replied to: (technical name: THeaderIN-REPLY-TO)
    ○       Reply to: (technical name: THeaderREPLY-TO)
    ○       Mail client program: (technical name: THeaderX-MAILER)
    ○       Send confirmation of receipt: (technical name: THeaderDISPOSITION-NOTIFICATION-TO)
    ○       Priority: (technical name: THeaderPRIORITY)
    ○       Importance of message: (technical name: THeaderIMPORTANCE)
       To transfer further header fields, set the relevant indicator for Variable Header. The technical names for the fields are XHeaderName1, XHeaderName2, and XHeaderName3.
    The parameters are included in the mail header under the names specified here.
    The attribute namespace for the adapter is http://sap.com/xi/XI/System/Mail.
    Thanks,

  • Synchronous scenario using receiver mail adapter

    Hi All,
    I am trying to do a Http to Mail synchronous scenario. My requirement is, if the mail has been delivered to the reciver mail server, it should send an acknowledgement/response back to XI. Simlarly when it fails to deliver the message it should send an acknowledgement/response back to XI.
    Is it possible to do? If yes, please tell me how can i do this?
    Thanks & Regards,
    Senthil.

    >
    prakasu wrote:
    > Hi,
    >   In the mail receiver adapter mark the check box send delivery status notification.It will give the acknowledgement to the from address mail is deliverd or fails.There is no need of synchronous scenario.
    >
    > Regards,
    > Prakasu.M
    using this method a delivery ack mail is send to the TO address as rightly pointed out.
    Now senthil, if you want to you can have a mail sender adapter polling for mails and you can maybe correlate the To address using a BPM and then recognize this to be a delivery ack for the mail you send. Its not concrete as maybe a delivery ack might say it was not successfully delivered too so then you might have to enhance your logic to check the content to see what the mail is all about. Pheww ....
    Doesnt seem right.. so I gather the best is to redesign the interface if the flexibility is in your hands.
    Other option is to have a acknowledgment request in your Send step of the BPM

  • Email contents not visible using Yahoo mail, Windows 7 pro, FF3.6; email content fine in IE

    New laptop with Windows 7 pro; loaded FF....worked fine for a couple weeks....then, contents in email no longer visible-----just blank box where text would normally appear. Only known changes were auto updates to adobe and auto updates to Windows. Zonealarm security in place since beginning, no changes since installation. When using IE, email is visible.
    Just uninstalled Firefox and reinstalled. Same result....emails still not visible.
    Appreciate any suggestions.....I hate using IE.

    When you send mail the field you mention is used to populate the "ReplyTo: fild in the mail header. Otherwise it has no purpose and setting it to nothing will also work.
    Yahoo are obviously checking that field as you send mail. that is points to a valid address, and I have a sneaking suspicion that is might be required to point to your yahoo mail account.
    Historically the"Nigerian" type scam emails used a replyto address completely different from the one used to send the mail. So even if the sending account was closed down they still got the replies. The mail quite commonly originated in Yahoo and replied to Hotmail accounts. So I guess they have a check to try and discourage that legitimate, but undesirable from their perspective, use.

  • Receiver Mail Adapter

    Hi All,
    I am using Receiver Mail Adapter to send mails.
    When i choose Message Protocol the mail goes. But when i change it to XIPAYLOAD the mail doesnt go.
    I cannot find any errors in SXI_MONITOR or in adapter monitoring.
    My file is in this format..
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Mail xmlns:ns0="http://sap.com/xi/XI/Mail/30">
      <Subject>Mail From XI new</Subject>
      <From>kmadmin</From>
      <To>[email protected]</To>
      <Content_Type>text/plain</Content_Type>
      <Date>2006/08/24</Date>
      <Content>Test mail from XI</Content>
      </ns0:Mail>
    Tried both ways..
    XIPAYLOAD without “Mail Package”
    XIPAYLOAD with “Mail Package”
    Can anyone temme where im going wrong..or any settings which i need to do.

    Bhavesh
    <i>Am not sure which SP onwards this is applicable. But , did you select and try with MAIL PACAKGE also selcted.</i>
    Tried using both wayz..
    You dont need to create ,http://sap.com/xi/XI/Mail/30  namespace in IR.
    The mail is going now..
    just disabled
    Content_type, Date in Mapping.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Mail xmlns:ns0="http://sap.com/xi/XI/Mail/30">
      <Subject>Mail ALert XI</Subject>
      <From>kmadmin</From>
      <To>[email protected]</To>
      <Date>2006/08/24</Date>
      <Content>SQL Server Is Not Working</Content>
      </ns0:Mail>
    Thanks
    SUmit

  • Receiver Mail Adapter for PI 7.1 ehp1

    Hi Experts,
    Is there a way by using Mail Adapter (Receiver) to read the contents of the payload (which is considered also as the attachment) to be included in the body of the email?
    Appreciate your help in advance. Thanks!
    Cheers,
    R-jay

    Hi Shabarish,
    Thanks for your answer.
    I guess you misunderstood my query. What I would like to do is not to read the content of the email, but to read the content of payload and includes it on email. Using receiver mail adapter as standard (without using module or UDF), and configuring it as to sending the payload, you are just sending an email to the recipient with an attachment without any message in the body.
    What I would like to know is how to send an email with details (on its body) taken from the information of the payload.
    Cheers,
    R-jay

  • Content-Disposition - Dynamically set in Mail Adapter

    Hi All,
    I need to dynamically set the Content-Disposition in the receiver mail adapter so as to facilitate dynamic names for my attachment in the mail.
    In case i use messagetransform bean, I will have to hard code the name as part of the parameter value in the adapter.
    Is there any way i can utilize the ASMA and dynamic configuration here?
    The specified item was not found. - i referred the blog but instead of setting the
    attachmentXML.setName(mailFileName);
    attachmentXML.setContentType("text/xml");
    attachmentXML.setContent(by);
    I need to set the content disposition. Is there any way?
    Appreciate all help on this issue.
    Regards,
    Shabz

    Hi Vijay,
    Do have the solution for this? I also have the same requirement.
    Please forward me the solution.
    Thanks,
    Nat

  • Receiver Mail adapter - mail package - mail not received

    Hi guys!
    I'm using receiver mail adapter and when I want to use Mail Package (subject is assign dinamically based on mapping) I do not receive the e-mail. When I switch to not using Mail Package, the mail is sent correctly..
    In RWB everything seems to be ok, it says mail sent successfully... just not to my outlook
    Any ideas, what could be wrong?
    Thanx a lot!
    Olian

    Hi Stefan,
    thank you 4 reply..  I checked it. To be sure - I copied the content of the To tag and put it into my Outlook and sent an e-mail... It has arrived
    I can't understand this..
    Which fields are neccessary to fill? Is from, to and content enough? I think it should be...
    Thank you!
    Olian

  • In Receiver Mail Adapter ,how to ignore SOAP Header attachment

    HI Folks,
    Am using Receiver Mail Adapter and am getting 2 attachments.
    1. one is Soap header which contains Control records
    2. payload
    I want only Payload as attachment and need to ignore SOAP Header(AT00001.xml).
    The configuration is as below:-Trasport protocol : SMTP
                                                Message Protocol: XIALL
    Please provide Inputs.
    Thanks & Regards
    Ashok Reddy

    Hi Gagandeep,
    Scenario: File------>mail( Bypass scenario)
    i had posted file in FTP and am getting attachment properly but aditionally am getting ATT00001.xml as SoapHeader.this i need to ignore.
    PFB Module Parametrs i used:
    localejbs/AF_Modules/MessageTransformBean   LocalEnterpriseBean    transform
    Modulekey                      Parameterattribute                        value
    transform                      Transform.ContentDisposition            attachment;filename=”Pocr_860.txt”
    transform                     Tansform.ContentType                       text/plain
    Regards
    Ashok

  • How to Configure Receiver Mail Adapter?

    I need to designed a BPM if Message is failed to update database then send an e-mail to alias group in Microsoft outlook by using Receiver Mail adapter.
    Can someone help me to design above BPM and how I need to configure receiver mail adapter.
    Thanks in advance!
    Mrudula

    I am getting  <Trace level="3" type="T">Unknown channel type: Mail</Trace> when it tries to call "MAIL" adapter.
    Does anyone has any clue where should I look?
    Thanks!
    Mrudula
    <Trace level="3" type="T">Calling pipeline service: PLSRV_CALL_ADAPTER</Trace>
      <Trace level="3" type="T">Reading Pipeline-Service specification...</Trace>
      <Trace level="3" type="T" />
      <Trace level="3" type="T">Pipeline service specification (table SXMSPLSRV)</Trace>
      <Trace level="3" type="T">PLSRVID = PLSRV_CALL_ADAPTER</Trace>
      <Trace level="3" type="T">PLSRVTYPE = =SWITCH=</Trace>
      <Trace level="3" type="T">ADRESSMOD = SD</Trace>
      <Trace level="3" type="T">P_CLASS =</Trace>
      <Trace level="3" type="T">P_IFNAME =</Trace>
      <Trace level="3" type="T">P_METHOD =</Trace>
      <Trace level="3" type="T">FL_LOG =</Trace>
      <Trace level="3" type="T">FL_DUMMY = 0</Trace>
      <Trace level="3" type="T" />
      <Trace level="3" type="T">Unknown channel type: Mail</Trace>
      <Trace level="3" type="T" />
      <Trace level="3" type="T">Pipeline service specification (table SXMSPLSRV)</Trace>
      <Trace level="3" type="T">PLSRVID = PLSRV_CALL_ADAPTER</Trace>
      <Trace level="3" type="T">PLSRVTYPE = AENGINE</Trace>
      <Trace level="3" type="T">ADRESSMOD = SD</Trace>
      <Trace level="3" type="T">P_CLASS = CL_XMS_PLSRV_IE_ADAPTER</Trace>
      <Trace level="3" type="T">P_IFNAME = IF_XMS_PLSRV</Trace>
      <Trace level="3" type="T">P_METHOD = ENTER_PLSRV</Trace>
      <Trace level="3" type="T">FL_LOG =</Trace>
      <Trace level="3" type="T">FL_DUMMY = 0</Trace>
      <Trace level="3" type="T" />
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL" />

  • Receiver Mail Adapter: Formatting the mail content

    Dear All,
    I'm using a receiver mail adapter. I would like to format the content of the mail using the contents of the XML message. For example:
    XML Message
    <Order>
      <OrderID>1234</OrderID>
      <CustomerName>Sandeep Joseph</CustomerName>
      <NetValue>7467.99</NetValue>
      <Link>http://locahost:7000?OrderID=1234</Link>
    </Order>
    Mail Content
    Dear Approver,
    Please approve the Order - 1234, Customer - Sandeep Joseph
    Link: http://locahost:7000?OrderID=1234
    Thanks,
    Are there any modules which would help formatting to this extend? Or any other mechanism?
    Thanks,
    Sandeep

    The easiest means is to use XSL mapping and create the Content Type as HTML and emded the cotent within HTML tags.
    One such example is shown by Praskash in this blog,
    /people/community.user/blog/2006/09/07/email-reporting
    /people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
    If you use the Mail Package option then you can also wite a UDF in your mapping that will populate the content field. For every newline you can use the java new line \n and so on.
    Regards
    Bhavesh

  • Receiver Mail adapter Content type issue

    Hello,
    I am formatting the body of the receiver mail. The body of the email  should look like below.
    Dear PI User,
    The following Interface has been successfully processed by the middleware PI system.
    Please do not reply to this email. If you need more information please contact the Super User.
    Regards,
    SAP PI Team
    The mapping looks fine and My source MT looks like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:MT_Mail_Reply xmlns:ns1="http://test.com/Mail/Reply"> 
    - <Reply>  [0..unbounded] 
    - <Item> [0..unbounded] 
    <MESSAGE>Dear Business User, </MESSAGE>   [0..1] 
    /Item>
    - <Item> 
    <MESSAGE>The following Interface has been successfully processed by the middleware PI system.</MESSAGE> [0..1]
    </Item>
    - <Item> 
    <MESSAGE>Please do not reply to this email. If you need more information please contact the Super User.</MESSAGE> [0..1]
    </Item>
    - <Item>
    <MESSAGE>Regards,</MESSAGE> [0..1] 
    </Item>
    - <Item>
    <MESSAGE>SAP PI Team </MESSAGE>  [0..1]
    </Item>
    </Reply>
    </ns1:MT_Mail_Reply>
    The mapping works fine without errors and I get the target message as below after mapping-
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30"> 
    <Subject>ISAP PI Interface Status</Subject> 
    <From>[email protected]</From> 
    <To>[email protected]</To> 
    <Content>Dear Business User</Content> 
    <Content>The following Interface has been successfully processed by the middleware PI system.</Content> 
    <Content>Please do not reply to this email. If you need more information please contact the Super User</Content>
      <Content>Regards,</Content>
      <Content>SAP PI Team</Content>
    </ns1:Mail>
    t
    The context of MESSAGE has been changed to Reply.
    In the adapter I still get the following error.       
    Delivery of the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.af.sdk.xi.srt.BubbleException: Failed to call the endpoint  [null "null"]; nested exception caused by: com.sap.aii.af.sdk.xi.util.XMLScanException: expecting end tag: {http://sap.com/xi/XI/Mail/30}Mail, but found {}Content at state 1
    Please advise !!
    Thanks,
    Teresa
    **I changed the receiver mail adapter to not use Mail package and I receive an email without errors with the Content as mentioned above. **

    Hi Teresa,
    I think the problem is that you are using multiple "Content" tags. Have you tried to use only one?, you can concatenate all your text.
    Check the page 3 of this document to know how introduce new-line character http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0964d7c-e66e-2910-24bb-ac535e4a5992?overridelayout=t…
    Regards.

  • Dynamic attachment name with receiver mail adapter and use mail package

    We need to send mapped XML payload as attachment (with dynamic name) to a recepient (recepient email id is part of input xml payload, but not part of the mapped XML payload).
    I could probably do this using the adapter module (as per the following link),
    http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Set%20Attachment%20Name?bc=true
    I would like to explore if this would be feasible using Mail package and XI payload.I already have a Java mapping that is converting the input XML to required Output format. If I am using Mail package (XI Payload), how do I go about sending this Output XML from java mapping as attachment to email id available in the input payload?

    Hi,
    1) XML payload as attachment (with dynamic name)
    2) recipient (recipient email id is part of input xml payload, but not part of the mapped XML payload)
    These two is possible by using Mail Package. You have a standard xsd for mail package which you can download from the SAP Note 748024.
    The xml created in you java mapping which will be your attachment should be put into the <content> tag of the mail package xml structure. and the file name can be set in the <Content_Type> tag.
    <?xml version="1.0"; encoding="UTF-8"?>
    <p2:Mail xmlns:p2="http://sap.com/xi/XI/Mail/30">
    <Subject>My Invoice</Subject>
    <From>from email address<;/From>
    <To>to email address</To>
    <Content_Type>text/plain;name="MyFile.csv";</Content_Type>  --> file name here
    <Content>123;A49;aaa</Content>   -> attachment xml here
    </p2:Mail>
    And you have to select MailPackage in the receiver mail adapter.
    Regards,
    Aravind

  • Swapping attachment to content on Receiver Mail Adapter

    Hi Experts,
    Can I move my attachment data to content on receiver mail adapter ? I am not using Mail package or mapping. I tried using Payloadswapbean on receiver adapter but adapter generated email with attachment only with and without Payload swap bean module.
    Please let me know if it is possible without using Mail Package.
    Thanks,
    Ankit

    Hi there,
    If you want to use attachment in content, then you need to collect the entire mail content in BPM. From there you can use Payloadswap bean on receiver adapter.
    The reason behind using BPM is that the attachment is maintained only in Integration Directory. First the mapping converts the source into mail and then just before moving to receiver the attachment gets added to the mail(i.e. after mapping). So if a BPM is used then all the mail content with attachment will get transported to BPM first and then to the receiver with the above change (Payloadswap bean i.e transferring the attachment to content).
    Best Regards,
    Souvik

Maybe you are looking for

  • InfoPath Formula in the File Name Field

    I used the Now() formula as it shows like this:  "2015-04-14T09_35_26".    I want to shorten the field name to display it in the list as "DD/MM/YYYY". I was thinking of the String-length formula but not sure how to do it? Mike

  • Creating Logout button and invalidating session

    Hello All: I'm new to java and I'm trying to figure out how to log a user out of a web servlet. Basically I just have a link that returns the user to the first servlet (my login servlet) called log out. I am wondering if when I click on that link (or

  • Database Refresh error

    Hi John, I have multiple queries now 1. I pushed the account hierarchy using ODI. Capex and Wrkforce have been initialised on my application before pushing the hierarchy. In the log it show that member 'buildings' already exist. When i checked the hi

  • Inconsistent cache even though SXI_CACHE says cache contents are uptodate

    Hi all, The status of SXI_CACHE says contents are up-to-date, but the cache is still inconsistent. For example, I cant see the  sender agreement, sender communication channels, but I am able to see the reciever agreement, etc. All the configuration o

  • In CS6 I get a CS4 error message?  How to cure?

    I have deactivated and uninstalled CS4 from a laptop. CS5 was installed but never activated, it is uninstalled.   I have installed, updated and activated CS6.  I cannot open .psd or .jpg files from Bridge by any rouite I know.  I get:  "Windows canno