cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic mail subject in File2Mail Scenario

former_member183906
Active Contributor
0 Kudos

We are doing File2Mail scenario. We r sending 5 files in 5 mails with 5 diff subjects by MAIL adapter.

Can anyone guide me how to send 5 files as attachment in one single mail with different mail subjects :

File names are - Employee_Leave,Base,Super,Loss,Profit.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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" ?>

- <!--

SAP takes no position regarding the validity or scope of any intellectual property or

other rights that might be claimed to pertain to the implementation or use of the

technology described in this document or the extent to which any license under such

rights might or might not be available; neither does it represent that it has made any

effort to identify any such rights.

Copyright © SAP 2003-2004. All Rights Reserved.

This document and translations of it may be copied and furnished to others, and derivative

works that comment on or otherwise explain it or assist in its implementation may be

prepared, copied, published and distributed, in whole or in part, without restriction of

any kind, provided that the above copyright notice and this paragraph are included on all

such copies and derivative works. However, this document itself does not be modified in

any way, such as by removing the copyright notice or references to SAP.

This document and the information contained herein is provided on an u201CAS ISu201D

basis and SAP DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO

ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY

IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

-->

- <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">

- <!--

  • Mail

-->

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

Milan.

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi ,

Here the blog to achive multiple files to send a single mail.

[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816]

You can achive the dynamic subject in the mail using Adapter-Specific Message Attributes.

[http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm]

*Reward Points If Helpful*

Regards,

Prakasu.

Edited by: prakasu on May 29, 2008 3:11 PM

former_member183906
Active Contributor
0 Kudos

yeah..u r right..

5 mail, 5 attachments and one communication channel for sender & receiver..

this is the query..

former_member183906
Active Contributor
0 Kudos

i need 5 file attachments in one mail with different subjects...

can anyone help in it.. wat replies i got yet doesn't meet my req..

Former Member
0 Kudos

Hello Vijay,

How can one mail contains 5 subjects...Check your query once agin

former_member537867
Active Contributor
0 Kudos

Hi Vijay,

Plz go thru the links given below it may help u :

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

Mail Adapter Scenario:

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

Messages with Attachments:

/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments

Check these blog may be helpful to you

/people/sap.user72/blog/2005/06/08/sending-attachments-in-mails

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken]

/people/sravya.talanki2/blog/2006/01/12/xi-triggering-e-mails-with-multiple-attachments--problems

/people/stefan.grube/blog/2007/03/29/troubleshooting-soap-http-and-mail-adapter-scenarios-with-tcpgateway

Regards,

Vinod.

samiullah_qureshi
Active Contributor
0 Kudos

Hi

Go through folowing blog

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1361] [original link is broken] [original link is broken] [original link is broken];

Regards

Sami

Reward points if helpful.

stefan_grube
Active Contributor
0 Kudos

> Can anyone guide me how to send 5 files as attachment in one single mail with different mail subjects :

I do not get this. Do you want 5 mails, or one mail with 5 files?

For the mail subject, you can use adapter specific message attributs. Chek online help for details:

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

Regards

Stefan