Issue with removing attachments in mail

Since my update to Yosemite i have been experiencing a problem when removing attachments from email messages. At random a few seconds after removing the attachment the rest of the message becomes unreadable - just a bunch of random symbols and letters. This is also affecting older emails that have had the attachments removed. This happens randomly and i cant identify any one thing or file format that maybe the cause - any help would be appreciated.

Similar problem, and this seems to be common among users of this forum.
The "Remove Attachments" command does not work with sent files. This is true whether I drag a photo to the message, or use the paper-clip attachment button.
I can remove attachments from received messages. Just not sent ones.
This is a bug, methinks.

Similar Messages

  • Why does "remove attachments" in Mail now remove entire e-mail?

    This is just one of numerous problems with Lion after installing it on MacBook Pro.  Every time I choose "remove attachments" in Mail, it deletes the entire e-mail and I can't bring it back.  Additionally:
    1.     I-Cal entries take forever (delayed entry) and assume I have an all-day event so I now have to enter the event and then open and edit it - additional steps.
    2.     Airport (Wi-Fi) now shuts off without warning and cannot, under any circumstances, be restarted from any of the several screens and buttons that supposedly offer that option.  Therefore, when I switch from Wi-Fi to Ethernet and then back, I have to do a restart.
    3.     The Address Book now has a stylistic but non-functional interface that requires several additional steps to look at anything and there is no longer an option in Mail to "Open in Address Book" without first opening the v-card, once again complicating my life.
    4.     The removal of arows on scroll bars means that I can no longer gradually look at a large file line by line but, rather, have to use the trackpad (which is also jumpy) try to focus in on the area I want by trila and error.  I hate the trackpad for these reasons and now that I have lost the arrows, I have essentially the same problem with the mouse - very cumbersome for anyone doing production type work, rather than just playing.
    5.     My Carbonite no longer works and I see there are compatibility issues with all kinds of other software.  Worse some of my favorite old programs (e.g. Fetch) no longer work in Lion.
    6.     The conversation function in Mail now groups things I don't want grouped (e.g., totally unconnected e-mails with the same words in the subject).  I had to turn that off for this reason.
    Overall, Lion is a huge disappointment.  It's all bells and whistles with actual losses in functionality for basic work - style over substance.  This is the same thing I've seen happen with Microsoft Excel as basic issues that needed addressing have been ignored while all sorts of pretty stuff that is pretty much useless has been added. 
    Even more frustrating is the message I got from Apple Support, which was to re-nstall Lion.  That took 6 hours and resulted in not one correction of any of these issues.  What has Apple done?  This OS was not ready for primetime.

    The "feature" I experience is that the message disappears, just as shown in Herbert's video (good work), and that it comes back after a quick mailbox switch. It has nothing to do with message sorting or anything. All my Mail settings are the same as in Mail 4.x, and everything worked fine there. Must be a bug in Mail 5. (Yes, I have reported it.)
    The "explanation" that Mail creates a copy without the attachment, instead of keeping the old message without the attachment, doesn't really solve the problem. (Sorry for my extensive use of smileys, it's not my style but sometimes convenient.) The copy should come up without the mailbox switch either way.
    Edit: spelling.

  • Remove attachments in Mail

    "Remove attachments" in Mail (Lion) is disabled and I cant remove the files from the emails I have sent. it worked fine before I switched to Lion and kept my Mail folder in Libary small. Anybody else having this problem?

    Just tried it out a little bit more: The problem is related only to mails sent from Mail.app 5.0 in Lion. Mails sent through the mobile me web interface for example behave normally after being synced back to Mail.app. Attachments can be removed from those mails within Mail.app.
    Another thing I noticed: The mails that do have the problem do not show the paper-clip symbol in the list of mails on the left side. The paper-clip should appear next to the addressee's name. The mail preview on the right, however, correctly shows that the mail has an attachment and it can be opnened by clicking. I also created a smart mailbox to show only mails that do have an attachment and are in the sent folder: Only the mails sent before installing lion are listed (attachements can be removed) – all lately sent mails are nout found: Obviously something makes Mail.app "forget" that there is an attachment when sending mails in Lion, thus graying out the command to remove the attachment from the specific mail.
    Regarding file types of the unremovable attachments there doesn't seem to be a pattern. I have the problem with both word documents and PDF files. The number of attachments neither seems to make a difference.
    Temporary solution: Do not send mails with attachments you want to potentially remove later on from within Mail.app in Lion at the moment. Instead, use an iOS device or your mail provider's web interface for sending those mails. Apple, please fix it!
    Message was edited by: FabeRox

  • Remove attachments in Mail fails

    Since I first installed Yosemite, I am no longer able to remove attachments in Mail. I use a POP account to download my email from a Microsoft Exchange Server and store the mail with attachment(s) on my iMac. The email plus attachments(s) are now physically in a folder - not the Inbox - on the hard disk of my iMac. They are no longer on the server. I drag (or save) the attachment (no problem) to the desktop or an OS X folder. But now when I try "Remove Attachments" within Mail to discard the attachment, leaving only the email text, the menu choice Messages->Remove Attachments is grey not black and thus unavailable. What is going on? Why does this no longer work? I also have tried dragging the file to one of my iCloud email folder - not the Inbox - but that does not work either. This used to work under Mavericks but no longer. But it should be there because the menu choice still exists. I get this behavior on my iMac at work and also on my iMac at home. Both iMacs are running OS X 10.10.1.
    Many thanks to anyone who can help solve this problem.

    Just tried it out a little bit more: The problem is related only to mails sent from Mail.app 5.0 in Lion. Mails sent through the mobile me web interface for example behave normally after being synced back to Mail.app. Attachments can be removed from those mails within Mail.app.
    Another thing I noticed: The mails that do have the problem do not show the paper-clip symbol in the list of mails on the left side. The paper-clip should appear next to the addressee's name. The mail preview on the right, however, correctly shows that the mail has an attachment and it can be opnened by clicking. I also created a smart mailbox to show only mails that do have an attachment and are in the sent folder: Only the mails sent before installing lion are listed (attachements can be removed) – all lately sent mails are nout found: Obviously something makes Mail.app "forget" that there is an attachment when sending mails in Lion, thus graying out the command to remove the attachment from the specific mail.
    Regarding file types of the unremovable attachments there doesn't seem to be a pattern. I have the problem with both word documents and PDF files. The number of attachments neither seems to make a difference.
    Temporary solution: Do not send mails with attachments you want to potentially remove later on from within Mail.app in Lion at the moment. Instead, use an iOS device or your mail provider's web interface for sending those mails. Apple, please fix it!
    Message was edited by: FabeRox

  • Issue with Removing the Patch Set Software 9.2.0.8

    Hi experts,
    I have issue with removing the patch set software 9.2.0.8
    I'm working on solaris box recently ugraded to 9.2.0.8 from 9.2.0.7. however i want to downgrade now. I have followed the document 4547809 mentioned. Now the real issue is when i restored the oracle_home (9.2.0.7) and execute sqlplus /nolog here is error message shown
    bash-2.05$ sqlplus /nolog
    bash: /oracle/test/920_64/bin/sqlplus: No such file or directory
    bash-2.05$ lsnrctl
    bash: /oracle/test/920_64/bin/lsnrctl: No such file or directory
    Please help
    thanks in advance

    Hi,
    Thanks for reply you are right
    ls -l /oracle/test/920_64/bin/sqlplus was not exist. However i copied everything from the backup.
    I'm trying again
    cp -r bk_test_home/* /oracle/test/920_64/*
    still i couldn't the file however it exist in bk_test_home. please suggest
    Thanks and regards

  • Having issues with sending attachments via iMail to PC users

    Having issues with sending attachments via iMail to PC users. Either they do not see all the attachments or the attachment comes across blank. Is there any suggested ways to resolve this?

    You can also use Dropbox. 2GB free. Put files in the Public folder and you can send them links of the files instead.
    You can use my referral link http://db.tt/MXNpy62 to create an account.

  • Mail.app- 'Remove Attachments' corrupting mails

    I have a weird issue that I've not seen mentioned anywhere. Wondering if anyone can give me any debugging tips.
    I'm using Mail 5.0 in Lion 10.6.1 (issue was occurring in 10.6.0 as well).
    I have Mail connected to Exchange Server 2010.
    I have a fairly tight restriction on mailbox sizes so I have to remove attachments from emails before I file them.
    My problem is this; about 1 in 3 times I remove an attachment the 'replacement' e-mail is full of gibberish characters.
    Typically if I look at the raw source of the e-mail then the text version of the mail is retained correctly- it seems to be the Base64 encoded version that is corrupted.
    Any idea what I can do to debug this? I have tried removing the envelope files and removing/adding the account back in and re-syncing it but the issue has reappeared.
    I've reported this to Apple on http://bugreports.apple.com but have not had a response.
    Thanks in advance.

    Edward- do you mean Entourage mailbox or Exchange mailbox? i.e. are you using mail.app or Entourage/outlook as your mail client?
    Assuming you meant Exchange mailbox on mail.app, the steps you would take are simple;
    1- Save attachments
    In the mail, click the 'Save' button (next to the 'Quicklook' button) to save all attachments to your normal folder (this folder is changeable in the settings- the default is to save to your 'Downloads' folder).
    2- Move the mail to a local mailbox.
    If you don't already have a local mailbox then select Menu: Mailbox/New Mailbox... and in the dialog box select 'On my Mac' to save the mailbox locally instead of on the Exchange server.
    To move the message you select menu: Message/Move to... and select the local mailbox
    3- Remove attachments
    View the local mailbox, select the message you moved in there and do menu: Message/Remove Attachhments
    (I have added a keyboard shortcut for this as I do it a lot)
    Because it's a local mailbox the message should be stripped of its attachments without corruption.
    4- File the message
    Now that the message has been stripped of the attachments, file the message in whatever mailbox you want with menu: Message/Move to...
    Hope this helps.

  • Issues with Japanese encoding using Mail

    Since recently (I would say since I updated to 10.6), I have an issue with Japanese-encoded (ISO 2022-JP) mails on my English MacOS.
    I have no problem to read, edit and write answers to any mails.
    However with some ISO JP-2022-JP encoded messages (sent with Thunderbird 2.0.0.23 (Windows/20090812) btw) I have the following misbehaviour:
    - if I send the message and let the encoding to "automatic", Mail sends the mail in UTF-8, which I do not want since most of Japanese computer do not understand UTF-8 by default (and the receiver gets panicked: "I can not read your mail T_T !")
    - if I set the encoding to "ISO JP-2022-JP", I can not send nor save the message (see [1] at the end of the post). One should note that the error message when saving is really misleading (and yes my hard-drive has a lot of space left) and it should be fixed by Apple.
    - if I dig a bit deeper, I can in effect find some characters in the original message which prevent Mail to send my mail. It however does not make any sense since:
    - those char were in the original message properly encoded in ISO JP-2022-JP
    - those char are always very common ones
    The only solution I have found so far is to delete the original message in my mail, which is very frustrating...
    A sample of such mail can be found at (I removed personal info. and the mail is about a drinking party):
    - http://files.me.com/trouve.antoine/73w3w9
    Help would be very appreciated.
    Thank you very much.
    Antoine
    [1] I get the following error messages:
    -> try to save:
    *This message can’t be saved to the Drafts mailbox.*
    The message contains one or more attachments that
    are too large to be saved in the Drafts mailbox. Try
    deleting some attachments.
    ->try to send
    *Invalid Text Encoding*
    Some characters in your message could not be
    converted to the “Japanese (ISO 2022-JP)” text
    encoding. Choose a different encoding from the
    “Text Encoding” menu.

    You can find out about the different versions here, for example:
    http://en.wikipedia.org/wiki/ISO/IEC_2022
    Thank you. I feel a bit stupid for not having looked in Wikipedia at first...
    I sometime wonder how could such basic problem like charset not being solved after more than 40 years of computer science...
    Here is a note that addresses that problem, but I don't think it works with 10.6. Might be worth a > try:
    http://discussions.apple.com/thread.jspa?threadID=121808&tstart=60
    Thank for the link.
    It seems to still work: new japanese mails are now sent in "ISO 2022-JP-2".
    However, for messages with the header explicitly specifying "ISO 2022-JP" (which should be "ISO 2022-JP-2" on my mac) it has no influence.
    The only ways I see to solve this issue would be:
    i) to force "ISO 2022-JP-2" for all mails (a bit too extreme)
    ii) to force the use of "ISO 2022-JP-2" instead of "ISO 2022-JP", but I do not think such precise configuration is possible
    This mess appears to be due to Thunderbird which seems to mix "ISO 2022-JP-2" and "ISO 2022-JP", but I do not have any working Thunderbird to test now...

  • Removing attachments in Mail

    When I select the command "remove attachments" I end up with a message that has the initial attachment removed, but with a new attachment, small in size, named Mail Attachment.txt that says that the iniital attachment was removed (used to be just text in the previous Mail versions).
    As I select a command that promises to get rid of attachments, I exchange it with a new one. Very irritating. How can I have it really removed all the way, and rather have the remove confirmation in text again?

    Similar problem, and this seems to be common among users of this forum.
    The "Remove Attachments" command does not work with sent files. This is true whether I drag a photo to the message, or use the paper-clip attachment button.
    I can remove attachments from received messages. Just not sent ones.
    This is a bug, methinks.

  • Why can't I remove attachments from mail in Apple Mail 5

    I'm sure I used to be able to do this in SL?
    I can do it on some messages, but not all, and not quite sure of a rhyme or reason (I've noted others think it doesn't work on Sent mail, but SOME of my sent messages let me delete attachments??)
    Has there been a change?
    Will there be a fix?

    I have now created a smart mailbox as described above (good idea), and although I have some 50 messages in my Sent box, all with attachments (waiting to be removed so I can store the messages in the proper mailboxes), the smart mailbox is empty. So, Mail doesn't recognise these messages as containing attachments.
    This led me to think that maybe Mail has been redesigned to work the way you would expect it to, at last; to contain a link to attachments instead of including them in all their bits and bytes. That would mean that the messages in my Sent box - with attachments - could be stored in local (or server-side) mailboxes without taking up extensive space.
    But then I checked the size of my Sent Messages folder inside the Mail Folder in Finder, and - whoops - it's 50+ MB. So the sent messages do contain attachments all right. And Mail doesn't recognise these, since a) the smart mailbox trick says that the messages are free from attachments, and b) the Remove Attachments menu option is disabled.
    I will have to wait for the next Mail update, and my Sent box will grow accordingly ...

  • Gmail App Issue with picture embed in mail body

    Hi,
    I am an iphone 5 user and have installed the Gmail app from google inc. . But there seems to be an issue with sending emails.
    If a new email is composed with a picture copied from the camera roll or other app in phone and pasted onto the email body in the gmail app,
    and sent out, the email body gets stripped off the embedded picture.
    The sent email in the 'Sent' folder of Gmail app does not display the embedded picture. Is this a known issue with the Gmail app?
    Is there any resolution?

    Hi.,
    First you have to store image in MIME Repository. , then use HTM  type to send mail .,
    check these : [Send Picture in body of Email|Send an picture to body of an email;
    and  [Send HTML mail with image|Re: Send HTML mail with image;
    hope this helps u.,
    Thanks & regards,
    Kiran

  • Font issue with left sidebar in Mail

    I'm having perhaps another/different font issue with Mail after updating to Snow Leopard.
    I do have a Dell 24" LCD hooked up to my MBP. I've noticed the comments/links related to the font smoothing issues. I've played around with that with no noticeable change.
    Check out the before & after pics. Anyone have thoughts?
    http://i625.photobucket.com/albums/tt336/marascoc/mac/beforeafter.jpg
    Message was edited by: marascoc

    Same issue here whenever I'm using a different color profile. Only the default color profile seems to work properly with the new sidebar in mail.

  • Selectively removing attachments in mail to send

    If I am sending a bunch of files as attachments, and then decide I want to remove just 1 of them before I send the e-mail, how do I do that? Clicking on Remove Attachments removes them all, and selecting one and dragging it to the trash does nothing.
    Thanks,
    Richard

    Place the cursor after or before the one you want to remove, and either use the backward delete key or forward delete key to remove just that one.
    Ernie

  • Issue with 3 attachments in an email

    Hi All,
    Anybody can send me the program which generates 3 excel sheets as an attachment. i wrote one program which geberates .txt files as an atatchmetns.
    thanks,
    maheedhar

    hi,
    following is the code which uses both formats PDF and CSV OR XLS.
    *&  Report  Z_SEND_JOB.                                                &*
    *& Title            : Send spool lists with PDF / CSV attachments.     &*
    *& Program name     : Z_SEND_JOB.                                      &*
    *& Source Code Type : Report                                           &*
    report  z_send_job.
    *                           INCLUDE                                    *
    include z_send_job_data.
    include z_send_job_pai.
    *                    AT SELECTION-SCREEN.                              *
    at selection-screen.
      if s_email1[] is initial.
        message s899(mm) with 'Please Enter E-Mail id'.
        stop.
      endif.
      if p_spool is initial and p_tcode is initial and p_pgna is initial and p_sch is initial.
        message s899(mm) with 'Please enter Spool Number or Tcode or Program name or created by'.
        stop.
      endif.
    *                    START-OF-SELECTION.                               *
    start-of-selection.
      perform get_job_details.
      if not p_pdf is initial.
    *process to send as pdf attachment
        perform convert_spool_to_pdf.
        perform process_email.
      else.
    *process to send as excel attachment
        perform convert_spool_excel.
        if not it_spool_xls_return[] is initial.
          perform process_email.
        else.
          message i000(0) with 'Cannot Send this spool as an Excel File'.
        endif.
      endif.
    *iinclude z_send_job_data.
    *&  Include           Z_SEND_JOB_DATA
    *                       Tables Workarea                                *
    tables: somlreci1,
             tbtcp.
    *                       TYPE-POOLS                                     *
    type-pools: truxs.
    *                           CONSTANTS                                  *
    constants: c_no(1) type c value ' ',
               c_device(4) type c value 'LOCL'.
    *                   GLOBAL DATA DECLARATIONS                           *
    data : gd_recsize type i.
    data : l_format(3) type c.
    *Job Runtime Parameters
    data : gd_eventid like tbtcm-eventid,
           gd_eventparm like tbtcm-eventparm,
           gd_external_program_active like tbtcm-xpgactive,
           gd_jobcount like tbtcm-jobcount,
           gd_jobname like tbtcm-jobname,
           gd_stepcount like tbtcm-stepcount,
           gd_error type sy-subrc,
           gd_reciever type sy-subrc.
    data : w_recsize type i.
    data : gd_subject like sodocchgi1-obj_descr,
           it_mess_bod like solisti1 occurs 0 with header line,
           it_mess_att like solisti1 occurs 0 with header line,
           gd_sender_type like soextreci1-adr_typ,
           gd_attachment_desc type so_obj_nam,
           gd_attachment_name type so_obj_des.
    *Spool to PDF conversions
    data : gd_spool_nr like tsp01-rqident ,
           gd_destination like rlgrap-filename,
           gd_bytecount like tst01-dsize,
           gd_buffer type string.
    data : gv_client type tsp01-rqclient,
           gv_name   type tsp01-rqo1name,
           gv_type   type  rststype-type,
           gv_objtype   type  rststype-type,
           gv_is_otf(1) type  c value ' ',
    *         GV_SPOOL   type  i,
           gv_pdfspoolid type tsp01-rqident,
           gv_jobname    type tbtcjob-jobname,
           gv_jobcount   type tbtcjob-jobcount.
    *                       Field Strings                                  *
    *Spool IDs
    types: begin of t_tbtcp.
            include structure tbtcp.
    types: end of t_tbtcp.
    *for excel
    types: begin of t_spool.
            include structure bapixmspoo.
    types: end of t_spool.
    *                     Internal Tables                                  *
    data: it_tbtcp type standard table of t_tbtcp initial size 0,
          wa_tbtcp type t_tbtcp.
    *Binary store for PDF
    data: begin of it_pdf_output occurs 0.
            include structure tline.
    data: end of it_pdf_output.
    data t_spools type standard table of t_spool with default key.
    data : it_spool_xls        like   t_spools with header line.
    data : it_spool_xls_return type   truxs_t_text_data.
    data: wa_spool_xls_return(255) type c.
    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 : begin of gt_spool_file occurs 0,
               tdline(2500) type c,
           end of gt_spool_file.
    *                    Selection Screen                                  *
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_email1 for  somlreci1-receiver
                                  no intervals.
    parameter: p_spool like tbtcp-listident,
               p_tcode like tstc-tcode,
               p_pgna like tstc-pgmna,
               p_sch like tbtcp-sdluname default sy-uname.
    selection-screen end of block b1.
    selection-screen begin of block b2 with frame title text-002.
    parameter: p_pdf radiobutton group g1 default 'X',
               p_excel radiobutton group g1.
    selection-screen end of block b2.
    *include z_send_job_pai
    *&  Include           Z_SEND_JOB_PAI
    *&      Form  GET_JOB_DETAILS
    form get_job_details .
      data : l_spool(10) type c.
      if p_spool is initial.
    *IF USER ENTER tcode get program name
        if not p_tcode is initial.
          select single pgmna into p_pgna from tstc
                                          where tcode = p_tcode.
        endif.
    *get spool if for program name.
        if not p_pgna is initial.
          if p_sch is initial.
            select listident into l_spool from tbtcp    "GD_SPOOL_NR
                                    up to 1 rows
                                    where progname = p_pgna
                                    order by listident descending.
            endselect.
            if sy-subrc eq 0.
              move : l_spool to gd_spool_nr.
            endif.
          else.
            select listident into l_spool from tbtcp
                                up to 1 rows
                                where progname = p_pgna
                                and sdluname = p_sch
                                order by listident descending.
            endselect.
            if sy-subrc eq 0.
              move : l_spool to gd_spool_nr.
            endif.
          endif.
        endif.
    *get spool id with usr name
        if not p_sch is initial and p_pgna is initial.
          select listident into l_spool from tbtcp
                                  up to 1 rows
                                  where sdluname = p_sch
                                  order by listident descending.
          endselect.
          if sy-subrc eq 0.
            move : l_spool to gd_spool_nr.
          endif.
        endif.
      else.
        gd_spool_nr = p_spool.
      endif.
      if gd_spool_nr is initial.
        message s899(mm) with 'Spool not found'.
        stop.
      endif.
    endform.                    " GET_JOB_DETAILS
    *&      Form  CONVERT_SPOOL_TO_PDF
    form convert_spool_to_pdf .
      call function 'RSPO_RETURN_SPOOLJOB'
        exporting
          rqident              = gd_spool_nr
          first_line           = 1
          last_line            = 1000
          desired_type         = 'RAW'
        tables
          buffer               = gt_spool_file
        exceptions
          no_such_job          = 1
          job_contains_no_data = 2
          selection_empty      = 3
          no_permission        = 4
          can_not_access       = 5
          read_error           = 6
          type_no_match        = 7
          others               = 8.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      select single rqclient
                    rqo1name
                    into (gv_client, gv_name)
                    from tsp01
                    where rqident = gd_spool_nr.
      call function 'RSTS_GET_ATTRIBUTES'
        exporting
          authority     = 'SP01'
          client        = gv_client
          name          = gv_name
          part          = 1
        importing
          type          = gv_type
          objtype       = gv_objtype
        exceptions
          fb_error      = 1
          fb_rsts_other = 2
          no_object     = 3
          no_permission = 4
          others        = 5.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      if gv_objtype(3) = 'OTF'.
        gv_is_otf = 'X'.
      else.
        gv_is_otf = space.
      endif.
      if gv_is_otf eq 'X'.
        call function 'CONVERT_OTFSPOOLJOB_2_PDF'
          exporting
            src_spoolid   = gd_spool_nr
            no_dialog     = ' '
          importing
            pdf_bytecount = gd_bytecount
            pdf_spoolid   = gv_pdfspoolid
            btc_jobname   = gv_jobname
            btc_jobcount  = gv_jobcount
          tables
            pdf           = it_pdf_output.
      else.
        call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
          exporting
            src_spoolid              = gd_spool_nr
            no_dialog                = c_no
            dst_device               = c_device
          importing
            pdf_bytecount            = gd_bytecount
          tables
            pdf                      = it_pdf_output
          exceptions
            err_no_abap_spooljob     = 1
            err_no_spooljob          = 2
            err_no_permission        = 3
            err_conv_not_possible    = 4
            err_bad_destdevice       = 5
            user_cancelled           = 6
            err_spoolerror           = 7
            err_temseerror           = 8
            err_btcjob_open_failed   = 9
            err_btcjob_submit_failed = 10
            err_btcjob_close_failed  = 11
            others                   = 12.
      endif.
      if sy-subrc eq 0.
    * Transfer the 132-long strings to 255-long strings
        loop at it_pdf_output.
          translate it_pdf_output using ' ~'.
          concatenate gd_buffer it_pdf_output into gd_buffer.
        endloop.
        translate gd_buffer using '~ '.
        do.
          it_mess_att = gd_buffer.
          append it_mess_att.
          shift gd_buffer left by 255 places.
          if gd_buffer is initial.
            exit.
          endif.
        enddo.
      endif.
    endform.                    " CONVERT_SPOOL_TO_PDF
    *&      Form  PROCESS_EMAIL
    form process_email .
      if not p_pdf is initial.
        describe table it_mess_att lines gd_recsize.
      else.
        describe table it_spool_xls_return lines gd_recsize.
      endif.
      check gd_recsize > 0.
      perform send_email.
    endform.                    " PROCESS_EMAIL
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
    form send_file_as_email_attachment
         tables it_message
                it_attach
         using 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.
      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.
      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.
    * do the follwoing 3 times with three different internal tables.
      t_attachment[] = it_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.
      loop at s_email1.
        t_receivers-receiver   = s_email1-low.
        t_receivers-rec_type   = 'U'.
        t_receivers-com_type   = 'INT'.
        t_receivers-notif_del  = 'X'.
        t_receivers-notif_ndel = 'X'.
        append t_receivers.
      endloop.
      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.
      if ld_error ne 0.
        message s899(mm) with 'Error while sending email'.
        stop.
      else.
        message s899(mm) with 'Email sent succesfully'.
      endif.
    * Populate zreceiver return code
      loop at t_receivers.
        ld_receiver = t_receivers-retrn_code.
      endloop.
    endform.                    " SEND_FILE_AS_EMAIL_ATTACHMENT
    *&      Form  SEND_EMAIL                                               &*
    form send_email. " USING  P_EMAIL.
      data p_sender like somlreci1-receiver.
      data l_sub(50) type c.
      refresh it_mess_bod.
    * Default subject matter
      if not p_pdf is initial.
        gd_subject = 'SAP Report Spool Output - .pdf File Attachment'.
        gd_attachment_desc = 'spooldata'.
        it_mess_bod = 'SAP Report Spool Output - .pdf File Attachment'.
        append it_mess_bod.
      else.
        gd_subject = 'SAP Report Spool Output - .xls File Attachment'.
        gd_attachment_desc = 'spooldata'.
        it_mess_bod = 'SAP Report Spool Output - .xls File Attachment'.
        append it_mess_bod.
      endif.
    * If no sender specified - default blank
      if p_sender eq space.
        gd_sender_type = space.
      else.
        gd_sender_type = 'INT'.
      endif.
      if not p_tcode is initial.
        concatenate 'Attachment from TNS' p_tcode into l_sub separated by space.
      elseif not p_pgna is initial.
        concatenate 'Attachment from program' p_pgna into l_sub separated by space.
      elseif not p_spool is initial.
        concatenate 'Attachment from spool' p_spool into l_sub separated by space.
      else.
        concatenate 'Attachment from user' p_sch into l_sub separated by space.
      endif.
      if not p_pdf is initial.
        l_format = 'PDF'.
      else.
        l_format = 'XLS'.
        it_mess_att[] = it_spool_xls_return[].
      endif.
    * Send file by email according to the selection file format (.PDF,.XLS File)
      perform send_file_as_email_attachment
              tables it_mess_bod
                     it_mess_att
              using l_sub
                    l_format
                    gd_attachment_name
                    gd_attachment_desc
                    p_sender
                    gd_sender_type
              changing gd_error
                    gd_reciever.
    endform.                    " SEND_EMAIL
    *&      Form  convert_spool_excel                                      &*
    form convert_spool_excel .
      data : lv_spool like tsp01-rqident,
             l_count  type sy-tfill,
             l_tabix  type sy-tabix.
      lv_spool = gd_spool_nr.
      call function 'RSPO_RETURN_ABAP_SPOOLJOB'
        exporting
          rqident              = lv_spool
          first_line           = 1
        tables
          buffer               = it_spool_xls
        exceptions
          no_such_job          = 1
          not_abap_list        = 2
          job_contains_no_data = 3
          selection_empty      = 4
          no_permission        = 5
          can_not_access       = 6
          read_error           = 7
          others               = 8.
      if sy-subrc ne 0.
        message s899(mm) with 'Error while reading spool'.
        stop.
      endif.
      call function 'SAP_CONVERT_TO_CSV_FORMAT'
        exporting
          i_field_seperator    = '|'
          i_line_header        = '-'
          i_filename           = 'TEST'
        tables
          i_tab_sap_data       = it_spool_xls
        changing
          i_tab_converted_data = it_spool_xls_return
        exceptions
          conversion_failed    = 1
          others               = 2.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      data : l_length(3) type c.
    *change the format to excel by using the object classes
      loop at it_spool_xls_return into wa_spool_xls_return.
        condense wa_spool_xls_return.
    *  l_length = strlen( wa_spool_xls_return ).
    *  l_length = l_length - 3.
    **delete header lines if contains any
        if  wa_spool_xls_return cp '|--*--|'
        or  wa_spool_xls_return np '*|*|*|*'.
          delete it_spool_xls_return.
          clear wa_spool_xls_return.
    *      concatenate cl_abap_char_utilities=>newline wa_SPOOL_XLS_RETURN
    *      into wa_SPOOL_XLS_RETURN.
    *      modify it_spool_xls_return from wa_spool_xls_return.
    *      clear wa_spool_xls_return.
        else.
    *If not new line then replace '|' by tabs
          if not wa_spool_xls_return eq cl_abap_char_utilities=>newline.
            if wa_spool_xls_return ca '|'.
              concatenate cl_abap_char_utilities=>newline wa_spool_xls_return
    *        cl_abap_char_utilities=>horizontal_tab
              into wa_spool_xls_return.
              replace all occurrences of '|' in wa_spool_xls_return
              with cl_abap_char_utilities=>horizontal_tab.
    *get rid of '-' symbol if contains any
    *        if wa_SPOOL_XLS_RETURN CA '-'. "or not wa_SPOOL_XLS_RETURN CA '|'.
    *          CLEAR wa_SPOOL_XLS_RETURN.
    *          concatenate cl_abap_char_utilities=>newline wa_SPOOL_XLS_RETURN
    *          cl_abap_char_utilities=>horizontal_tab
    *          into wa_SPOOL_XLS_RETURN.
    *        endif.
              replace all occurrences of '.' in wa_spool_xls_return
              with space.
              condense wa_spool_xls_return.
              modify it_spool_xls_return from wa_spool_xls_return.
    *          wa_SPOOL_XLS_RETURN = cl_abap_char_utilities=>newline.
    *          IF l_count NE 0 .
    **        l_tabix = l_tabix + 1.
    **Insert new line for the excel data
    **        if sy-tabix gt 1.
    **          INSERT wa_SPOOL_XLS_RETURN INTO it_SPOOL_XLS_RETURN INDEX l_tabix.
    **        endif.
    *            l_count = l_count - 1.
    *          ENDIF.
              clear wa_spool_xls_return.
            else.
              delete it_spool_xls_return.
              clear wa_spool_xls_return .
    *          concatenate cl_abap_char_utilities=>newline wa_SPOOL_XLS_RETURN
    **        cl_abap_char_utilities=>horizontal_tab
    *          into wa_SPOOL_XLS_RETURN.
    *          modify it_SPOOL_XLS_RETURN from wa_SPOOL_XLS_RETURN.
    *          clear wa_SPOOL_XLS_RETURN.
            endif.
          endif.
        endif.
      endloop.
    endform.                    " convert_spool_excel

  • Issue with Attachment download from Mail?

    I am having an issue with an attachment. I opened the attachment from an email account on my iPad2 and the screen has just gone black. Mail will not let me out of trying to view the attachment. I tap on the screen and nothing happens. It has frozen my mail accounts. Any one have an idea how to cancel the attachment if the mail is not responding?

    Do a hard reset: Press and hold on the Home button and the On/Off button at the same time. Continue to hold even after you see the "Slide to Power off" screen. Hold until the Apple logo comes up.

Maybe you are looking for

  • Mobile data entry

    Dear all, I have successfully configured the mobile data entry in SAP. i tested the transaction LM00 and it is working fine on sap gui on pc. can someone explain to me how i will open this transaction on a Windows ce device i am working on SAP ECC 6.

  • Statistics: Reset of unfinished data collection

    Hi, I am analyzing some performance issues and seeing the following error in my statistics details under WEB_INIT: ERROR   Reset of unfinished data collection Does anyone knows what this means? I cannot find anything on the subject. Thanks David

  • Where did my I-Tunes Header Go?

    I don't know how or when it happened but my I-tunes header line is gone. The play buttons, the search box and ability to drag the I-tunes page around have gone. Any thoughts? Dual 2Ghz G5 PowerMac   Mac OS X (10.4.10)  

  • IPad 1 not upgrading to iOS 6

    Why isn't the original iPad not being updated to ios 6

  • Alias Combination Property - Hyperion Essbase Application Manager

    Hi, I want to know how the Alias Combination Property works in Hyperion Essbase Application Manager. I tried substituting 2 different alias names for 2 different member combinations. But this did not work with the version of Hyperion essbase Applicat