on 06-02-2008 8:01 AM
Hi ,
I am doing File to mail scenario.
I have 5 files in FTP Server ( sap1.txt , sap2.txt , sap3txt , sap4txt , sap5.txt)
I need to attach all the files to single mail and send the mail to receipient.
I an not using IR simply configuring the adapters in ID.
I am able to attach single file and sending , But how to attach all the files in a single mail and send it.
Kindly help me for the scenario.
" Points will be awarded "
Regards,
Jayasimha Jangam.
hi
You can do it by Java mapping
XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
/people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping
Refer
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
Here only one attachment is sent but you can send it one by one (in a loop) from adapter module just check sample adapter modules code from SAP in this blog and you will find how to do it
also refer
XI: Triggering e-mails with multiple attachments
/people/sravya.talanki2/blog/2006/01/12/xi-triggering-e-mails-with-multiple-attachments--problems
thanks
sandeep
if helpful reward points
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jayasimha,
in file name attribute of file adapter give the file name as *.txt so that it will pick all the file with. txt extention and all be sent as a attachment.
Reward Points if helpful
Thanks
Sunil Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
you can use dynamic addressing wherein you can provide the mail related information in your mapping.
for example the to, from, subject and content.
so you can map these fields form the input structure or you can have a constant to map it.
refer to this blog it will really help.
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
the only differerence in your case is that you need file as attachment so mark the keep attachment field.
it will ask you for a mail structure.
use this structure as your target structure.
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="http://sap.com/xi/XI/Mail/30" xmlns:xi="http://sap.com/xi/XI/Mail/30" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Mail">
<xs:annotation>
<xs:documentation>Mail package for XI - Mail Adapter</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Subject" type="xs:string" minOccurs="0" />
<xs:element name="From" type="xs:string" minOccurs="0" />
<xs:element name="To" type="xs:string" minOccurs="0" />
<xs:element name="Reply_To" type="xs:string" minOccurs="0" />
<xs:element name="Content_Type" type="xs:string" minOccurs="0" />
<xs:element name="Date" type="xs:dateTime" minOccurs="0" />
<xs:element name="Message_ID" type="xs:string" minOccurs="0" />
<xs:element name="X_Mailer" type="xs:string" minOccurs="0" />
<xs:element name="Content" minOccurs="0">
<xs:annotation>
<xs:documentation>any type</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="encoding" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="MailReceipt">
<xs:annotation>
<xs:documentation>Mail Receipt for XI - Mail Adaper</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Server" type="xs:string" />
<xs:element name="Format" type="xs:string" />
<xs:element name="UseMailPackage" type="xs:boolean" />
<xs:element name="Encoding" type="xs:string" />
<xs:element name="Subject" type="xs:string" minOccurs="0" />
<xs:element name="From" type="xs:dateTime" minOccurs="0" />
<xs:element name="To" type="xs:string" minOccurs="0" />
<xs:element name="Date" type="xs:dateTime" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
reward points if useful.
regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.