Mail changes attachment filename

Mail.app has a bug or disability to properly interpret the filename of received attachments if the filename contains accented characters.
for example
the original filename:  xxxxx xxxxxx xxxxáxxxxüxxxxx_xxxxxxxx xxáxáx.pptx
when received in email: k=5Fxxxxxxxxx_xx=E1z=E1k.pptx?=
it does not matter what email client is used to send the attachment, it can be any version of Outlook or OS X's Mail, the problem is with Mail.app on recipient side.
Also it happens to users of 10.6.8 trough to 10.9.1
What is strange, that this behavior of changing filenames is not consequent:
in the past before I realized it's a bug, I was usually asking the sender to resend the email as I thought the mail was damaged.
The sender did nothing else, but resending the email from her/his 'Sent Items' folder, so no change has been made to filename
or content of the email itself > and strangely the second time the attachment is displayed correctly with proper accented characters,
no extra letters at the beginning or after the extension.
I also tried to reproduce this bug, sometimes successfully, but as I wrote this bug is not consistent.
What worries me that apple knows about this bug for years, but does nothing to fix it - it still exists,
and non-English users suffer from this.
https://discussions.apple.com/message/6808962#6808962
https://discussions.apple.com/thread/1409364?start=60&tstart=0
https://discussions.apple.com/message/7195409#7195409
Of course I filled a BUG report, and the purpose of this post is to ask other OS X users to fill a BUG report too and make some pressure
on apple to fix it for once and for all.
for non developers a link to bug report: http://www.apple.com/feedback/macosx.html
for developers:     https://bugreport.apple.com/
A kindly ask the moderator not to close this Discussion until apple delivers a permanent fix.
Asking the sender not to use accented characters in filenames is not a solution it's a workaround that nobody will use,
as it puts everyone in an inconvenient position when exchanging files with clients.
Thank you.

Also have this frequently.
What's more maddening, files within the same message, with the only accented character being the same in each file, and many other files with (different) accented characters, one file gets corrupted, the other one doesn't.
As in Mail.app:
The same message appears fine in iOS.

Similar Messages

  • Mail Changing Attachment Names

    Does anyone find that their Mac Mail changes attachment names into something like ??Q?documentname?=? so you are unable to open them unless you rename and save?
    I think I have narrowed it down to only happening with attachments that have a long(ish!) filename.  It only happens when a Mac computer recieves.  Doesn't matter if a Mac or Windows machine sends the mail.
    Any help appreciated as 50% of my attachments are coming through in this format.  V frustrating!

    Are you sure your RECEIVING email client isn't doing the conversion?
    Thank you for the help.
    It wasn't actually the email client at the other end, but rather a third-party photo app on my iPad - Photogene.
    I had been sending the screenshot as an email attachment from within Photogene. It seems that this app was converting it to the JPEG format. When I simply chose the image from the Camera Roll - directly in the Mail app - the PNG format was kept.
    Thanks again.

  • Broadcasting Workbook - Change attachment filename

    Software component : BW release 3.5 SP 16
    HI guru,
    we're using Information Broadcasting to distribute precalculated workbooks as attachments (xls-files) to our end users.
    The attachment file in the outsent mail has a generated file name with the following structure :
    workbook_<technical workbook name>.xls
    We have the problem to discern through filename the different workbooks sent with different parameter because the name is always the same.
    So we want to change the generated attachment filename to a more meanful name.
    Does anybody has a way to solve this problem?
    Kind Regards
    Stefano

    Hi,
    the filename is defined in CLASS CL_RSRD_PRODUCER_EXCEL
    on Method PRODUCE
    the code is:
        CONCATENATE 'WORKBOOK_' l_wbid '.' l_creation_type INTO l_sx_document-root-file_name.
    No user exit exist on this part.
    No substitution of variable is possible on that (like rsrd_attr table).
    I'm sorry,
    Regards,
    Sergio

  • Information Broadcaster- change attachment filename

    Hello,
    we're implementing Information Broadcasting to distribute csv-files to our information-consumers.
    Now we have the problem that we want to change the generated attachment filename to a more meanful name.
    Does anybody has a way to solve this problem?
    With kind regards Markus

    HI MArcus,
    Can you please explaint the problem/requirement in detail again?
    Hi Gillan Leo,
    If you don't want to display the footers in the broadcasted email then you  can hide or remove it with settings. Please follow the below path and select for no footer.
    SPRO -> SAP Reference IMG -> SAP Netweaver -> Business Intelligence -> Setting for Reporting and analysis->Settings for Information Broadcasting-> Settings for Distributing E-Mails.
    Please assign points if helpful.
    Thanks,
    Sasi

  • Change Attachment Filename of CUE Voicemail

    I configured CME 7.1 with CUE to sent Voicemails by eMail. All working fine so far. The Problem is that our Virus-Scanner (Panda) is absolutly unhappy with multiple File-Extensions in Mail Attachments (as "xxx.jpg.exe"). So it deletes most of the Unity Voicemail Attachments.
    Is there a way to change the default Filename generation algorythm, so that it has only one dot in its name?

    I don't know of a way to do this, but you can switch to IMAP (integrated messaging).  In that solution the mail client points directly to CUE as a separate IMAP inbox, so it won't be affected by your scanning software.

  • Mail changes attachement suffix

    Hello...I want to send some pictures with mail. The pictures are .JPG.
    WÍf I attach these JPG pictures and choose a size change in MAIL (right bottom line) the resized pictures are saved as .JPEG.
    Some of my customers cannot use this JPEG and I don't want to change the ending by hand.
    JPEG is a format but NO suffix!!!! Why does mail do this. It was not in 10.5!
    Does anybody know how to change this??
    Thanks n advance!
    Best regards
    Hady

    Hi Hady & welcome to the forums...
    The pictures are .JPG.
    SL apparently has issues with aliases and older/existing jpgs for some reason - not sure if that is related to your issue, however, but you might see if the same thing happens when you create, attach & send a brand spanking new whatever.jpg instead of working with an existing image from a previous install.
    Good luck in any case.

  • 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

  • Apple Mail long russian filename attachment problem

    Hi,
    The problem is that Mail.app set incorrect filename for attachment. I have gmail account and set up Mail.app as IMAP client. Most attachments are correct, but sometimes they come with bad names.For example:
    In  gmail account (web) everything is ok:
    The problem is that Mail.app set another filename, set up KOI-8 and instead of having one name=".....", we have name*0, name*1, name*2
    In gmail:
    Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document;
              name="=?UTF-8?B?0KTRg9C90LrRhtC40L7QvdCw0LvRjNC90YvQtSDRgtGA0LXQsdC+0LLQsN C90LjRjyDQuiDQpNCe?=
              =?UTF-8?B?0J8gLSDQstGL0LHQvtGAINC/0YDQvtC00YPQutGC0LAg0Lgg0L/QvtC70Y8g0LrQ vtGC0L7RgNGL0LUg?=
              =?UTF-8?B?0L7RgdGC0LDRjtGC0YHRj192NC0xLmRvY3g=?="
    Content-Disposition: attachment;
              filename="=?UTF-8?B?0KTRg9C90LrRhtC40L7QvdCw0LvRjNC90YvQtSDRgtGA0LXQsdC+0L LQsNC90LjRjyDQuiDQpNCe?=
              =?UTF-8?B?0J8gLSDQstGL0LHQvtGAINC/0YDQvtC00YPQutGC0LAg0Lgg0L/QvtC70Y8g0LrQ vtGC0L7RgNGL0LUg?=
              =?UTF-8?B?0L7RgdGC0LDRjtGC0YHRj192NC0xLmRvY3g=?="
    Content-Transfer-Encoding: base64
    X-Attachment-Id: f_hg876ra80
    In Mail.App
    Content-Disposition: ATTACHMENT;
              filename*0="=?KOI8-R?B?5tXOy8PJz87BzNjO2cUg1NLFws/Xwc7J0SDLIObv8CAtINfZws/ SI";
              filename*1="NA=?= =?KOI8-R?B?0s/E1cvUwSDJINDPzNEgy8/Uz9LZxSDP09TBwNTT0V92NC0";
              filename*2="xLmRvY3g=?="
    Content-Type: APPLICATION/VND.OPENXMLFORMATS-OFFICEDOCUMENT.WORDPROCESSINGML.DOCUMENT;
              name*0="=?KOI8-R?B?5tXOy8PJz87BzNjO2cUg1NLFws/Xwc7J0SDLIObv8CAtINfZws/SI";
              name*1="NA=?= =?KOI8-R?B?0s/E1cvUwSDJINDPzNEgy8/Uz9LZxSDP09TBwNTT0V92NC0";
              name*2="xLmRvY3g=?="
    Content-Transfer-Encoding: BASE64

    BUG!!!
    Here is. Mail.app converts filename into KOI8-R, but it doesn't change encoding for section (in this message - -047d7bb03fd6ab743004dbbf6ccd)
    MIME-Version: 1.0
    Received: by 10.49.61.129 with HTTP; Thu, 2 May 2013 10:18:35 -0700 (PDT)
    Date: Thu, 2 May 2013 21:18:35 +0400
    Delivered-To: [email protected]
    Message-ID: <[email protected]m>
    Subject: TEST
    From: "Paul M. Tarasov" <[email protected]>
    To: "Paul M. Tarasov" <[email protected]>
    Content-Type: multipart/mixed; boundary=047d7bb03fd6ab743304dbbf6ccf
    --047d7bb03fd6ab743304dbbf6ccf
    Content-Type: multipart/ALTERNATIVE;
              boundary=047d7bb03fd6ab743004dbbf6ccd
    --047d7bb03fd6ab743004dbbf6ccd
    Content-Transfer-Encoding: BASE64
    Content-Type: TEXT/PLAIN;
              charset=UTF-8
    LS0gDQrQn9Cw0LLQtdC7DQo=
    --047d7bb03fd6ab743004dbbf6ccd
    Content-Transfer-Encoding: QUOTED-PRINTABLE
    Content-Type: TEXT/HTML;
              charset=UTF-8
    <div dir=3D"ltr"><br clear=3D"all"><div><br></div>-- <br><font face=3D"verd=
    ana, sans-serif">=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB</font>
    </div>
    --047d7bb03fd6ab743004dbbf6ccd--
    --047d7bb03fd6ab743304dbbf6ccf
    Content-Disposition: ATTACHMENT;
              filename*0="=?KOI8-R?B?5tXOy8PJz87BzNjO2cUg1NLFws/Xwc7J0SDLIObv8CAtINfZws/SI";
              filename*1="NA=?= =?KOI8-R?B?0s/E1cvUwSDJINDPzNEgy8/Uz9LZxSDP09TBwNTT0V92NC0";
              filename*2="xLmRvY3g=?="
    Content-Type: APPLICATION/VND.OPENXMLFORMATS-OFFICEDOCUMENT.WORDPROCESSINGML.DOCUMENT;
              name*0="=?KOI8-R?B?5tXOy8PJz87BzNjO2cUg1NLFws/Xwc7J0SDLIObv8CAtINfZws/SI";
              name*1="NA=?= =?KOI8-R?B?0s/E1cvUwSDJINDPzNEgy8/Uz9LZxSDP09TBwNTT0V92NC0";
              name*2="xLmRvY3g=?="
    Content-Transfer-Encoding: BASE64
    It must be KOI8-R
    MIME-Version: 1.0
    Received: by 10.49.61.129 with HTTP; Thu, 2 May 2013 10:18:35 -0700 (PDT)
    Date: Thu, 2 May 2013 21:18:35 +0400
    Delivered-To: [email protected]
    Message-ID: <[email protected]m>
    Subject: TEST
    From: "Paul M. Tarasov" <[email protected]>
    To: "Paul M. Tarasov" <[email protected]>
    Content-Type: multipart/mixed; boundary=047d7bb03fd6ab743304dbbf6ccf
    --047d7bb03fd6ab743304dbbf6ccf
    Content-Type: multipart/ALTERNATIVE;
      boundary=047d7bb03fd6ab743004dbbf6ccd
    --047d7bb03fd6ab743004dbbf6ccd
    Content-Transfer-Encoding: BASE64
    Content-Type: TEXT/PLAIN;
      charset=KOI8-R
    LS0gDQrQn9Cw0LLQtdC7DQo=
    --047d7bb03fd6ab743004dbbf6ccd
    Content-Transfer-Encoding: QUOTED-PRINTABLE
    Content-Type: TEXT/HTML;
      charset=UTF-8
    <div dir=3D"ltr"><br clear=3D"all"><div><br></div>-- <br><font face=3D"verd=
    ana, sans-serif">=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB</font>
    </div>
    --047d7bb03fd6ab743004dbbf6ccd--
    --047d7bb03fd6ab743304dbbf6ccf
    Content-Disposition: ATTACHMENT;
      filename*0="=?KOI8-R?B?5tXOy8PJz87BzNjO2cUg1NLFws/Xwc7J0SDLIObv8CAtINfZws/SI";
      filename*1="NA=?= =?KOI8-R?B?0s/E1cvUwSDJINDPzNEgy8/Uz9LZxSDP09TBwNTT0V92NC0";
      filename*2="xLmRvY3g=?="
    Content-Type: APPLICATION/VND.OPENXMLFORMATS-OFFICEDOCUMENT.WORDPROCESSINGML.DOCUMENT;
      name*0="=?KOI8-R?B?5tXOy8PJz87BzNjO2cUg1NLFws/Xwc7J0SDLIObv8CAtINfZws/SI";
      name*1="NA=?= =?KOI8-R?B?0s/E1cvUwSDJINDPzNEgy8/Uz9LZxSDP09TBwNTT0V92NC0";
      name*2="xLmRvY3g=?="
    Content-Transfer-Encoding: BASE64

  • Mail Adapter: original Attachment filename retrieval in Proxy

    Hi,
    I have a Sender Mail Adapter, and the receiver is a proxy, where I need to get the attachment and its details.
    When I execute
    attachment_filename = l_attachment->GET_DOCUMENT_NAME( ).
    it simply returns Attachment-1 etc.
    How do I get the original attachment filename?
    I am on SP16.  
    Regards,
    Puloma.

    HI
    Please refer tihs thread for mail attchments
    Re: Handling attachments of mail
    Scenario to pick the mail with its attachments into XI\Re: Infrastructure required for Mail Adapter

  • Retrieval of attachment filename - receiver mail adapter

    Hi,
    I am using the mail adapter to receive an e-mail into PI. This e-mail has an attached CSV file.
    First, I am using the PayloadSwapBean to swap the application playload to the attachment payload
    Second, I am using the MessageTransformBean to transform the CSV file into an XML document
    These are both working fine and the message is then passing into the relevant message mapping.
    However, I would like to be able to use the attachment filename in the message mapping.
    Can anyone advise how to do this for the mail adapter ?
    I've done it loads of times for the file adapter but never the mail adapter (when using attachments) so I am a bit stumped.
    Any advice greatly received.
    Cheers
    Colin.

    Hi Progirl,
    I want to dynamically set the name of attachment in receiver mail Communication Channel.
    Example: IN__9907211000004_4048454000005_20081211_01000000002643
    The first two numbers 9907211000004 & 4048454000005 I want to read it from the message
    20081211 this is the date and
    And againg this number 01000000002643 is read from message.
    I read from your response. You had created adapter module for the similar purpose. Can you share it. Since I am new to  writing Adapter Module.
    Thank You in Advance.
    Mukhtar

  • Mail's attachement's filename is 100000000000000.doc  for chinese filename

    When I recieved a email with a chinese filename attachement form Exchange server(IMAP download). The filename will change to something like 100000000000000.doc
    No matter I change the text code in the "Message" coloumn, the filename still keep the 100000000000000000.doc.
    But in the meantime, the same email recieved by Entourage, the attachement filename will be normal in Chinese chracter.
    Please help me about this, thank you.

    Hi Daniel,
    As i know, there is a property of ExchangeService ,
    this is the detail info:
    The application can change the ImpersonatedUserId property
    to impersonate multiple accounts
    This is the example:
    void ImpersonationSample()
    ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
    service.Credentials = new NetworkCredential(appName, appPassword, emailDomain);
    service.AutodiscoverUrl(appEmail);
    service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, user1Email);
    Folder newFolder = new Folder(service);
    newFolder.DisplayName = "TestFolder1";
    newFolder.Save(WellKnownFolderName.Inbox);
    service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, user2Email);
    Folder newFolder2 = new Folder(service);
    newFolder2.DisplayName = "TestFolder1";
    newFolder2.Save(WellKnownFolderName.Inbox);
    }read this link if you want to know detail info:https://msdn.microsoft.com/en-us/library/office/dd633680%28v=exchg.80%29.aspx?f=255&MSPPError=-2147217396So, is there similar API or method to do impersonate in sharepoint online ?BR

  • E-mail and Attachment Problem on web...

    hi guys,
    I developed a form in forms 6i for my client/server application. It was working well in c/s environment. I use to generate a PDF file and send the same file via attachment to the person by giving its e-mail address.
    But the same form is not working when i have deployed the form on web via forms9iAS.
    My code that use to send the e-mail and attachemnt was like this:
    Declare
    Outlook_Object OLE2.OBJ_TYPE;
    Mail_Object OLE2.OBJ_TYPE;
    Item1 OLE2.OBJ_TYPE;
    Item2 OLE2.OBJ_TYPE;
    OLEPARAM ole2.list_type;
    var_Send OLE2.OBJ_TYPE;
    var_Attach1 OLE2.OBJ_TYPE;
    var_Attach2 OLE2.OBJ_TYPE;
    plist ParamList;
    starting_date varchar2(10);
    ending_date varchar2(10) ;
    FileName varchar2(80);
    Lstarting_date varchar2(10);
    Get_Employee_ID varchar(200);
    Get_Where varchar(200);
    Mail_Subject varchar2(500);
    LcBody varchar2(2000);
    BEGIN
    -- Begining sending e-mail to Departmental Heads
    go_block('vBasc_inf');
    first_record;
         ---while :system.last_record = 'FALSE'
         loop
              if      :vBasc_inf.chkSend = 'Y' THEN
                   Plist := get_parameter_list ('Attendance');
                        if not Id_null(Plist) then
                             destroy_parameter_list(Plist);
                        end if ;
                        Plist := create_parameter_list('Attendance');
                        Starting_Date := To_char(:NonDatabase.txtStarting_date,'dd/mm/yyyy');
                        Ending_Date := To_char(:NonDatabase.txtending_date,'dd/mm/yyyy');
                   LStarting_date := to_char(:NonDatabase.txtStarting_date,'yyyy-mm-dd');
                   --FileName := 'c:\bss\attendance\'
                   -- || substr(:vBasc_inf.txtbranch,1,1) ||'-'
                   -- || Rtrim(substr(:vBasc_inf.txtDepartment,1,3)) || '-'
                   -- || LStarting_date || '.pdf';
                   FileName := 'c:\bss\attendance\'
                   || :vBasc_inf.Employee_id ||'-'
                   || LStarting_date || '.pdf';
                        mail_subject := 'Attendance Sheet ' || To_char(:NonDatabase.txtStarting_date,'dd-Mon-yy') || ' to ' || To_char(:NonDatabase.txtending_date,'dd-Mon-yy') || ' (' || :vBasc_inf.department_id || ')' ;
    --                    host('Del ' || filename ,NO_SCREEN );
                        --Add_parameter(plist,'PBranch_id',text_parameter,:vBasc_inf.branch_id);
                        --Add_parameter(plist,'pdepartment_id',text_parameter,:vBasc_inf.Department_ID);
                        Add_parameter(plist,'pstarting_date',text_parameter,Starting_date);
                        Add_parameter(plist,'pending_date',text_parameter,Ending_date);
                        Add_parameter(plist,'PEmployee_id',text_parameter, :vBasc_inf.employee_id);
                        Add_parameter(plist,'PARAMFORM',text_parameter,'NO');
                        Add_parameter(plist,'DESNAME',text_parameter,FileName);
                        Add_Parameter(plist,'DESTYPE',TEXT_PARAMETER,'FILE');
                        Add_Parameter(plist,'DESFORMAT',TEXT_PARAMETER,'PDF');
                        run_product(reports,'EmployeeWise_AttendanceSheet',synchronous,batch,filesystem,plist,screen);
                        SET_APPLICATION_PROPERTY(CURSOR_STYLE,'BUSY');
                        Outlook_Object := OLE2.CREATE_OBJ('Outlook.Application');
    ---               OLE2.Set_Property(Outlook_Object,'UserName', 'Daily Attendance');
    ---               message ('Yes');
    ---               message ('Yes');
                        OLEPARAM := OLE2.CREATE_ARGLIST;
                        OLE2.ADD_ARG(OLEPARAM,'MAPI');
                        Mail_Object := OLE2.INVOKE_OBJ(Outlook_Object,'GetNameSpace',OLEPARAM);
                        OLE2.DESTROY_ARGLIST( OLEPARAM );
                        --newMail
                        OLEPARAM := OLE2.CREATE_ARGLIST;
                        OLE2.ADD_ARG(OLEPARAM,0);
                        Item1 := OLE2.INVOKE_OBJ(Outlook_Object,'CreateItem',OLEPARAM);
                        OLE2.DESTROY_ARGLIST( OLEPARAM );
                        -- If you want to display outlook new message screen
    --               Item2 := OLE2.INVOKE_OBJ(Item1,'Display');
              ole2.set_property(Item1,'To',:vBasc_inf.e_mail);
              ---ole2.set_property(Item1,'To','[email protected]');
                        ole2.set_property(Item1,'Subject',Mail_Subject );
                        LcBody := :vbasc_inf.emp_name||','|| chr(13) ||chr(13) || :nondatabase.txtmessage ;
                        ole2.set_property(Item1,'Body',LcBody );
                        --ole2.set_property(Item1,'Body','This is First mail of Attendance Sheet');
                        var_Attach1 := OLE2.GET_OBJ_PROPERTY(Item1,'Attachments');
                        OLEPARAM := OLE2.CREATE_ARGLIST;
                        OLE2.ADD_ARG(OLEPARAM,FileName);
                        var_Attach2 := OLE2.INVOKE_OBJ(var_Attach1,'add',OLEPARAM);
                        OLE2.DESTROY_ARGLIST( OLEPARAM );
                        var_Send := OLE2.INVOKE_OBJ(Item1,'Send');
              end if ;
              :vBasc_inf.chksend := 'N';
         IF :system.last_record = 'TRUE' THEN
                   set_item_property('vBasc_inf.CMDCHECKALL', label, 'Check All');
              EXIT ;
         END IF ;
              next_record;
              end loop ;     
              OLE2.RELEASE_OBJ( Item1);
              OLE2.RELEASE_OBJ( Mail_Object );
              OLE2.RELEASE_OBJ( Outlook_Object );
              SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
              first_record;
              Message('Mail sent seccessfully.........');
              Message('Mail sent seccessfully.........');
    -- Ending sending e-amil to Departmental Heads     
    END;
    BUT now on web its giving me the following error:
    REP-0081: Error during the IO operations.
    REP-0110: Unable to open file 'C:\bss\attendance\14210-01/01/2005.PDF'.
    scaba 14
    What changes i have to made to this form to run well on web?
    Or is there any other way to send mails and attachment in forms 6i for web using oracle9iAS?
    Pliz help.
    Imran Baig

    I have changed my Code from run product to :
    Declare
    Outlook_Object OLE2.OBJ_TYPE;
    Mail_Object OLE2.OBJ_TYPE;
    Item1 OLE2.OBJ_TYPE;
    Item2 OLE2.OBJ_TYPE;
    OLEPARAM ole2.list_type;
    var_Send OLE2.OBJ_TYPE;
    var_Attach1 OLE2.OBJ_TYPE;
    var_Attach2 OLE2.OBJ_TYPE;
    plist ParamList;
    starting_date varchar2(10);
    ending_date varchar2(10) ;
         FileName varchar2(80);
    Lstarting_date varchar2(10);
    ln_emp_id number(8);
    lc_email varchar2(100);
    Get_Employee_ID varchar(200);
    Get_Where varchar(200);
    Mail_Subject varchar2(500);
    LcBody varchar2(2000);
    lc_msg_txt VARCHAR2(2000);
         lc_slc_stmt VARCHAR2(4000);
         lc_slc_stmt2 VARCHAR2(4000);
         lc_Slct_Smry VARCHAR2(4000);
         lpl_para_id PARAMLIST;
    lc_alert_btn NUMBER;
    LC_RP_HD          VARCHAR2(4000);
    LC_RP_HD2 VARCHAR2(4000);
    Lc_Rp_Order VARCHAR2(4000);
    web_message varchar2(4000);
    cursor C1 is
    select emp_employees.employee_id, emp_emp_info.e_mail
         from emp_employees, emp_emp_info
         where emp_employees.employee_id = emp_emp_info.employee_id
         and emp_emp_info.e_mail is not null
         and emp_employees.employee_id between :emp_date_blk.from_id and :emp_date_blk.to_id
         and emp_employees.employee_id = 14210
         order by emp_employees.employee_id;
    BEGIN
         OPEN C1;
         IF C1%ISOPEN THEN
              LOOP
                   FETCH C1 INTO ln_emp_id, lc_email;
                   EXIT WHEN C1%NOTFOUND;
                        Plist := get_parameter_list ('email_sal_slip');
                             if not Id_null(Plist) then
                                  destroy_parameter_list(Plist);
                             end if ;
                        Plist := create_parameter_list('email_sal_slip');          
                        FileName := 'c:\'
                   || ln_emp_id || '.pdf';
                   mail_subject := 'Salary slip for the month of ' || To_char(:emp_date_blk.from_date,'Month-yyyy') ;
                   lc_slc_stmt := User_Selection(lc_msg_txt, lc_slct_smry,lc_Rp_Hd,lc_Rp_Hd2,lc_Rp_Order);
                   lc_slc_stmt := 'P_where=' || '"' || lc_slc_stmt || '"';
                   lc_Rp_Hd := ' Rp_Heading=' || '"' || lc_Rp_Hd || '"';
                        lc_Rp_Hd2 := ' Rp_Heading2=' || '"' || lc_Rp_Hd2 || '"';
                        lc_Rp_Order := ' P_Order_BY=' || '"' || lc_Rp_Order || '"';
                        Add_parameter(plist,'PARAMFORM',text_parameter,'NO');
                        Add_parameter(plist,'DESNAME',text_parameter,FileName);
                        Add_Parameter(plist,'DESTYPE',TEXT_PARAMETER,'FILE');
                        Add_Parameter(plist,'DESFORMAT',TEXT_PARAMETER,'PDF');
                        --run_product(reports,'EmployeeWise_AttendanceSheet',synchronous,batch,filesystem,plist,screen);
                        Execute_Report('EMP_SAL_SLIP', 'EMP_SAL_SLIP.rdf', 'EMP_SAL_SLIP.PDF', 'PDF', 'BSSRepSrvA', 'ora-test-app', lc_slc_stmt2, web_message);
                        SET_APPLICATION_PROPERTY(CURSOR_STYLE,'BUSY');
                        Outlook_Object := OLE2.CREATE_OBJ('Outlook.Application');
    ---               OLE2.Set_Property(Outlook_Object,'UserName', 'Daily Attendance');
    ---               message ('Yes');
    ---               message ('Yes');
                        OLEPARAM := OLE2.CREATE_ARGLIST;
                        OLE2.ADD_ARG(OLEPARAM,'MAPI');
                        Mail_Object := OLE2.INVOKE_OBJ(Outlook_Object,'GetNameSpace',OLEPARAM);
                        OLE2.DESTROY_ARGLIST( OLEPARAM );
                        --newMail
                        OLEPARAM := OLE2.CREATE_ARGLIST;
                        OLE2.ADD_ARG(OLEPARAM,0);
                        Item1 := OLE2.INVOKE_OBJ(Outlook_Object,'CreateItem',OLEPARAM);
                        OLE2.DESTROY_ARGLIST( OLEPARAM );
                        -- If you want to display outlook new message screen
    --               Item2 := OLE2.INVOKE_OBJ(Item1,'Display');
              ole2.set_property(Item1,'To',lc_email);
              ---ole2.set_property(Item1,'To','[email protected]');
                        ole2.set_property(Item1,'Subject',Mail_Subject );
                        ole2.set_property(Item1,'Body',LcBody );
                        --ole2.set_property(Item1,'Body','This is First mail of Attendance Sheet');
                        var_Attach1 := OLE2.GET_OBJ_PROPERTY(Item1,'Attachments');
                        OLEPARAM := OLE2.CREATE_ARGLIST;
                        OLE2.ADD_ARG(OLEPARAM,FileName);
                        var_Attach2 := OLE2.INVOKE_OBJ(var_Attach1,'add',OLEPARAM);
                        OLE2.DESTROY_ARGLIST( OLEPARAM );
                        var_Send := OLE2.INVOKE_OBJ(Item1,'Send');
              END LOOP;
         CLOSE C1;
         OLE2.RELEASE_OBJ( Item1);
              OLE2.RELEASE_OBJ( Mail_Object );
              OLE2.RELEASE_OBJ( Outlook_Object );
              SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
              Message('Mail sent seccessfully.........');
              Message('Mail sent seccessfully.........');
         END IF;
    END;
    Have used d2kwutility to execute my report. i have also instaled outlook on my application server.
    Now when i try to run my report and send e-mail it gives the following error.
    ORA-305500
    What is this error about and how to resolve it?
    Imran

  • E-mail changes to unreadable text when moved to another mailbox folder

    Hi,
    when moving a correct received e-mail to another mailbox folder, the mail and the attachment will change to unreadable text and it looks like the column below.
    On my iPad and iPhone the mail and the attachment is shown correct. If I forward it to my own account again, the mail is also correct shown an my imac27, as long as it resides in the in-box.
    On the other hand, there are lots of mails+attachments with "normal" behavier when moved.
    Any idea about that?
    mackliko
    ------=_NextPart_000_0001_01CCF256.3C7DD310
    Content-Type: multipart/alternative;
              boundary="----=_NextPart_001_0002_01CCF256.3C7DD310"
    ------=_NextPart_001_0002_01CCF256.3C7DD310
    Content-Type: text/plain;
              charset="us-ascii"
    Content-Transfer-Encoding: 7bit
    ------=_NextPart_001_0002_01CCF256.3C7DD310
    Content-Type: text/html;
              charset="us-ascii"
    Content-Transfer-Encoding: quoted-printable
    <html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
    xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
    xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
    xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
    xmlns=3D"http://www.w3.org/TR/REC-html40">
    <head>
    <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
    charset=3Dus-ascii">
    <meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
    <style>
    <!--
    /* Font Definitions */
    @font-face
              {font-family:"Cambria Math";
              panose-1:2 4 5 3 5 4 6 3 2 4;}
    @font-face
              {font-family:Calibri;
              panose-1:2 15 5 2 2 2 4 3 2 4;}
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
              {margin:0cm;
              margin-bottom:.0001pt;
              font-size:11.0pt;
              font-family:"Calibri","sans-serif";}
    a:link, span.MsoHyperlink
              {mso-style-priority:99;
              color:blue;
              text-decoration:underline;}
    a:visited, span.MsoHyperlinkFollowed
              {mso-style-priority:99;
              color:purple;
              text-decoration:underline;}
    span.E-MailFormatvorlage17
              {mso-style-type:personal-compose;
              font-family:"Calibri","sans-serif";
              color:windowtext;}
    .MsoChpDefault
              {mso-style-type:export-only;}
    @page Section1
              {size:612.0pt 792.0pt;
              margin:70.85pt 70.85pt 2.0cm 70.85pt;}
    div.Section1
              {page:Section1;}
    -->
    </style>
    <!--[if gte mso 9]><xml>
    <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <o:shapelayout v:ext=3D"edit">
    <o:idmap v:ext=3D"edit" data=3D"1" />
    </o:shapelayout></xml><![endif]-->
    </head>
    <body lang=3DDE-AT link=3Dblue vlink=3Dpurple>
    <div class="3DSection1">
    <p class="3DMsoNormal">Mfg<o:p></o:p></p>
    <p class="3DMsoNormal">Martin lanzinger<o:p></o:p></p>
    <p class="3DMsoNormal"><o:p> </o:p></p>
    </div>
    </body>
    </html>
    ------=_NextPart_001_0002_01CCF256.3C7DD310--
    ------=_NextPart_000_0001_01CCF256.3C7DD310
    Content-Type: application/pdf;
              name="Test.pdf"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
              filename="Test.pdf"

    Please run /cleanviews switch to check the result.
    (Type "Outlook.exe /cleanviews in Windows search bar and press ENTER.)
    Please also create a new Outlook profile to check if the issue still persists. Thanks.
    Tony Chen
    TechNet Community Support

  • Send a mail with attached file .xls but i got file without

    i tried to send a mail with attached file .xls. but i am able to send the file , we recived the file without file name. please do the same
    thnaks in advance.
    END-OF-SELECTION.
    Populate message body text
    PERFORM POPULATE_EMAIL_MESSAGE_BODY.
    Send file by email as .xls speadsheet
    PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
    TABLES IT_MESSAGE
    IT_ATTACH
    USING P_EMAIL
    'Example .xls documnet attachment'
    'XLS'
    'filename'
    CHANGING GD_ERROR
    GD_RECIEVER.
    Instructs mail send program for SAPCONNECT to send email(rsconn01)
    PERFORM INITIATE_MAIL_EXECUTE_PROGRAM.
    *& Form DATA_RETRIEVAL
    Retrieve data form EKPO table and populate itab it_ekko
    FORM DATA_RETRIEVAL.
    SELECT EBELN EBELP AEDAT MATNR
    UP TO 10 ROWS
    FROM EKPO
    INTO TABLE IT_EKPO.
    ENDFORM. " DATA_RETRIEVAL
    *& Form BUILD_XLS_DATA_TABLE
    Build data table for .xls document
    FORM BUILD_XLS_DATA_TABLE.
    CONSTANTS: CON_CRET TYPE X VALUE '0D', "OK for non Unicode
    CON_TAB TYPE X VALUE '09'. "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
    con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
    con_cret type c value cl_abap_char_utilities=>CR_LF.
    CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
    INTO IT_ATTACH SEPARATED BY ''.
    CONCATENATE '' IT_ATTACH INTO IT_ATTACH.
    APPEND IT_ATTACH.
    LOOP AT IT_EKPO INTO WA_CHAREKPO.
    CONCATENATE WA_CHAREKPO-EBELN WA_CHAREKPO-EBELP
    WA_CHAREKPO-AEDAT WA_CHAREKPO-MATNR
    INTO IT_ATTACH SEPARATED BY ''.
    CONCATENATE '' IT_ATTACH INTO IT_ATTACH.
    APPEND IT_ATTACH.
    ENDLOOP.
    ENDFORM. " BUILD_XLS_DATA_TABLE
    *& Form SEND_FILE_AS_EMAIL_ATTACHMENT
    Send email
    FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES PIT_MESSAGE
    PIT_ATTACH
    USING P_EMAIL
    P_MTITLE
    P_FORMAT
    P_FILENAME
    P_ATTDESCRIPTION
    P_SENDER_ADDRESS
    P_SENDER_ADDRES_TYPE
    CHANGING P_ERROR
    P_RECIEVER.
    DATA: LD_ERROR TYPE SY-SUBRC,
    LD_RECIEVER TYPE SY-SUBRC,
    LD_MTITLE LIKE SODOCCHGI1-OBJ_DESCR,
    LD_EMAIL LIKE SOMLRECI1-RECEIVER,
    LD_FORMAT TYPE SO_OBJ_TP ,
    LD_ATTDESCRIPTION TYPE SO_OBJ_NAM ,
    LD_ATTFILENAME TYPE SO_OBJ_DES ,
    LD_SENDER_ADDRESS LIKE SOEXTRECI1-RECEIVER,
    LD_SENDER_ADDRESS_TYPE LIKE SOEXTRECI1-ADR_TYP,
    LD_RECEIVER LIKE SY-SUBRC.
    LD_EMAIL = P_EMAIL.
    LD_MTITLE = P_MTITLE.
    LD_FORMAT = P_FORMAT.
    LD_ATTDESCRIPTION = P_ATTDESCRIPTION.
    LD_ATTFILENAME = P_FILENAME.
    LD_SENDER_ADDRESS = P_SENDER_ADDRESS.
    LD_SENDER_ADDRESS_TYPE = P_SENDER_ADDRES_TYPE.
    Fill the document data.
    W_DOC_DATA-DOC_SIZE = 1.
    Populate the subject/generic message attributes
    W_DOC_DATA-OBJ_LANGU = SY-LANGU.
    W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
    W_DOC_DATA-OBJ_DESCR = LD_MTITLE .
    W_DOC_DATA-SENSITIVTY = 'F'.
    Fill the document data and get size of attachment
    CLEAR W_DOC_DATA.
    READ TABLE IT_ATTACH INDEX W_CNT.
    W_DOC_DATA-DOC_SIZE =
    ( W_CNT - 1 ) * 255 + STRLEN( IT_ATTACH ).
    W_DOC_DATA-OBJ_LANGU = SY-LANGU.
    W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
    W_DOC_DATA-OBJ_DESCR = LD_MTITLE.
    W_DOC_DATA-SENSITIVTY = 'F'.
    CLEAR T_ATTACHMENT.
    REFRESH T_ATTACHMENT.
    T_ATTACHMENT[] = PIT_ATTACH[].
    Describe the body of the message
    CLEAR T_PACKING_LIST.
    REFRESH T_PACKING_LIST.
    T_PACKING_LIST-TRANSF_BIN = SPACE.
    T_PACKING_LIST-HEAD_START = 1.
    T_PACKING_LIST-HEAD_NUM = 0.
    T_PACKING_LIST-BODY_START = 1.
    DESCRIBE TABLE IT_MESSAGE LINES T_PACKING_LIST-BODY_NUM.
    T_PACKING_LIST-DOC_TYPE = 'RAW'.
    APPEND T_PACKING_LIST.
    Create attachment notification
    T_PACKING_LIST-TRANSF_BIN = 'X'.
    T_PACKING_LIST-HEAD_START = 1.
    T_PACKING_LIST-HEAD_NUM = 1.
    T_PACKING_LIST-BODY_START = 1.
    DESCRIBE TABLE T_ATTACHMENT LINES T_PACKING_LIST-BODY_NUM.
    T_PACKING_LIST-DOC_TYPE = LD_FORMAT.
    T_PACKING_LIST-OBJ_DESCR = LD_ATTDESCRIPTION.
    T_PACKING_LIST-OBJ_NAME = LD_ATTFILENAME.
    T_PACKING_LIST-DOC_SIZE = T_PACKING_LIST-BODY_NUM * 255.
    APPEND T_PACKING_LIST.
    Add the recipients email address
    CLEAR T_RECEIVERS.
    REFRESH T_RECEIVERS.
    T_RECEIVERS-RECEIVER = LD_EMAIL.
    T_RECEIVERS-REC_TYPE = 'U'.
    T_RECEIVERS-COM_TYPE = 'INT'.
    T_RECEIVERS-NOTIF_DEL = 'X'.
    T_RECEIVERS-NOTIF_NDEL = 'X'.
    APPEND T_RECEIVERS.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = W_DOC_DATA
    PUT_IN_OUTBOX = 'X'
    SENDER_ADDRESS = LD_SENDER_ADDRESS
    SENDER_ADDRESS_TYPE = LD_SENDER_ADDRESS_TYPE
    COMMIT_WORK = 'X'
    IMPORTING
    SENT_TO_ALL = W_SENT_ALL
    TABLES
    PACKING_LIST = T_PACKING_LIST
    CONTENTS_BIN = T_ATTACHMENT
    CONTENTS_TXT = IT_MESSAGE
    RECEIVERS = T_RECEIVERS
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    DOCUMENT_TYPE_NOT_EXIST = 3
    OPERATION_NO_AUTHORIZATION = 4
    PARAMETER_ERROR = 5
    X_ERROR = 6
    ENQUEUE_ERROR = 7
    OTHERS = 8.
    Populate zerror return code
    LD_ERROR = SY-SUBRC.
    Populate zreceiver return code
    LOOP AT T_RECEIVERS.
    LD_RECEIVER = T_RECEIVERS-RETRN_CODE.
    ENDLOOP.
    ENDFORM.
    *& Form INITIATE_MAIL_EXECUTE_PROGRAM
    Instructs mail send program for SAPCONNECT to send email.
    FORM INITIATE_MAIL_EXECUTE_PROGRAM.
    WAIT UP TO 2 SECONDS.
    SUBMIT RSCONN01 WITH MODE = 'INT'
    WITH OUTPUT = 'X'
    AND RETURN.
    ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
    *& Form POPULATE_EMAIL_MESSAGE_BODY
    Populate message body text
    FORM POPULATE_EMAIL_MESSAGE_BODY.
    REFRESH IT_MESSAGE.
    IT_MESSAGE = 'Please find attached a list test ekpo records'.
    APPEND IT_MESSAGE.
    ENDFORM. " POPULATE_EMAIL_MESSAGE_BODY

    PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
      TABLES IT_MESSAGE
      IT_ATTACH
      USING P_EMAIL
      'Failed IDOC Analysis report'(020)
      'xls'(021)
      'IDOC_REP'(022)
      CHANGING GD_ERROR
      GD_RECIEVER.
    Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM INITIATE_MAIL_EXECUTE_PROGRAM.
    ENDFORM.                    " F_MAIL
    *& Form BUILD_XLS_DATA_TABLE
    Build data table for .xls document
    FORM BUILD_XLS_DATA_TABLE.
    *CONSTANTS: CON_CRET TYPE X VALUE '0D', "OK for non Unicode
    *CON_TAB TYPE X VALUE '09'. "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
      constants:
       con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
       con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE text-040 text-041 text-042 text-043 text-044 text-045 text-046 text-047 text-048 text-049
      INTO IT_ATTACH SEPARATED BY con_tab.
      CONCATENATE con_cret IT_ATTACH INTO IT_ATTACH.
      APPEND IT_ATTACH.
      clear IT_ATTACH.
      loop at i_final_t into w_final.
        CONCATENATE
        w_final-mestyp w_final-docnum  w_final-statxt w_final-msgno w_final-rvplant w_final-kunnr w_final-vbeln w_final-credat
                w_final-cretim w_final-flag INTO IT_ATTACH SEPARATED BY con_tab.
        CONCATENATE con_cret IT_ATTACH INTO IT_ATTACH.
        APPEND IT_ATTACH.
        clear IT_attach.
      endloop.
    ENDFORM. " BUILD_XLS_DATA_TABLE
    *& Form SEND_FILE_AS_EMAIL_ATTACHMENT
    Send email
    FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES PIT_MESSAGE
    PIT_ATTACH
    USING P_EMAIL
    P_MTITLE
    P_FORMAT
    P_FILENAME
    P_ATTDESCRIPTION
    P_SENDER_ADDRESS
    P_SENDER_ADDRES_TYPE
    CHANGING P_ERROR
    P_RECIEVER.
      DATA: LD_ERROR TYPE SY-SUBRC,
      LD_RECIEVER TYPE SY-SUBRC,
      LD_MTITLE LIKE SODOCCHGI1-OBJ_DESCR,
      LD_EMAIL LIKE SOMLRECI1-RECEIVER,
      LD_FORMAT TYPE SO_OBJ_TP ,
      LD_ATTDESCRIPTION TYPE SO_OBJ_NAM ,
      LD_ATTFILENAME TYPE SO_OBJ_DES ,
      LD_SENDER_ADDRESS LIKE SOEXTRECI1-RECEIVER,
      LD_SENDER_ADDRESS_TYPE LIKE SOEXTRECI1-ADR_TYP,
      LD_RECEIVER LIKE SY-SUBRC.
      LD_EMAIL = P_EMAIL.
      LD_MTITLE = P_MTITLE.
      LD_FORMAT = P_FORMAT.
      LD_ATTDESCRIPTION = P_ATTDESCRIPTION.
      LD_ATTFILENAME = P_FILENAME.
      LD_SENDER_ADDRESS = P_SENDER_ADDRESS.
      LD_SENDER_ADDRESS_TYPE = P_SENDER_ADDRES_TYPE.
    Fill the document data.
      W_DOC_DATA-DOC_SIZE = 1.
    Populate the subject/generic message attributes
      W_DOC_DATA-OBJ_LANGU = SY-LANGU.
      W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR = LD_MTITLE .
      W_DOC_DATA-SENSITIVTY = 'F'.
    Fill the document data and get size of attachment
      CLEAR W_DOC_DATA.
      READ TABLE IT_ATTACH INDEX W_CNT.
      W_DOC_DATA-DOC_SIZE =
      ( W_CNT - 1 ) * 255 + STRLEN( IT_ATTACH ).
      W_DOC_DATA-OBJ_LANGU = SY-LANGU.
      W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR = LD_MTITLE.
      W_DOC_DATA-SENSITIVTY = 'F'.
      CLEAR T_ATTACHMENT.
      REFRESH T_ATTACHMENT.
      T_ATTACHMENT[] = PIT_ATTACH[].
    Describe the body of the message
      CLEAR T_PACKING_LIST.
      REFRESH T_PACKING_LIST.
      T_PACKING_LIST-TRANSF_BIN = SPACE.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM = 0.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE IT_MESSAGE LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE = 'RAW'.
      APPEND T_PACKING_LIST.
    Create attachment notification
      T_PACKING_LIST-TRANSF_BIN = 'X'.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM = 1.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE T_ATTACHMENT LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE = LD_FORMAT.
      T_PACKING_LIST-OBJ_DESCR = LD_ATTDESCRIPTION.
      T_PACKING_LIST-OBJ_NAME = LD_ATTFILENAME.
      T_PACKING_LIST-DOC_SIZE = T_PACKING_LIST-BODY_NUM * 255.
      APPEND T_PACKING_LIST.
    Add the recipients email address
      CLEAR T_RECEIVERS.
      REFRESH T_RECEIVERS.
      T_RECEIVERS-RECEIVER = LD_EMAIL.
      T_RECEIVERS-REC_TYPE = 'U'.
      T_RECEIVERS-COM_TYPE = 'INT'.
      T_RECEIVERS-NOTIF_DEL = 'X'.
      T_RECEIVERS-NOTIF_NDEL = 'X'.
      APPEND T_RECEIVERS.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA              = W_DOC_DATA
          PUT_IN_OUTBOX              = 'X'
          SENDER_ADDRESS             = LD_SENDER_ADDRESS
          SENDER_ADDRESS_TYPE        = LD_SENDER_ADDRESS_TYPE
          COMMIT_WORK                = 'X'
        IMPORTING
          SENT_TO_ALL                = W_SENT_ALL
        TABLES
          PACKING_LIST               = T_PACKING_LIST
          CONTENTS_BIN               = T_ATTACHMENT
          CONTENTS_TXT               = IT_MESSAGE
          RECEIVERS                  = T_RECEIVERS
        EXCEPTIONS
          TOO_MANY_RECEIVERS         = 1
          DOCUMENT_NOT_SENT          = 2
          DOCUMENT_TYPE_NOT_EXIST    = 3
          OPERATION_NO_AUTHORIZATION = 4
          PARAMETER_ERROR            = 5
          X_ERROR                    = 6
          ENQUEUE_ERROR              = 7
          OTHERS                     = 8.
    Populate zerror return code
      LD_ERROR = SY-SUBRC.
    Populate zreceiver return code
      LOOP AT T_RECEIVERS.
        LD_RECEIVER = T_RECEIVERS-RETRN_CODE.
      ENDLOOP.
    ENDFORM.                    "SEND_FILE_AS_EMAIL_ATTACHMENT
    *& Form INITIATE_MAIL_EXECUTE_PROGRAM
    Instructs mail send program for SAPCONNECT to send email.
    FORM INITIATE_MAIL_EXECUTE_PROGRAM.
      WAIT UP TO 2 SECONDS.
      SUBMIT RSCONN01 WITH MODE = 'INT'
      WITH OUTPUT = 'X'
      AND RETURN.
    ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
    *& Form POPULATE_EMAIL_MESSAGE_BODY
    Populate message body text
    FORM POPULATE_EMAIL_MESSAGE_BODY.
      data: l1(99)    type c,
             l2(15)    type c,
             lt_message         type standard table of solisti1,
             ls_message      like line of lt_message.
      clear ls_message.
      l1 = 'Dear'(007).
      l2 =  'Sir/Madam'(008).
      concatenate l1 l2 ',' into
      ls_message-line separated by space.
      append ls_message to lt_message.
    *insert Blank Line
      clear ls_message.
      ls_message-line = space.
      append ls_message to lt_message.
    *Assign Message text
      clear ls_message.
      concatenate text-011
                  text-012
                  into ls_message-line separated by space.
      append ls_message to lt_message.
    *insert Blank Line
      clear ls_message.
      ls_message-line = space.
      append ls_message to lt_message.
    *Assign Message text
      clear ls_message.
      concatenate text-013
                  text-014
                  text-015
                  into ls_message-line separated by space.
      append ls_message to lt_message.
      concatenate text-016
                  text-017
                  into ls_message-line separated by space.
      append ls_message to lt_message.
    *insert Blank Line
      clear ls_message.
      ls_message-line = space.
      append ls_message to lt_message.
      ls_message-line = text-018.
      append ls_message to lt_message.
      ls_message-line = text-019.
      append ls_message to lt_message.
      clear: ls_message.
      REFRESH IT_MESSAGE.
      it_message[] = lt_message[].
      APPEND IT_MESSAGE.
    ENDFORM. " POPULATE_EMAIL_MESSAGE_BODY

  • How to send a mail with attaching a report

    hi gurus,
        my requirment is i have to send a mail with attaching the report of a program to the client.. is it possible? help me with sample code.
    Thanks in advance.
    Regards,
    Indira D

    Hi Indira,
    plz check out this code below,
    *& Report  ZATTACH                                               *
    REPORT  ZATTACH                   .
    TABLES: ekko.
    PARAMETERS: p_email   TYPE somlreci1-receiver
                                      DEFAULT '[email protected]'.
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
          wa_ekpo TYPE t_ekpo.
    TYPES: BEGIN OF t_charekpo,
      ebeln(10) TYPE c,
      ebelp(5)  TYPE c,
      aedat(8)  TYPE c,
      matnr(18) TYPE c,
    END OF t_charekpo.
    DATA: wa_charekpo TYPE t_charekpo.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
            t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            w_cnt TYPE i,
            w_sent_all(1) TYPE c,
            w_doc_data LIKE sodocchgi1,
            gd_error    TYPE sy-subrc,
            gd_reciever TYPE sy-subrc.
    *START_OF_SELECTION
    START-OF-SELECTION.
      Retrieve sample data from table ekpo
      PERFORM data_retrieval.
      Populate table with detaisl to be entered into .xls file
      PERFORM build_xls_data_table.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Populate message body text
      perform populate_email_message_body.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_message
                                          it_attach
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'XLS'
                                          'filename'
                                 changing gd_error
                                          gd_reciever.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM initiate_mail_execute_program.
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp aedat matnr
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekpo.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_XLS_DATA_TABLE
          Build data table for .xls document
    FORM build_xls_data_table.
      CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
                 con_tab TYPE x VALUE '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
       con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
             INTO it_attach SEPARATED BY con_tab.
      CONCATENATE con_cret it_attach  INTO it_attach.
      APPEND  it_attach.
      LOOP AT it_ekpo INTO wa_charekpo.
        CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
                    wa_charekpo-aedat wa_charekpo-matnr
               INTO it_attach SEPARATED BY con_tab.
        CONCATENATE con_cret it_attach  INTO it_attach.
        APPEND  it_attach.
      ENDLOOP.
    ENDFORM.                    " BUILD_XLS_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables pit_message
                                              pit_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = pit_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
           Populate message body text
    form populate_email_message_body.
      REFRESH it_message.
      it_message = 'Please find attached a list test ekpo records'.
      APPEND it_message.
    endform.
    " POPULATE_EMAIL_MESSAGE_BODY
    <b>
    Reward points if this helps,</b>
    Kiran

Maybe you are looking for

  • BW report

    Hello, I am completely new to the BW system, but I have some very urgent task to complete. I need somebody's help urgently. My requirement is below... In BI reporting we are displaying HR head count information(reading data from R/3) on portal, based

  • Background job not yet been Finished

    Hi, I have set a Background job today at 10:15 to start run at today 11:30 AM. it is a periodic daily process at 11:30 am. But when i checked the status of this job, its still in the status Released. i know that, this job will not take more then 20 m

  • Traveling to Portugal --  Adapter/Converter Recommendations??

    I'm traveling to Portugal and I need to be able to charge my MacBook while I'm there. I went ahead and did some pretty superficial research that told me to buy both an adapter and a converter so that I don't fry my laptop. However, the converters I'v

  • Connect Adobe form to WEB Services

    Hi Experts , Can you please help me i need to Connect Adobe form to WEB Services . what Function Module DO i need to use to Convert or to create ADOBE Forms. once after Createing i need to connect to web service through SAP> Regd's Raj

  • Certification for Oracle AS10g OCA-OCP

    To all, Right now I am looking at review materials for taking up the exam for OCA, but I think the topics covered were for the older version of Oracle AS10g(9.0.4). I noticed that there is a lot of difference, directory structure and log files betwee