Mail Adapter - Dynamically maintaining To and From Parameters

Hi all,
I am using the mail adapter as receiver in my scenario where i need to set up the TO and FROM parameters dynamically in the adapter configuration. Can any body please suggest how to do that?
Thanks
-Kulwant

Kulwant,
Did you gone thru this link?
http://help.sap.com/saphelp_nw70/helpdata/EN/6b/4493404f673028e10000000a1550b0/content.htm
use the below code
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail","THeaderTO");
String to_add = "[email protected]"
conf.set(key, to_add);
return ""; 
raj.
Edited by: Raj on Oct 29, 2008 3:55 PM

Similar Messages

  • 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,

  • E-mail adapter : dynamic recipient with an attachment

    Hi,
    I read the weblog from Michal Krawczyk about implementing
    of dynamic recipient of e-mail adapter.
    I need this functionality and above that I need to include IDOC in e-mail message as an attachment.
    Will transformed IDOC by mapping attached to created e-mail message when I check "Keep Attachments" checkbox.
    Thank you.
    Marian.

    Hi Marian,
    everything what you need is possible
    what would you like to know?
    steps:
    1. if you have sp14 put the address name in the mapping
    2. attach the idoc in the attachment - standard
    3. use "Keep Attachments" in the mail adapter
    Regards,
    michal

  • Mountain Lion Mail randomly deletes messages: locally and from server

    Hello,
    Mountain Lion Mail deletes mails randomly, locally and from the IMAP server.
    I have confirmed this for a fact:
    - I have been forwarded lost mails to another (webmail) account: the timestamps indicate that some mails were lost somewhere before I ever saw them on Mail
    - my mail service provider confirmed that their logs show mails that I never saw on Mail
    - the lost mails don't appear via webmail, either, i.e. they're not on the server
    Others are experiencing the same in Lion:
    http://www.seifi.org/email/lion-mail-app-deletes-imap-emails-without-notice-gmai l-important-fix.html
    https://discussions.apple.com/thread/3206902
    I became aware of this as my customer referred on the phone to messages from them that I had never seen. And, Mail deletes messages randomly from the IMAP server too - it's literally eating messages!
    No, this is not a rule issue. No, this is not anything I could have done to cause. This should be evident as very many others are experiencing the same (see the above links).
    This is the worst bug I've ever encountered in any Apple product.
    Apple need to acknowledge this and address it, like, immediately.
    Is there a fix for this? One that works 100% - I really can't risk not receiving business e-mail.
    br Janne

    I'm experiencing something similar. I see a message being received in Mountain Lion via notification. When I'm going to look for this mail, it's gone.
    I dont't have any rules set up and no mail plugins installed. The mail is also vanished from the server. I'm using IMAP on my own web-site (via a service provider). I was able to verify, that a certain message from a certain sender dissapeard, which had a PDF attached. I thought it might have something to do with my ISPs virus protection, but they a) insured me, that they don't delete any mail and b) I got a new mail from someone I don't know this morning. Again: Saw the notification, afterwards the mail is gone.
    For now, I will switch to ThunderBird (this was also the recommendation of my ISP).
    Kind regards
    Marco Heine

  • Is it possible to call mail adapter in a UDF

    Hi,
    In my mapping if I find that, a field length is more than 50 I need to mail this field in the body of a mail. Can I call the receiver mail adapter in a UDF similar to RFC/JDBC adapter?
    Thanks.

    Is your scenario contains mapping apart from this?
    If not then you can use mailadapter message type provided by SAP.
    i dont think you have mapping other than as you want to pass this directly to content right?
    Its possible to access body in UDF.
    /people/samuel.chandrasekaran2/blog/2008/10/06/xi-mail-adapter-dynamically-building-attachment-and-message-body-content-using-a-simple-udf
    Rajesh

  • Dynamic Subjet in Mail Adapter

    Hi everybody,
    Landscape: I would like to fill dynamically the "Subject" field in a Mail Adapter. We receive data from a JMS Adapter and if no rule match the condition, it will send an email with the DCJMSCorreleation in the subject or in the body. In addition, we can receive flat or xml files.
    I tried to use an Mail Package, with a XSLT mapping but it doesn't run with a flat file (XML Parser error in Integration Engine). Then, I tried to use a SOAP adapter but we encountered the same issue with the flat file.
    Is someone can help me?
    -> How to allow flat file handling in XSLT or SOAP Adapter?
    -> How to get value from the SOAP Document?
    Many thanks in advance,
    Regards,
    Landry

    Many thanks for your help!
    With a Java Mapping (or UDF), it works perfectly. Here the code of the Java Mapping used in order to fill the DCJMSCorreleationID in the mail's subject:
    // Retrieve the DCJMSCorreleationID
                   trace = (AbstractTrace) param
                             .get(StreamTransformationConstants.MAPPING_TRACE);
                   DynamicConfiguration attrib = (DynamicConfiguration) param
                             .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                   DynamicConfigurationKey fileKey1 = DynamicConfigurationKey.create(
                             "http://sap.com/xi/XI/System/JMS", "DCJMSCorreleationID");
                   DynamicConfigurationKey fileKey2 = DynamicConfigurationKey.create(
                             "http://sap.com/xi/XI/System/Mail", "THeaderSUBJECT");
    // Set the mail subject with the DCJMSCorreleationID
                   attrib.put(fileKey2, "Unknown DCJMSCorreleationID: "
                             + attrib.get(fileKey1));
    Regards,
    Landry

  • Dynamically pass subject via mail adapter without using mail package

    Hi,
    We have requirement to pass the Dynamic variable as Mail subject
    we can't use Mail Package as we need to capture the data from Dynamic SOAP header Data from incomming channel
    Dynamic SOAP Header variable (XHeaderName1) comming from Sender SOAP channel.
    Receiver side we need to capture that XHeaderName1 in Mail Adapter channel using ASMA and Variable transport binding so that value of XHeaderName1 should overwrite Subject under General/ Mail Atribute section.
    Could you please let me know, how to handle this requirement using module configuration?
    Also suggest the correct configuration to use ASMA and Variable transport binding.
    Regards
    Venky

    Hi Venky,
    Please have a look at the links below. They should help you.
    Configuring the Sender SOAP Adapter- https://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm
    Configuring the Receiver Mail Adapter-https://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
    Adapter-Specific Message Attributes in the Message Header  -https://help.sap.com/saphelp_nw04/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/content.htm
    Regards,
    Jannus Botha

  • Mail Adapter: XIALL and attachments

    Hi All,
    I have a scenario with Sender Mail adapter, where I need data from both the Mail and the attachment.
    I tried using XIALL, but get a SAXParserException.
    Is there any other way that I can use both Main Payload as well as Attachment fields?
    Regards,
    Puloma.

    Like i mentioned only one of the two ( eithetr the attachment or the payload ) can be used as the source of your mapping.
    You might have to consider another option for this.
    Either use a BPM in your mapping and have duplicatre mails in your mail box. So, you can have both these attachment and the main paylaod in the different Receive step in your BPM and then have a N:1 mapping inside the BPM.
    Regards
    Bhavesh

  • Body and Signature not getting in reciever mail adapter

    Hi Friends,
    My requirement is the reciever mail adapter having the Attachment and Body and signature.
    Here i am getting Attachment only. I am not getting Body( example: the ftp successfully genrated this file abbc_12/03/2014.txt) and Signature.
    Signature  like
    Thanks
    company name.
    Thanks
    Bhanu

    Hi Galla,
    I have some doubts about your scenario, Is your scenario FTP to MAIL?,  do you want to send the file as attachment or you want the file content as mail body or where the body is taken? where is the signature, inside the file?
    Meantime, you can check these documents about file-mail scenario:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0a27c01-26b0-2c10-bd8a-94498efa7ff6?quicklink=index&overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/5083371b-5bd2-2e10-3f8b-ad877d24c9ce?QuickLink=index&overridelayout=true&52475910426407
    Regards.

  • Display results from dynamic query created and executed inside procedure

    Hi;
    I have created this code:
    CREATE OR REPLACE PROCEDURE RunDynamicQuery(Var1 IN VARCHAR2, Var2 IN VARCHAR2, VAR3 IN VARCHAR2) AS
    -- Do something
    -- That ends up with a variable holding a query.... (just an example)
    MainQuery :='select sysdate from dual';
    end RunDynamicQuery;
    How can I run this procedure and see the result on the dymanic query generated inside it?
    BEGIN
    compare_tables_content('VAR1','VAR2','VAR3');
    END;
    Expected Output for this given example:
    20-05-2009 11:04:44 ( the result of the dymanic query inside the procedure variable MainQuery :='select sysdate from dual';)
    I tested with 'execute immediate':
    CREATE OR REPLACE PROCEDURE RunDynamicQuery(Var1 IN VARCHAR2, Var2 IN VARCHAR2, filter IN VARCHAR2) AS
    -- Do something
    -- That ends up with a variable holding a query.... (just an example)
    MainQuery :='select sysdate from dual';
    execute immediate (MainQuery );
    end RunDynamicQuery;
    BEGIN
    compare_tables_content('VAR1','VAR2','VAR3');
    END;
    Output:"Statement processed'' (no sysdate displayed ! )
    Please consider that the collums in the query are always dynamic... PIPELINE Table would not work because I would need to define a container, example:
    CREATE OR REPLACE TYPE emp_tabtype AS TABLE OF emp_type;
    FUNCTION RunDynamicQuery (p_cursor IN sys_refcursor)
    RETURN emp_tabtype PIPELINED
    IS
    emp_in emp%ROWTYPE;
    BEGIN
    LOOP
    FETCH p_cursor
    INTO emp_in;
    EXIT WHEN p_cursor%NOTFOUND;
    PIPE ROW (...)

    That would be a nice solution, thanks :)
    ''For now'' I implemented like this:
    My dynamic query now returns a single string ( select col1 || col2 || col3 from bla)
    This way I don't have dynamic collumns issue, and from business side, this ''string'' format works for them.
    This way I can use the pipelines to get the result out...
    OPEN myCursor FOR MainQuery;
    FETCH myCursor
    INTO myRow;
    WHILE (NOT myCursor%notFound) LOOP
    PIPE ROW(myRow);
    FETCH myCursor
    INTO myRow;
    END LOOP;
    CLOSE myCursor;

  • Sender Mail Adapter consegue ler emails com HTML?

    Olá pessoal,
    Encontrei um "issue" onde estou deconfiado de uma limitação do Mail Adapter.
    Gostaria de ouvir suas opiniões.
    O cenário usa um Canal de Comunicação do tipo Mail com XIPAYLOAD em uma caixa POP3, com as seguintes variantes:
    - com ou sem Mail Package;
    - com ou sem encoding;
    - mantendo os anexos.
    Independente das variações acima o resultado do email proveniente do POP é TEXTO.
    Será que o Mail Adapter suporta mensagens HTML?
    Será que o Mail Adapter suporta multipart/alternative Content-Type?
    >Versão do PI: SAP PI 7.0 SP14
    >Mail Server: Lotus Domino 7.0.x
    []´s
    Marlo Simon.

    Marlo,
    o content type é lido a partir do MIME Header que o Cliente de email que enviou a mensagem cria.
    Em geral, mesmo colando um conteudo XML no corpo do email, se o Content Type no Header vier text, o adapter vai interpreta-lo como texto.
    Se vc sabe que o conteudo sempre vai ser um XML, existe uma maneira de forcar que o adapter sempre sete o content type como xml, atraves do parametro avançado IMail.AssumeXMLContent. Veja o help do Sender Mail Adapter:
    Advanced Mode
    To specify additional parameters in the adapter configuration, set the Advanced Mode indicator.
    Specify the additional parameter names and parameter values in the table:
    ●      For the security settings, enter values for the receiver party and receiver service here.
    ●      In the table, set the parameter IMail.AssumeXMLContent = true. The text of the message is then interpreted as XML and is copied unchanged to the mail package. If this parameter is not set, the information is copied from the content type of the MIME header. If the type specified there is application/xml or text/xml, the text of the message is copied as XML; otherwise it is copied as text.
    Abs,
    Henrique.

  • Change attachment name using mail adapter

    Hi All,
    I have a problem changing the attachment name in my scenario. I use Mail scenario to send a pdf Attachment from R/3 to email address. Everything working fine except the attachment name that becoming untitled.pdf and untitled.txt.
    Communication Channel setting :
    message protocol : xipayload
    transport protocol : smtp
    checked use mail package
    checked keep attachment
    I have use MessageTransformBean in my receiver adapter, but no luck. It was produce an error.
    anyone have an idea to solve my problem?
    thx,
    Robby

    Hi,
    You need to go to the Module tab of the Mail adapter receiver communcation channel and give the parameter as Transform.contentDisposition and its value as attachment ( since you needed the output to be sent as an attachment) and give the name of the attachment as you required.
    Please see the help page : [http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm] for more details and more options of the parameters.
    Regards,
    Kalpana.

  • Mail Adapter Receiver

    Hi,
    I am trying to configure a receiver mail adapter.  I am not using the mail package, instead using the direct xml.  I tried the SMTP address of hotmail and gmail and it didn't work.
    Here are the connection parameters:-
    URL = smtp://smtp.gmail.com
    Authentication Method = Plain
    User = myGMAILId
    Password = myGMAILpassword
    From = myGMAILId
    To = myGMAILId
    Content Encoding = base64
    I searched all the mail adapter blogs in SDN and it didn't help.  Can someone suggest what's missing.
    Appreciate your help.
    Krish

    > I am trying to configure a receiver mail adapter.  I am not using the mail package, instead using the direct xml.  I tried the SMTP address of hotmail and gmail and it didn't work.
    Company firewall often block smtp calls to outside world.
    You should use an internal mail server.

  • How to download / read  text attachment  in Sender Mail Adapter  IN XI

    Hi
    I would like to know how to download / read text attachment in sender mail Adapter & sent same attachment to target system using file adapter.
    Please help how to design / resolve this concept.
    Regards
    DSR

    I would like to know how to download / read text attachment in sender mail Adapter & sent same
    attachment to target system using file adapter.
    Take help from this blog:
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    From the blog:
    However in most cases
    our message will not be a part of the e-mail's payload but will be sent as a file attachment.
    Can XI's mail adapter handle such scenarios? Sure it can but with a little help
    from the PayloadSwapBean adapter module
    Once your message (attachment) is read by the sender CC, you can perform the basic mapping requirement (if any) to convert the mail message fromat to the file format.....configure a receiver FILE CC and send the message...this should be the design...
    Regards,
    Abhishek.

  • Sender Mail adapter get no mails

    Hello,
    we are using the sender mail adapter to receive mails (IDOCS) from a Exchange server.
    A few days it works, but suddenly no mails are received.
    But in RWB the mail adapter status is green and shows, that there are no new mails. But when I check the mail box with OUTLOOK, there are some mails.
    When I deactivate and activate the mail adapter, all mails are read then.
    Pollinterval: 1 minute
    XI: SP10
    Who can help me are had s similar problem?
    Or is it possible to stop/start the mail adapter (or the adapter engine) automaitcally (more like a workarround)
    best regards
    Werner Magerl

    Hi All,
    I chekced your responses and tried accordingly. Our basis team has given me new link now and the error message has changed. I am getting following error message.
    exception caught during processing mail message; java.io.IOException: unexpected login response; read 001F BAD Command received in Invalid state.
    Does anyone have any idea what this error is?
    Thanks in advance,
    Devendra

Maybe you are looking for

  • Its like BT don't want my custom, 3 months + for i...

    Sorry for the vent but I have to get my sheer frustration about BT out I live in a rural area, that for years has been plagued with substandard ADSL broadband, 2-3Mb on a good day, so imagine my joy when I find out that BT will be installing Fibre to

  • Mac Mini late 2012 turns on after electrical failure

    Hi. I bought a Mac Mini (late 2012 model) with OS X Mountain Lion in November 2013. I upgraded to OS X Mavericks. I have not changed any of my Mac's settings. They are all on default settings. Under Energy Saver, only "Put hard disks to sleep when po

  • In which cases can the ABAP statement CALL TRANSFORMATION be used?

    Hi friends, here is my questions with options below. In which cases can the ABAP statement CALL TRANSFORMATION be used? (T/F) -To transform as iXML document object into and ABAP data structure using XSLT. - To transform an XML document contained in a

  • How to improve the performance of General information in MSS

    HI, We are facing with critical performance issue in General information screen of MSS. For one employee number of subordinates are more than 3500 and because of this no of database hits for fetching all the records are more than 20,000 and each data

  • Can i use sql server 2000 instead of oracle9i or aoracle 10g

    presently i am working in oracle10g it work fine. for retiveing the data, know requirement is sql server 2000 so please guide can i do it if so how to configure, its very ergent for me,