Why is gmail blocking me from sending email with a "pages" document attached?

Why is gmail blocking me from sending email with a "pages" document attached? I've checked the document for viruses with "MacKeeper" and it's clean.

Google reads your emails, in case you did not know that. Unless you are sending an email containing content Google can extract and add to its vast database of personal information, Google has no use for it.
Google Mail is becoming progressively useless. It won't accept .zip attachments, at least not the last time I tried, it will eventually prevent you from using an email client unless you visit their web mail interface, and it will disable your account if you attempt to log in from someplace Google deems is not where Google thinks you ought to be.
Gmail is worth every cent you paid.
Get rid of MacKeeper. It is capable of doing nothing beneficial and will only cause problems.

Similar Messages

  • How can I block myself from sending email to a certain email address?

    How can I block myself from sending email to a certain email address?  I am in the middle of a relationship ending and I want to RESTRICT myself from being able to send outgoing email to a certain email address. Please advise. I have no will power and I don't want to be engaged in back and forth email drama.  Thanks.

    Might sound kind of silly, but you could go into Contacts, the person in question, edit, and where it says Add Field, put somthing in like STOP, or DO NOT DO THIS
    At least that would get your attention, even if it doesn't block you from emailing.
    There just isn't much you can do to block yourself.  If you have a couple close friends, do something like an AA support group...call a friend and have them talk you out of emailing.
    I'm not trying to be smart alecky about this, actually trying to help, but there isn't much to offer.

  • Since Maverick download, pages update, I can't send a gmail message with a pages document attached. Any advise?

    Any solution to this baffling and frustrating problem. Since Maverick update and pages update, gmail won't let me send a message with a pages document attached???
    Please help

    When i send mail to contacts who use gmail, I get this in a failure notice "
    Recipient address: [email protected]
    Reason: SMTP transmission failure has occurred
    Diagnostic code: smtp;552-5.7.0 This message was blocked because its content presents a potential issue. Please visit http://support.google.com/mail/bin/answe to review our message content and attachment content guidelines. tr4si424804pab.34 - gsmtp
    Remote system: dns;gmail-smtp-in.l.google.com (TCP|17.164.72.160|64923|173.194.79.26|25) (mx.google.com ESMTP tr4si424804pab.34 - gsmtp)"
    I have a gmail account supposedly synced in and I get the same results.

  • Shell Script to send email with .txt file as attachment

    Dear Al,
    Could any one help me with code, for sending email with .txt file as attachment using shell script.
    Thank You!

    978334 wrote:
    Dear Al,
    Could any one help me with code, for sending email with .txt file as attachment using shell script.
    Thank You!http://bit.ly/XHfSCz
    https://forums.oracle.com/forums/search.jspa?threadID=&q=sendmail&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Sending emails with both body and attachment to multiple recipients

    I have a requirement to send email with body and attachment to multiple recipients.
    Body of the email is a standard text. It is a proxy-to-mail scenario.
    Here is what I've done: (I'm using PI 7.11)
    One mapping from Source to Target structure (format of the attachment text file)
    Second mapping from Target Structure to Mail Package format.
    In the second mapping I'm concatenating the output of first step into "Content" of the Mail Package.
    "XIPAYLOAD" is the message protocol used.
    The "Keep attachments" option in the Mail adapter allows only to send "Content" as attachment or as body of the email.
    How to send an email with both content and text?
    The other problem is even with using ASMA, I can't send email to multiple recipients. I can only do CC and TO for 1 person each - a total of 2. Although I can resolve this by creating mailing lists, it is better if this can be addressed in PI.
    Thanks for any input you can provide!
    Edited by: crazylad on Jan 18, 2012 3:39 PM

    Thank you for your response Mikael.
    For the first question, I was able to find the solution in the following blog:
    XI Mail Adapter : Dynamically building attachment and message body content using a simple UDF
    (I just needed to search with the right set of key words )
    The key is to set the "Content Encoding" as "None" in the mail adapter. If this is not done, the mail will be sent with an attachment - untitled.bin containing both the mail body and the attachment text. Also, don't forget to check the "Keep Attachments" checkbox in the mail adapter.
    Multiple recipients could be added by separating the email IDs with a Comma. I have used ASMA to set the recipients.

  • To send email with editable PDF/XLS attachment

    Hi All,
      Is it possible to send editable PDF/XLS attachment in a mail to the customer via SAP, if yes how?
    Please Help! Urgent

    hi,
    *Sending mail with attachment
    * This program will allowed you to send email with attachment.
    * First, specify the attachment file from your local hardisk and execute.
    * Next, specify the sender email address and click the send button.
    report y_cr17_mail.
    data method1 like sy-ucomm.
    data g_user like soudnamei1.
    data g_user_data like soudatai1.
    data g_owner like soud-usrnam.
    data g_receipients like soos1 occurs 0 with header line.
    data g_document like sood4 .
    data g_header like sood2.
    data g_folmam like sofm2.
    data g_objcnt like soli occurs 0 with header line.
    data g_objhead like soli occurs 0 with header line.
    data g_objpara  like selc occurs 0 with header line.
    data g_objparb  like soop1 occurs 0 with header line.
    data g_attachments like sood5 occurs 0 with header line.
    data g_references like soxrl occurs 0 with header line.
    data g_authority like sofa-usracc.
    data g_ref_document like sood4.
    data g_new_parent like soodk.
    data: begin of g_files occurs 10 ,
      text(4096) type c,
       end of g_files.
    data : fold_number(12) type c,
           fold_yr(2) type c,
           fold_type(3) type c.
    parameters ws_file(4096) type c default 'c:\debugger.txt'.
    * Can me any file fromyour pc ....either xls or word or ppt etc ...
    g_user-sapname = sy-uname.
    call function 'SO_USER_READ_API1'
    exporting
       user                            = g_user
    *    PREPARE_FOR_FOLDER_ACCESS       = ' '
    importing
       user_data                       = g_user_data
    *  EXCEPTIONS
    *    USER_NOT_EXIST                  = 1
    *    PARAMETER_ERROR                 = 2
    *    X_ERROR                         = 3
    *    OTHERS                          = 4
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    fold_type = g_user_data-outboxfol+0(3).
    fold_yr = g_user_data-outboxfol+3(2).
    fold_number =  g_user_data-outboxfol+5(12).
    clear g_files.
    refresh : g_objcnt,
      g_objhead,
      g_objpara,
      g_objparb,
      g_receipients,
      g_attachments,
      g_references,
      g_files.
    method1 = 'SAVE'.
    g_document-foltp  = fold_type.
    g_document-folyr   = fold_yr.
    g_document-folno   = fold_number.
    g_document-objtp   = g_user_data-object_typ.
    *g_document-OBJYR   = '27'.
    *g_document-OBJNO   = '000000002365'.
    *g_document-OBJNAM = 'MESSAGE'.
    g_document-objdes   = 'sap-img.com testing by program'.
    g_document-folrg   = 'O'.
    *g_document-okcode   = 'CHNG'.
    g_document-objlen = '0'.
    g_document-file_ext = 'TXT'.
    g_header-objdes =  'sap-img.com testing by program'.
    g_header-file_ext = 'TXT'.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
      exporting
        method             = method1
       office_user        = sy-uname
       ref_document       = g_ref_document
       new_parent         =  g_new_parent
    importing
       authority          =  g_authority
    tables
       objcont            = g_objcnt
       objhead            = g_objhead
       objpara            = g_objpara
       objparb            = g_objparb
       recipients         = g_receipients
       attachments        = g_attachments
       references         = g_references
       files              = g_files
      changing
        document           = g_document
       header_data        = g_header
    *   FOLMEM_DATA        =
    *   RECEIVE_DATA       =
    * File from the pc to send...
    method1 = 'ATTCREATEFROMPC'.
    g_files-text = ws_file.
    append g_files.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
      exporting
        method             = method1
       office_user        = g_owner
       ref_document       = g_ref_document
       new_parent         =  g_new_parent
    importing
       authority          =  g_authority
    tables
       objcont            = g_objcnt
       objhead            = g_objhead
       objpara            = g_objpara
       objparb            = g_objparb
       recipients         = g_receipients
       attachments        = g_attachments
       references         = g_references
       files              = g_files
      changing
        document           = g_document
       header_data        = g_header
    method1 = 'SEND'.
    g_receipients-recnam = 'MK085'.
    g_receipients-recesc = 'B'.
    g_receipients-sndex = 'X'.
    append  g_receipients.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
      exporting
        method             = method1
       office_user        = g_owner
       ref_document       = g_ref_document
       new_parent         =  g_new_parent
    importing
       authority          =  g_authority
    tables
       objcont            = g_objcnt
       objhead            = g_objhead
       objpara            = g_objpara
       objparb            = g_objparb
       recipients         = g_receipients
       attachments        = g_attachments
       references         = g_references
       files              = g_files
      changing
        document           = g_document
       header_data        = g_header.
    *-- End of Program  
    Hope this helps, Do reward.

  • Can't send email with large (over 1MB) attachment

    Win 7 64-bit, Thunderbird 31.2.0, eSet antivirus (but disabling it for email doesn't help), godaddy email server (works fine from godaddy web mail), port 80 (been using this port for years; 25 doesn't work)
    Sending email with a 974KB attachment works. Email with a 1.4MB (and larger) attachment doesn't work. The error message appears pretty quickly (5 seconds at the most).
    The message is "the connection to SMTP server smtpout.secureserver.net timed out".
    This problem seem to appear at random, then go away and all is well (for a while).

    No. The modem is an Arris obtained from Comcast on 6/9/2014 after the prior one failed.

  • Sending email with 1-2 MB attachment

    Why sending email with small attachment in iPad IOS7 feels like waiting for a flight delay without announcement ?
    Very embarrassing for Apple to missed this issue....
    Internet connection is fine, but email could not get through the outbox.... Oh my God...

    Hey,
    Many people have expirienced this...
    The problem for most people were their, internet connection, or their device.
    This might not work, for some people.
    I would recommend holding down the power button and the home button until the apple logo shows up.
    Then you can open mail and send your attachment, hopefully.
    If that was successfull, have a good evening!
    -- Shamurocks45

  • How do I change Firefox so that when I update it doesn't block me from sending emails from my webmail?

    After updating Firefox, my webmail account doesn't let me send emails. This happens if I use Outlook Express or if I go to the webmail site in Firefox. I can send emails if I go to the webmail site in Explorer. The last time this happened someone from my internet provider directed me enough so that I could figure out what to do, but this time they were not helpful - it is a Firefox issue.
    Thanks

    Type '''about:support''' in the address bar and press '''Enter.'''
    Under the main banner, press the button; '''Copy Text To Clipboard.'''.
    Then in the reply box at the bottom of this page,
    do a right click in the box and select '''Paste.'''
    This will show us your system details.
    '''No Personal Information Is Collected.'''

  • Send email with spool in excel attachment

    Hi,
    I have this function:
    CALL FUNCTION 'Z_SEND_EMAIL_SPOOL_PDF'
           EXPORTING
                application = 'EMAIL'
                emailtitle  = texttitle
                recextnam   = email
                src_spoolid = tsp01-rqident
           TABLES
                texttab     = body.
    And code:
    FUNCTION z_send_email_spool_pdf .
    *"*"Interfase local
    *"  IMPORTING
    *"     REFERENCE(APPLICATION) LIKE  SOOD1-OBJNAM DEFAULT 'EMAIL'
    *"     REFERENCE(EMAILTITLE) LIKE  SOOD1-OBJDES
    *"     VALUE(RECEXTNAM) LIKE  SOOS1-RECEXTNAM
    *"     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *"  TABLES
    *"      TEXTTAB STRUCTURE  SOLI
    *- local data declaration
      DATA: ohd    LIKE sood1,
            oid    LIKE soodk,
            to_all LIKE sonv-flag,
            okey   LIKE swotobjid-objkey.
      DATA: g_document     LIKE sood4,
            g_header_data  LIKE sood2,
            g_authority LIKE sofa-usracc,
            lt_attachments LIKE STANDARD TABLE OF sood5 WITH HEADER LINE,
            l_folder_id    LIKE sofdk,
            l_objcont     LIKE soli OCCURS 0 WITH HEADER LINE,
            i_bin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            l_objhead     LIKE soli OCCURS 0 WITH HEADER LINE,
            folder_id      LIKE soodk,
            object_id      LIKE soodk,
            link_folder_id LIKE soodk,
            hd_dat  LIKE sood1.
      DATA: desired_type  LIKE sood-objtp,
            real_type LIKE sood-objtp,
            attach_type LIKE sood-objtp,
            otf LIKE sood-objtp VALUE 'OTF', " SAPscript Ausgabeformat
            ali LIKE sood-objtp VALUE 'ALI', " ABAP lists
            pdf LIKE sood-objtp VALUE 'PDF', "PDF format
            pbyte TYPE i,
            t_pdf LIKE tline OCCURS 0 WITH HEADER LINE,
            objtype LIKE rststype-type,
            type    LIKE rststype-type.
      CONSTANTS: ou_fol LIKE sofh-folrg              VALUE 'O',
                 c_objtp    LIKE g_document-objtp    VALUE 'RAW',
                 c_file_ext LIKE g_document-file_ext VALUE 'PDF'.
      DATA: BEGIN OF receivers OCCURS 0.
              INCLUDE STRUCTURE soos1.
      DATA: END OF receivers.
    * Fist part: Verify if the spool really exists
      SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
      CHECK sy-subrc = 0.
    *- fill odh
      CLEAR ohd.
      ohd-objla    = sy-langu.
      ohd-objnam   = application.
      ohd-objdes   = emailtitle.
      ohd-objpri   = 3.
      ohd-objsns   = 'F'.
      ohd-ownnam   = sy-uname.
    *- send Email
      CONDENSE recextnam NO-GAPS.
      CHECK recextnam <> space AND recextnam CS '@'.
      CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
           EXPORTING
                authority     = 'SP01'
                client        = tsp01-rqclient
                name          = tsp01-rqo1name
                part          = 1
           IMPORTING
                type          = type
                objtype       = objtype
           EXCEPTIONS
                fb_error      = 1
                fb_rsts_other = 2
                no_object     = 3
                no_permission = 4
                OTHERS        = 5.
      attach_type = c_objtp.
      desired_type = pdf.
      IF objtype(3) = 'OTF'.
        CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
             EXPORTING
                  src_spoolid   = src_spoolid
             IMPORTING
                  pdf_bytecount = pbyte
             TABLES
                  pdf           = t_pdf.
      ELSE.
        CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
             EXPORTING
                  src_spoolid   = src_spoolid
             IMPORTING
                  pdf_bytecount = pbyte
             TABLES
                  pdf           = t_pdf.
      ENDIF.
      PERFORM convertir_tabla_pdf_2 TABLES t_pdf l_objcont.
      CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
           EXPORTING
                owner     = sy-uname
                region    = ou_fol
           IMPORTING
                folder_id = l_folder_id
           EXCEPTIONS
                OTHERS    = 5.
    * fill out informations about the header of the email
      CLEAR: g_document.
      g_document-foltp     = l_folder_id-foltp.
      g_document-folyr     = l_folder_id-folyr.
      g_document-folno     = l_folder_id-folno.
      g_document-objtp     = c_objtp.
      g_document-objdes    = emailtitle.
      g_document-file_ext  = c_file_ext.
      g_header_data-objdes    = emailtitle.
      CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
           EXPORTING
                method      = 'SAVE'
                office_user = sy-uname
           IMPORTING
                authority   = g_authority
           TABLES
                objcont     = texttab
                attachments = lt_attachments
           CHANGING
                document    = g_document
                header_data = g_header_data
           EXCEPTIONS
                OTHERS      = 1.
      object_id-objtp = c_objtp.
      object_id-objyr = g_document-objyr.
      object_id-objno = g_document-objno.
      folder_id-objtp = l_folder_id-foltp.
      folder_id-objyr = l_folder_id-folyr.
      folder_id-objno = l_folder_id-folno.
      link_folder_id-objtp = l_folder_id-foltp.
      link_folder_id-objyr = l_folder_id-folyr.
      link_folder_id-objno = l_folder_id-folno.
      hd_dat-file_ext = pdf.
      hd_dat-objdes = emailtitle.
      CALL FUNCTION 'SO_ATTACHMENT_INSERT'
           EXPORTING
                object_id                  = object_id
                attach_type                = attach_type
                object_hd_change           = hd_dat
                owner                      = sy-uname
           TABLES
                objcont                    = l_objcont
                objhead                    = l_objhead
           EXCEPTIONS
                active_user_not_exist      = 35
                communication_failure      = 71
                object_type_not_exist      = 17
                operation_no_authorization = 21
                owner_not_exist            = 22
                parameter_error            = 23
                substitute_not_active      = 31
                substitute_not_defined     = 32
                system_failure             = 72
                x_error                    = 1000.
    *       FORM SO_OBJECT_SEND_REC                                       *
    FORM  so_object_send_rec
          TABLES  objcont      STRUCTURE soli
                  receivers    STRUCTURE soos1
          USING   object_hd    STRUCTURE sood1
                  folder_id
                  object_id
                  link_folder_id.
      DATA:   oid     LIKE soodk,
              to_all  LIKE sonv-flag,
              okey    LIKE swotobjid-objkey.
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                extern_address             = 'X'
    *            object_hd_change           = object_hd
    *            object_type                = 'RAW'
                outbox_flag                = 'X'
                sender                     = sy-uname
                owner                      = sy-uname
                folder_id                  = folder_id
                object_id                  = object_id
                store_flag                 = 'X'
                link_folder_id             = link_folder_id
           IMPORTING
                object_id_new              = oid
                sent_to_all                = to_all
                office_object_key          = okey
           TABLES
                objcont                    = objcont
                receivers                  = receivers
           EXCEPTIONS
                active_user_not_exist      = 1
                communication_failure      = 2
                component_not_available    = 3
                folder_not_exist           = 4
                folder_no_authorization    = 5
                forwarder_not_exist        = 6
                note_not_exist             = 7
                object_not_exist           = 8
                object_not_sent            = 9
                object_no_authorization    = 10
                object_type_not_exist      = 11
                operation_no_authorization = 12
                owner_not_exist            = 13
                parameter_error            = 14
                substitute_not_active      = 15
                substitute_not_defined     = 16
                system_failure             = 17
                too_much_receivers         = 18
                user_not_exist             = 19
                x_error                    = 20
                OTHERS                     = 21.
      IF sy-subrc <> 0.
        RAISE others.
      ENDIF.
    ENDFORM.
    *       FORM INIT_REC                                                 *
    FORM init_rec TABLES receivers STRUCTURE soos1.
      CLEAR receivers.
      REFRESH receivers.
      MOVE sy-datum  TO receivers-rcdat .
      MOVE sy-uzeit  TO receivers-rctim.
      MOVE '1'       TO receivers-sndpri.
      MOVE 'X'       TO receivers-sndex.
      MOVE 'U-'      TO receivers-recnam.
      MOVE 'U'       TO receivers-recesc.
      MOVE 'INT'     TO receivers-sndart.
      MOVE '5'       TO receivers-sortclass.
      APPEND receivers.
    ENDFORM.
    With this function I can send a spool in pdf format by email. But, now I need send a spool in Excel (xls) format by email. I try to disconnect 'CONVERT_OTFSPOOLJOB_2_PDF' and 'CONVERT_ABAPSPOOLJOB_2_PDF' but doesnt work.
    Can you help me?
    A lot of thanks in advance.
    Best regards.

    Hi.
    I do not think it is feasible to create a worthwhile Excel file from a SAP spool file.
    I have reports that send output as Excel attachments to email, but the code (including function modules etc) is too much to post here.
    You can use OLE to create an Excel file, but this will not generally work when the report is run in the background.
    So my approach is to make the report write an Excel XML file (that's just text after all), and send that as an XLS email attachment.  When the email receiver double-clicks on the attachment, it fires up Excel and brings in the data.  Most users would not realise that it's not a native Excel file.
    One nice touch is to have two sheets in the Excel file, one with the main report and the other with the selection criteria.
    Of course there is a lot of work getting started with this.
    John

  • Airport blocking me from sending email

    In the past email has worked from Mail. but today, our clearwire had an outage in our area this morning. Email was sending fine. Then about 3 hours ago, I couldn't send out email anymore through Mail. Have isolated the problem to our Airport Extreme but don't know how to fix it.
    When connected to directly to the Clearwire modem, email sending is fine.

    Google reads your emails, in case you did not know that. Unless you are sending an email containing content Google can extract and add to its vast database of personal information, Google has no use for it.
    Google Mail is becoming progressively useless. It won't accept .zip attachments, at least not the last time I tried, it will eventually prevent you from using an email client unless you visit their web mail interface, and it will disable your account if you attempt to log in from someplace Google deems is not where Google thinks you ought to be.
    Gmail is worth every cent you paid.
    Get rid of MacKeeper. It is capable of doing nothing beneficial and will only cause problems.

  • TBird will receive gmail but will not send emails with TBird wants new password..

    I can send and receive gmail online OK. I have a problem now that used to work. When I want to email a link to a page or send an email directly from TBird I get and error message. I tried retyping the gmail password but I get the same error message. I tried following some of the instructions on other pages, but I got all tangled up in all the words and examples not matching what is on my TBird
    Please answer in simple English,
    Thanks,
    Bernadine

    have you configured two factor authentication on Google (they send you a text usually with a password)

  • Send email with txt file as attachment

    Hi ,
    can any one help me in download as txt file using the function module SO_OBJECT_SEND along with email .
    a sample code using this function module would be helpfull.
    Thanks,
    vinay .

    Hi vinay,
    Not only TXT file, u can send any
    other file like word,excel,pdf,exe, etc.
    1. There is some trick involved
    in the binary files.
    2. I have made a program (and it works fantastic)
    ONLY 6 LINES FOR EMAILING
    BELIEVE ME
    ITS A FANTASTIC PROGRAM.
    IT WILL WORK LIKE OUTLOOK EXPRESS !
    3. The user is provided with
    a) file name
    b) email address to send mail
    and it sends ANY FILE (.xls,.pdf .xyz..)
    Instantaneously !
    4. Make two things first :
    1. Include with the name : ZAMI_INCLFOR_MAIL
    2. Report with the name : ZAM_TEMP147 (any name will do)
    3. Activate both and execute (2)
    4. After providing filename, email adress
    5. Code for Include :
    10.08.2005 Amit M - Created
    Include For Mail (First Req F16)
    Modification Log
    Data
    DATA: docdata LIKE sodocchgi1,
    objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
    objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
    objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objhex LIKE solix OCCURS 10 WITH HEADER LINE,
    reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    DATA: tab_lines TYPE i,
    doc_size TYPE i,
    att_type LIKE soodk-objtp.
    DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
    FORM
    FORM ml_customize USING objname objdesc.
    Clear Variables
    CLEAR docdata.
    REFRESH objpack.
    CLEAR objpack.
    REFRESH objhead.
    REFRESH objtxt.
    CLEAR objtxt.
    REFRESH objbin.
    CLEAR objbin.
    REFRESH objhex.
    CLEAR objhex.
    REFRESH reclist.
    CLEAR reclist.
    REFRESH listobject.
    CLEAR listobject.
    CLEAR tab_lines.
    CLEAR doc_size.
    CLEAR att_type.
    Set Variables
    docdata-obj_name = objname.
    docdata-obj_descr = objdesc.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addrecp USING preceiver prec_type.
    CLEAR reclist.
    reclist-receiver = preceiver.
    reclist-rec_type = prec_type.
    APPEND reclist.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addtxt USING ptxt.
    CLEAR objtxt.
    objtxt = ptxt.
    APPEND objtxt.
    ENDFORM. "ml_customize
    FORM
    FORM ml_prepare USING bypassmemory whatatt_type whatname.
    IF bypassmemory = ''.
    Fetch List From Memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listobject
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'LIST_FROM_MEMORY'.
    ENDIF.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    COMPRESSED_SIZE =
    TABLES
    in = listobject
    out = objbin
    EXCEPTIONS
    OTHERS = 1
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'TABLE_COMPRESS'.
    ENDIF.
    ENDIF.
    Header Data
    Already Done Thru FM
    Main Text
    Already Done Thru FM
    Packing Info For Text Data
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'TXT'.
    APPEND objpack.
    Packing Info Attachment
    att_type = whatatt_type..
    DESCRIBE TABLE objbin LINES tab_lines.
    READ TABLE objbin INDEX tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = att_type.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = whatname.
    APPEND objpack.
    Receiver List
    Already done thru fm
    ENDFORM. "ml_prepare
    FORM
    FORM ml_dosend.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = docdata
    put_in_outbox = 'X'
    commit_work = 'X' "used from rel. 6.10
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    CONTENTS_HEX = objhex
    OBJECT_PARA =
    object_parb =
    receivers = reclist
    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
    IF sy-subrc <> 0.
    MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
    WITH docdata-obj_name.
    ENDIF.
    ENDFORM. "ml_customize
    FORM
    FORM ml_spooltopdf USING whatspoolid.
    DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
    Call Function
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
    src_spoolid = whatspoolid
    TABLES
    pdf = pdf
    EXCEPTIONS
    err_no_otf_spooljob = 1
    OTHERS = 12.
    Convert
    PERFORM doconv TABLES pdf objbin.
    ENDFORM. "ml_spooltopdf
    FORM
    FORM doconv TABLES
    mypdf STRUCTURE tline
    outbin STRUCTURE solisti1.
    Data
    DATA : pos TYPE i.
    DATA : len TYPE i.
    Loop And Put Data
    LOOP AT mypdf.
    pos = 255 - len.
    IF pos > 134. "length of pdf_table
    pos = 134.
    ENDIF.
    outbin+len = mypdf(pos).
    len = len + pos.
    IF len = 255. "length of out (contents_bin)
    APPEND outbin.
    CLEAR: outbin, len.
    IF pos < 134.
    outbin = mypdf+pos.
    len = 134 - pos.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF len > 0.
    APPEND outbin.
    ENDIF.
    ENDFORM. "doconv
    CODE FOR PROGRAM
    5.
    REPORT zam_temp147 .
    INCLUDE zami_inclfor_mail.
    DATA
    DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA : file_name TYPE string.
    data : path like PCFILE-PATH.
    data : extension(5) type c.
    data : name(100) type c.
    SELECTION SCREEN
    PARAMETERS : receiver TYPE somlreci1-receiver lower case.
    PARAMETERS : p_file LIKE rlgrap-filename
    OBLIGATORY.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CLEAR p_file.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    file_name = p_file.
    START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM ml_customize USING 'Tst' 'Testing'.
    PERFORM ml_addrecp USING receiver 'U'.
    PERFORM upl.
    PERFORM doconv TABLES itab objbin.
    PERFORM ml_prepare USING 'X' extension name.
    PERFORM ml_dosend.
    SUBMIT rsconn01
    WITH mode EQ 'INT'
    AND RETURN.
    FORM
    FORM upl.
    file_name = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = file_name
    filetype = 'BIN'
    TABLES
    data_tab = itab
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    path = file_name.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
    EXPORTING
    complete_filename = path
    CHECK_DOS_FORMAT =
    IMPORTING
    DRIVE =
    EXTENSION = extension
    NAME = name
    NAME_WITH_EXT =
    PATH =
    EXCEPTIONS
    INVALID_DRIVE = 1
    INVALID_EXTENSION = 2
    INVALID_NAME = 3
    INVALID_PATH = 4
    OTHERS = 5
    ENDFORM. "upl
    regards,
    amit m.

  • Send email with spool as PDF attachment using class CL_BCS

    Hi,
    I am converting a spool to PDF using the function module CONVERT_OTFSPOOLJOB_2_PDF. The spool contains graphic images etc just like a script output.
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid                    = v_rqident
            no_dialog                      = 'X'
          IMPORTING
            pdf_bytecount                  = numbytes
            pdf_spoolid                    = pdfspoolid
          TABLES
            pdf                            = pdf
          EXCEPTIONS
            err_no_otf_spooljob            = 1
            err_no_spooljob                = 2
            err_no_permission              = 3
            err_conv_not_possible          = 4
            err_bad_dstdevice              = 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.
    After this I want to attach the pdf as an attachment to an email and send it. For this purpose I am using the code found in the example BCS_EXAMPLE_5.
    CALL METHOD document->add_attachment
            EXPORTING
              i_attachment_type    = 'PDF'
              i_attachment_subject = 'My attachment'
              i_att_content_hex    = binary_content.
    How do I convert the script text into binary content, could you please suggest some help.

    Old code, but I use:
      DATA: lt_pdf           TYPE soli_tab,
            lt_pdfbin        TYPE solix_tab.
    * Convert the lines
      CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
        EXPORTING
          line_width_src              = 134
          line_width_dst              = 255
          transfer_bin                = 'X'
        TABLES
          content_in                  = i_pdf
          content_out                 = lt_pdf
        EXCEPTIONS
          err_line_width_src_too_long = 1
          err_line_width_dst_too_long = 2
          err_conv_failed             = 3
          OTHERS                      = 4.
      IF sy-subrc NE 0.
        RAISE convert_error.
      ENDIF.
      lt_pdfbin = lt_pdf.
    Also, keep in mid that that OTF convert function has a 99 page limit - if you can potentially reach that limit, you need to handle the background job process and retrieval of the RAW data from the spool.

  • Need to send email with excel sheet as attachment: URGENT

    Hi all....i have a requirement where i should extract data from SAP. These datas has to be sent to a mail id entered in the selection screen in excel sheet as an attachment.Can you suggest me any function module that meets the requirement...
    For kind information...there is only one selection field for entering the mail id.
    Thanks in advance
    Nanda

    Hi all....i have a requirement where i should extract data from SAP. These datas has to be sent to a mail id entered in the selection screen in excel sheet as an attachment.Can you suggest me any function module that meets the requirement...
    For kind information...there is only one selection field for entering the mail id.
    Thanks in advance
    Nanda

Maybe you are looking for