Email attachment file name
Hi,
I have a macro that executes when the user sends an email. In this macro, I want to get the subject of the email itself and the titles of all of its attachments (be they documents or other embedded emails that were attached).
To get the email subject, I use Groupwise.ComposingItem.subject
To get the attachment filename, I use Groupwise.ItemAttachmentGetDisplayName("X00", <attachment_index>)
However, this call only seems to work for document attachments. For other emails embedded in the current email as attachments, this call returns "Mail Attachment" instead of the name of the attached email. How can I get and modify the name (i.e. subject) of the attached email?
Thank you,
M
Embedded emails do not have names.
If you want a name for an embedded email, you will
have to read the embedded email and get the subject.
You can not modify embedded emails.
Peston
>>> On Tuesday, September 28, 2010 at 6:50 AM, MK<[email protected]> wrote:
> Hi,
>
> I have a macro that executes when the user sends an email. In this macro,
I
> want to get the subject of the email itself and the titles of all of its
> attachments (be they documents or other embedded emails that were
attached).
>
> To get the email subject, I use Groupwise.ComposingItem.subject
>
> To get the attachment filename, I use
> Groupwise.ItemAttachmentGetDisplayName("X00", <attachment_index>)
>
> However, this call only seems to work for document attachments. For other
> emails embedded in the current email as attachments, this call returns
"Mail
> Attachment" instead of the name of the attached email. How can I get and
> modify the name (i.e. subject) of the attached email?
>
> Thank you,
> M
Similar Messages
-
How to get email attachment file name?
Hi,
I have a macro that executes when the user sends an email. In this macro, I want to get the subject of the email itself and the titles of all of its attachments (be they documents or other attached emails).
To get the email subject, I use Groupwise.ComposingItem.subject
To get the attachment filename, I use Groupwise.ItemAttachmentGetDisplayName("X00", <attachment_index>)
However, this call only seems to work for document attachments. For other emails attached to the current email, this call returns "Mail Attachment" instead of the name of the attached email. How can I get the name (i.e. subject) of the attached email?
Thank you,
MonikaHi Experts,
i try useing the DMS_KPRO_READ prog as you said above.
The problem is that i need to retrieve list (range) of documents and than save them.
as it written now , i can do it just about one file.
if u have any helpfull advice it will be real kindly.
Thanks alot.
Yuval.
Edited by: student student on Nov 16, 2009 10:20 AM -
I have a sender mail adapter that picks up emails with file attachments from a mail box using the IMAP transport protocol.
The mail adapter passes processing onto the PayloadSwapBean and then onto a customised module that processes the file attachment (a CSV file).
When I use the messaging system i.e. http://xiserver:port/MessagingSystem/monitor/monitor.jsp
I can see that Content-Type includes the attachment's file name:-
Content-Type: application/octet-stream;name="INV_5016888091848_20060912_00001.csv"
Content-Disposition: attachment;filename="MailMessage.bin"
Content-Description: MailMessage
In my customised module I would like to pick up this file name so that it can be stored in a database table. I have attempted to pick up this file name from the payload using the "getContentType" method of the "XMLPayload" class but this only returns "application/octet-stream" and does not include the file name.
Does anyone know how I can get hold of the above file name using the Adapter Framework API? Or, alternatively, by some other method/approach.
Any help on this would be greatly appreciated.Hi,
I never used this but an idea.Have a try ..
Please chcek this link -
http://help.sap.com/saphelp_nw04/helpdata/en/8d/a9d240a0a98431e10000000a1550b0/frameset.htm
Please check for Adapter -Specific Message Attributes
->To store adapter attributes in the message header of the XI message, set the Use Adapter-Specific Message Attributes indicator.
The following attributes are added to the XI message header if the sender makes them available, and if you choose Variable Transport Binding.
To transfer further header fields, set the relevant indicator. You can then store the following attributes and their values in the XI message header:
You can set the details in header with the file names you required like this Variable Header-> XHeaderName1
Nanda -
Mail adapter - how to dinamically change attachment file name in sending
How can I dynamically change the attachment filename when preparig email to be sent? The attachment is an invoice in XML format and I have to put the invoice number into the attachment file name.
Thanks in advance.
Giuseppe.Hi,
Go through this docs.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05
http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
Hope these bloga are useful..
/people/community.user/blog/2006/09/07/email-reporting
/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
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/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
Thanks,
Satya -
Javamail API doesn't support special characters in attachment file name
Hi,
We are using Java Mail API to retrieve the attachment's file name, but it sometimes returns the file name as junk character (if the attachment contains special characters) and it is not able to return original file name for some attachments:
Our code sample :
void getFileName(Part part) {
String fname=null;
fname = part.getFileName();
Actually the problem is with the attachment file name which contains special character. For example below is the attachment file name (please find the sample attached file which is causing this issue):
Sample – 1234abc.doc
From above you could see the file name contains a special character (Sample – 1234abc.doc), i.e. The character ‘–’ is not a regular hyphen character, it’s a special character. Hence the Java mail API returns the name as below:
Sample ? 1234abc.doc
So the special character is being replaced with ‘?’ symbol. But if I store this file in local folder and try reading the file name using Java IO packages, it returns the file name without adding ‘?’ symbol.
Is there any way to handle such kind of special characters in Mail API?
Regards,
VinodhWe dealt with this issue in a private email conversation.
JavaMail is returning the correct data for the filename. The problem is in the way the filename is being displayed. -
Burst by email - specify file name
Hello All,
I have implemented the bursting by email functionality for one of my reports. I have tested this report. Everything is working fine. I am able to receive emails with file attachements.
The problem is the attached file names are prepended with some xmlp_12345678_ .
Ex: if the building_id is 'AB0001' , the file name in the attachement is xmlp_23456789_AB0001_1.xls.
I would like to know is there any way to get it as AB0001.xls.
I tried to give bldg.building_id||'.xls' as one of the parameters in bursting definition. But, looks like its ignoring it. The file attachment is still prepended with some xmlp and some auto generated number.
Here is the bursting definition
select distinct bldg.building_id KEY,
'Report_with_status' TEMPLATE,
'RTF' TEMPLATE_FORMAT,
'en-US' LOCALE,
'EXCEL' OUTPUT_FORMAT,
'EMAIL' DEL_CHANNEL,
'my email address' PARAMETER1,
null PARAMETER2,
'my email address' PARAMETER3,
'Report for '||bldg.building_id PARAMETER4,
'Please find the attached report' PARAMETER5,
'true' PARAMETER6,
'Do_Not_Reply email address' PARAMETER7,
from building bldg
Any ideas are greatly appreciated.
Thanks in advance.Probably, you have to request for enhancement on this from standalone bip.
-
I have a form that was created and is used by users on my local network. The problem is that when a user emails the form using the send by email button I get the email but the attachment file name is always the same. This creates a problem because when I go to save the attachment it wants to over write the files. I need to have the file name be unique for each email.
no, not to my knowledge
-
We have Oracle 10g application server ,i used rwlicent to send report as email and it works fine the only problem that i couldnot controll the attachment file name,
is it possible to change the file name?
any help so appritiated .
RegardsAre you using a distribution.xml for the emailed reports? If not you can pass destination=distribution.xml on your rwclient call.
distribution.xml:
<destinations>
<foreach>
<mail id="a6" to="[email protected]" subject="Personnel Reports">
<attach format="pdf" name="attach.pdf" srcType="report" instance="this">
<include src="mainSection"/>
</attach>
<attach format="rtf" name="attach.rtf" srcType="report" instance="this">
<include src="trailerSection"/>
</attach>
</mail>
</foreach>
</destinations>You can change the attach.rtf to be a parameter value using &<parametername> syntax. Look here for details on using the distribution.xml file. -
Decode attachment file name RFC 2231
Hello,
according to the [RFC 2231|http://tools.ietf.org/html/rfc2231] , the headers are encoded to something like
From: =?US-ASCII*EN?Q?Keith_Moore?= <[email protected]>
How can decode such a string, in Java ? I've found only [this implementation|http://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-javamail_1.4_spec-1.5/src/main/java/org/apache/geronimo/mail/util/RFC2231Encoder.java] from Apache Geronimo. Are there other implementations ?
Thanks,
T.Your subject talks about attachment file names, but your example uses the From header.
For attachment file names and other parameters, set the property mail.mime.decodeparameters
to "true". See the javadocs for the javax.mail.internet package for the list of properties you can set.
Unfortunately, JavaMail doesn't support the specification of a language ("EN") in addition to a charset
("US-ASCII") as in your example. That's a bug that I'll need to fix. -
Mail adapter- Attachment file name of scheme ddmm
Hi ,
I am working on File to Mail scenario.
I checked on SDN, but I could not find exact solution.
My requirement is :
I need to mail HTML report file as attachment.
To generate attachment file, I have done XSL mapping.
Attachment file name should be : yyyymmdd.htm
Mail text should be: This is autogenerated mail, please do not reply.
Mail subject: SAP XI report ddmmyyy
Please provide your inputs.
Best Regards,
DivyeshHi Henrique,
Thanks a lot for your response.
Your answer is very helpful.
I tried your code.
I am getting error in RWB: here I am including audit Log:
2009-04-02 17:39:41 Success MP: Entering module processor
2009-04-02 17:39:41 Success MP: Processing local module localejbs/CreateAttachment
2009-04-02 17:39:41 Success MP: Processing local module localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
2009-04-02 17:39:41 Success Mail: message entering the adapter
2009-04-02 17:39:41 Success Mail: Receiver adapter entered with qos ExactlyOnceInOrder
2009-04-02 17:39:41 Success Mail: calling the adpter for processing
2009-04-02 17:39:42 Error Mail: call failed; java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>
2009-04-02 17:39:42 Success Mail: sending a delivery error ack ...
2009-04-02 17:39:42 Success Mail: sent a delivery error ack
2009-04-02 17:39:42 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>
2009-04-02 17:39:42 Error Mail: error occured: com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>
2009-04-02 17:39:42 Error Exception caught by adapter framework: java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>
2009-04-02 17:39:42 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: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>.
2009-04-02 17:39:42 Success The message status set to WAIT.
Can you please provide me help on this?
Best Regards,
Divyesh -
Mail to File - how to read the attachment file name from the subject.
I need to use the SHeaderSUBJECT's value in the receiver file adapter's variable substitution.
This is a Mail to File scenario without design part where the attachment file name comes in the subject of the mail.
I see the below in the dynamicconfiguration section. How can i retrive the value from dynamicconfiguration section to the filename.
<SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Record namespace="http://sap.com/xi/XI/System/Mail" name="SHeaderSUBJECT">PlainAttachment.txt</SAP:Record>
</SAP:DynamicConfiguration>
Points will be rewarded.Try to use sthg like this in a UDF :
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().getStreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(http://sap.com/xi/XI/System/Mail,SHeaderSUBJECT);
String value = conf.get(key);
or in a JAVA mapping :
DynamicConfiguration dynConf = (DynamicConfiguration) param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dynKey = DynamicConfigurationKey.create((http://sap.com/xi/XI/System/Mail,SHeaderSUBJECT);
String keyValue = dynConf.get(dynKey);
param is the map object from the execute() method of your mapping ...
Hope this helps
Chris
Edited by: Christophe PFERTZEL on Apr 23, 2008 11:34 AM -
Issue with attachment file name
Hi All,
This is about an issue with attachment file name:
we have a scenario wherein we have payload with attachments ...(attachments can be any doc ,pdf) , problem is main document is comming with messageid.sap.com and thats normal but attachments are comming with file names for example something.pdf or something.doc or something.txt ...this is failing in adapter as it expects same name as u have in main document...anybody have any idea to get through this issue...
Regards
kiranwe have a scenario wherein we have payload with attachments ...(attachments can be any doc ,pdf) , problem is main document is comming with messageid.sap.com and thats normal but attachments are comming with file names for example something.pdf or something.doc or something.txt ...this is failing in adapter as it expects same name as u have in main document...anybody have any idea to get through this issue...
- <SAP:Payload xlink:href="cid:payload-4CED452F17C601BDE10080000A492050---sap.com">
<SAP:Name>1 .Header1.txt</SAP:Name>
Error we are getting is
Cannot cast 'Header' to boolean] in class com.sap.aii.mappingtool.flib7.NodeFunctions method createIf[Header, com.sap.aii.mappingtool.tf7.rt.Context---27a73bfa]
So we have to change the File name Header1.txt to something which we can cast to creatif....(we cannot tell the sendr to change the file name as its is set already)
Thanks for interste and assisting
Regards
Kiran -
Set Attached File name to Table Cell
Hello All,
I have a scenario where:
1. I have a dynamic table.
2.Every Row has a Button for attaching the new File.
3. When we add new Row to the Table, I want to get the attached file name in the corresponding cell. i.e Cell2 in following example.
I have tried doing it this way
The script which I'm using on Add button is
app.execMenuItem("AddFileAttachment");
var o = event.target.dataObjects;
var n = "";
DataNode.Table1.Row1.Cell2.rawValue = "";
if (o !== null) {
for (var i = 0; i < o.length; i += 1) {
n = o[this.parent.index].name;
var countVal = (DataNode.Table1.Row1.instanceManager.count-1);
xfa.resolveNode("DataNode.Table1.Row1["+countVal+"].Cell2").rawValue = n;
But I'm not able to display the attached file name in Cell2 of the Table.
How can we do it?
Thanks and Regards,
NikhilHello All,
I even tried doing the same using http://eslifeline.wordpress.com/2009/04/06/adding-attachments-to-pdf-form/
But I'm not able to add the file name to the table cell.
Can anyone please guide me through this?
Thanks and Regards,
Nikhil Joshi -
I cannot open all email attachment files(pdf, doc, etc) in Mail on my New IPad. I installed all viewer apps but I am not able to click and hold to select the option of viewer apps to open the files. I dont get the "open with" option when I click on the arrow in the menu bar. I can open attachment files on G-mail website from Safari though. It is really ridiculous that I cannot open the files from Apple Mail app! What's wrong with it!!
We cannot possible know what's wrong with it. But we can offer suggestions that might help.
Try resetting the iPad - its like rebooting a computer.
Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
This might help as well.
You can try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your app preferences and device settings again -
Need attachment file name which had sent or received in entire days.
Hi Friends
I need your help for getting information on exchange mailbox user who had sent or received mails along with attachment file name for entire day.
Basically I get the information of entire mails which had received or sent in all days but I am unable to get the information about attachment file name.
Please do the needful.
Regards, Md Ehteshamuddin Khan All the opinions expressed here is mine. This posting is provided "AS IS" with no warranties or guarantees and confers no rights.Hi,
Based on my knowledge, Exchange has no built-in feature to get the attachment statistics report. But you can check if EWS can achieve it.
About issues related to EWS, actually, we have a dedicated support team regarding the Exchange Server Development. I recommend you ask your question on our Exchange Server Development forum which is staffed by more experts specializing in this kind of problems.
Thanks for your understanding.
For your convenience:
http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads
Hope this can be helpful.
Best regards,
Amy Wang
TechNet Community Support
Maybe you are looking for
-
CD/DVD Drive is Dead - Unable to feed, Unable to Eject
I believe the symptoms started when I was trying to feed a Costco photo CD or DVD into the iMac, and it would just keep ejecting it out. When I try to insert something now, there's no noise, no grabbing of the disc, and no inserting. It's like hittin
-
Help renaming pdf files based on internal content
I work for a company that has thousands of E-tickets coming in daily, weekly, monthly, etc.. These tickets come in bafhakfbaifh.pdf and we have to manually rename them or print them all out and then sort through them and put them in order. What I wou
-
I am trying to update my iphone to the latest software version, but am getting a message saying 'make sure your network settings are correction and your connection is active'. i know my connection is active, so how can I fix this problem?
-
Code generation bug in C++ 5.0
The enclosed test program generates incorrect code with C++ 5.0 when -g is not used. The problem showed up in our production code and concerns any reference counted smart pointer implementation. The test program is specifically written to demonstrate
-
Export feature not working in final cut pro x
Hello, I'm working on a multicam edit in final cut pro x and wanted to export it to see how it looks, but when i try to share it all of the options for sharing under the share tab are grayed out, i can't seem to export my project and can't export it