Sending an email with attachment with method SENDTASKDESCRIPTION.

Hi everyone sorry for my english_;
in custom workflow I set a Send Mail's step.
If i try to send an email without attachments with method SENDTASKDESCRIPTION, the function SWW_SRV_MAIL_SEND return sy-subrc eq 0 and the email wa sent.
If I try to attach a text, change binding for the step
ATTACHOBJECTS -> &ATTACHMENTS& the step have an error in method SENDTASKDESCRIPTION execute the function SWW_SRV_MAIL_SEND; this function return an exception that had not defined.
Thank's a lot.

Hello.
Take into acount that the attacment tha you pass to method has to be type of business object SOFM. The attachment is correctly created in the workflow container? Review the creation of the object to attach.
How do you created the attachment?
Regards.

Similar Messages

  • XI Mail Adapter: sending emails with attachment with help of java mapping

    Hi ,
    On trying out the scenerio mentioned in the blog, using the java mapping provided
    "XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    The scenerio works just fine.
    But the payload as the content of the attachment is not getting generated in proper XML format.
    I suppose it's because of the replace special characters code part..
    Can anyone help me state the modification required in the code.
    Thanks!
    Regards,
    Faria Mithani

    It might be a codepage issue. Is your original payload UTF-8?

  • Convert XSTRING to PDF Format and Send it as an attachment with work-item

    I have an Adobe Form data available in the ECC system in XSTRING format. In one of my ABAP methods (used by a custom workflow task), i want to convert the XSTRING data in PDF format and send it as an attachment with a work-item. How best can this be done?
    Appreciate any ideas,
    Saurabh

    Hi Saurabh,
    if u want to download pdf which is in xstring format to u r local system
    u can try the following code.
    data: data_tab type table of x255.
    call function 'SCMS_XSTRING_TO_BINARY'
    exporting
    buffer = XString data
    tables
    binary_tab = data_tab.
    cl_gui_frontend_services=>gui_download(
    exporting
    filename = filename
    filetype = 'BIN'
    changing
    data_tab = data_tab ).
    cl_gui_frontend_services=>execute(
    exporting
    document = filename ).
    Regards,
    Chandru

  • I tried to send an email and attach a photo and color wheel has been spinning forever

    I tried to send an email and attach a photo and color wheel has been spinning forever. Clearly it is still trying to send the message and it's been 45 minutes. I can't use my mail anymore.

    First off, did you check your internet conection? Your network connection might not be very strong. Try powering your device and turning it on again, see if that works.

  • Want to Send smartform as pdf attachment with a Email to some mail id

    Hi ,
    I want to send a smartform as a PDF attachment with a mail to a mail id. And I can send a mail with the PDF attachment.
    But I am not able to open the PDF. It is throwing some error (Adobe reader could not open u2018fileu2019 because it is either not a supported file type or because the file has been damaged (for example , it was sent as an email attachment and was not correctly decoded)).
    By debugging I come to know that the file which is generating is in some encoding format.
    Please help me regard this. This is very urgent.
    here is the code,
    Main Program :
    REPORT Ztest_report.
    *--Top Include for Global Data Declarations.
    INCLUDE ztest_report_top.
    *--Form Include for Form Routines.
    INCLUDE ztest_report_form.
    START-OF-SELECTION.
    START-OF-SELECTION.
    *--Display data
      Perform display_data.
    END-OF-SELECTION.
    Top declaration :
    Internal table
    DATA :  i_otfdata TYPE tsfotf,          " Smart Forms: Table OTF
            i_tline TYPE TABLE OF tline WITH HEADER LINE,
            i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
            i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    Objects to send mail.
            i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    Work Area declarations
            w_mailaddr TYPE ppfdmailad,
            w_mailtype TYPE so_escape,
            w_mailrecipient TYPE swotobjid,
            w_control TYPE ssfctrlop,
            w_compop TYPE ssfcompop,
            w_return TYPE ssfcrescl,
            wa_doc_chng TYPE sodocchgi1,
            w_data TYPE sodocchgi1,
            wa_buffer TYPE string, "To convert from 132 to 255
            wa_objhead TYPE soli_tab,
    Variables declarations
            v_form_name TYPE rs38l_fnam,
            v_len_in LIKE sood-objlen,
            v_len_out LIKE sood-objlen,
            v_len_outn TYPE i,
            v_lines_txt TYPE i,
            v_lines_bin TYPE i.
    Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-009.
    PARAMETER:      p_bukrs TYPE bukrs OBLIGATORY,            "Company Code
                    p_belnr TYPE belnr_d OBLIGATORY,          "Document No
                    p_gjahr TYPE gjahr OBLIGATORY,            "document type
                    p_mailid(50) TYPE c OBLIGATORY.
    "Mail Id
    SELECTION-SCREEN END OF BLOCK blk1.
    Form Logic :
    FORM display_data.
    *Local Variable declaration
      DATA: lc_fm TYPE rs38l_fnam,       "local variable to store the
            l_i_document_output_info TYPE ssfcrespd,
            l_i_struc_job_output_info TYPE ssfcrescl,
            l_i_struc_job_output_options TYPE ssfcrescl,
            i_lines TYPE TABLE OF tline WITH HEADER LINE,
            lv_job_output_info      TYPE ssfcrescl,
            lv_document_output_info TYPE ssfcrespd,
            lv_job_output_options   TYPE ssfcresop,
            lv_bin_filesize         LIKE sood-objlen.
    Determine the smartform name
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
           EXPORTING
                formname           = 'ZTEST_SMARTFORM'
           IMPORTING
                fm_name            = lc_fm
           EXCEPTIONS
                no_form            = 1
                no_function_module = 2
                OTHERS             = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      w_control-getotf = 'X'.
      w_control-no_dialog = 'X'.
      w_control-preview = space.
    w_control-device = 'MAIL'.
    Call the smartform and pass the selection screen parameter
      CALL FUNCTION lc_fm
           EXPORTING
                control_parameters = w_control
                output_options     = w_compop
                user_settings      = 'X'
                t_bukrs            = p_bukrs
                t_belnr            = p_belnr
                t_gjahr            = p_gjahr
           IMPORTING
                job_output_info    = l_i_struc_job_output_info
           EXCEPTIONS
                formatting_error   = 1
                internal_error     = 2
                send_error         = 3
                user_canceled      = 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.
    Moving the Smart Forms: Table OTF into an internal table
      i_otfdata[] = l_i_struc_job_output_info-otfdata[].
    CONVERT TO OTF TO PDF.
      CALL FUNCTION 'CONVERT_OTF'
           EXPORTING
                format                = 'PDF'
                max_linewidth         = 132
           IMPORTING
                bin_filesize          = lv_bin_filesize
           TABLES
                otf                   = i_otfdata
                lines                 = i_lines
           EXCEPTIONS
                err_max_linewidth     = 1
                err_format            = 2
                err_conv_not_possible = 3
                err_bad_otf           = 4
                OTHERS                = 5.
    IF sy-batch EQ l_c_no.
    To directly view the print-preview in PDF format
      CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
           EXPORTING
                i_otf                    = i_otfdata
           EXCEPTIONS
                convert_otf_to_pdf_error = 1
                cntl_error               = 2
                OTHERS                   = 3.
    For Sending the PDF file to a Mail ID.
    LOOP AT i_lines.
       TRANSLATE i_lines USING '~'.
       CONCATENATE wa_buffer i_lines INTO wa_buffer.
    ENDLOOP.
    TRANSLATE wa_buffer USING '~'.
    DO.
       i_record = wa_buffer.
       APPEND i_record.
       SHIFT wa_buffer LEFT BY 255 PLACES.
       IF wa_buffer IS INITIAL.
         EXIT.
       ENDIF.
    ENDDO.
      DATA: BEGIN OF zlines OCCURS 0,
      tline TYPE char255,
      END OF zlines.
    *Change the PDF format from 132 to 255.
      CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
           EXPORTING
                transfer_bin                = 'X'
           TABLES
                content_in                  = i_lines
                content_out                 = zlines
           EXCEPTIONS
                err_line_width_src_too_long = 1
                err_line_width_dst_too_long = 2
                err_conv_failed             = 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.
    Attachment
      REFRESH: i_reclist,
      i_objtxt,
      i_objbin,
      i_objpack.
      CLEAR wa_objhead.
      i_objbin[] = zlines[].
    Create Message Body Title and Description
      i_objtxt = 'test with pdf-Attachment!'.
      APPEND i_objtxt.
      DESCRIBE TABLE i_objtxt LINES v_lines_txt.
      READ TABLE i_objtxt INDEX v_lines_txt.
      wa_doc_chng-obj_name = 'smartform'.
      wa_doc_chng-expiry_dat = sy-datum + 10.
      wa_doc_chng-obj_descr = 'smartform'.
      wa_doc_chng-sensitivty = 'F'.
      wa_doc_chng-doc_size = v_lines_txt * 255.
    Main Text
      CLEAR i_objpack-transf_bin.
      i_objpack-head_start = 1.
      i_objpack-head_num = 1.
      i_objpack-body_start = 2.
      i_objpack-body_num = v_lines_txt.
      i_objpack-doc_type = 'RAW'.
      APPEND i_objpack.
    Attachment (pdf-Attachment)
      i_objpack-transf_bin = 'X'.
      i_objpack-head_start = 1.
      i_objpack-head_num = 1.
      i_objpack-body_start = 2.
    I_OBJPACK-DOC_TYPE = 'RAW'.
      DESCRIBE TABLE i_objbin LINES v_lines_bin.
      READ TABLE i_objbin INDEX v_lines_bin.
      i_objpack-doc_size = v_lines_bin * 255 .
      i_objpack-body_num = v_lines_bin.
      i_objpack-doc_type = 'PDF'.
      i_objpack-obj_name = 'smart'.
      i_objpack-obj_descr = 'test'.
      APPEND i_objpack.
      CLEAR i_reclist.
      i_reclist-receiver = p_mailid.
      i_reclist-rec_type = 'U'.
      APPEND i_reclist.
    Send new document with attachments via RFC
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                document_data              = wa_doc_chng
                put_in_outbox              = 'X'
                commit_work                = 'X'
           TABLES
                packing_list               = i_objpack
                object_header              = wa_objhead
                contents_bin               = i_objbin
                contents_txt               = i_objtxt
                receivers                  = i_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.
        WRITE:/ 'Error When Sending the File', sy-subrc.
      ELSE.
        WRITE:/ 'Mail sent'.
      ENDIF.
    ENDFORM.                    " display_data

    hi,
    i wrote a programm.for me it is working.i think it will help for u.
    DATA: t_otfdata TYPE ssfcrescl,
          t_lines LIKE tline OCCURS 0 WITH HEADER LINE,
          t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
          t_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    Objects to send mail.
    DATA:T_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
         T_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
         T_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
         T_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE.
    DATA: w_filesize TYPE i,
          w_bin_filesize TYPE i,
          wa_ctrlop TYPE ssfctrlop,
          wa_outopt TYPE ssfcompop,
          WA_BUFFER TYPE STRING,          "To convert from 132 to 255
          WA_OBJHEAD TYPE SOLI_TAB,
          WA_DOC_CHNG TYPE SODOCCHGI1,
          W_DATA TYPE SODOCCHGI1.
    DATA: form_name TYPE rs38l_fnam,
          V_LINES_TXT TYPE I,
          V_LINES_BIN TYPE I,
          nast-spras type sy-langu value 'DE'.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = 'ZSR_DEMO1'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
    IMPORTING
       FM_NAME                  = form_name
    EXCEPTIONS
       NO_FORM                  = 1
       NO_FUNCTION_MODULE       = 2
       OTHERS                   = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    wa_ctrlop-LANGU = nast-spras.
    wa_ctrlop-getotf = 'X'.
    wa_ctrlop-no_dialog = 'X'.
    wa_outopt-tdnoprev = 'X'.
    CALL FUNCTION form_name
      EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = wa_ctrlop
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
       OUTPUT_OPTIONS             = wa_outopt
       USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
       JOB_OUTPUT_INFO            = t_otfdata
      JOB_OUTPUT_OPTIONS         =
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 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.
    t_otf[] = t_otfdata-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = 'PDF'
       MAX_LINEWIDTH               = 132
      ARCHIVE_INDEX               = ' '
      COPYNUMBER                  = 0
      ASCII_BIDI_VIS2LOG          = ' '
      PDF_DELETE_OTFTAB           = ' '
    IMPORTING
       BIN_FILESIZE                = w_bin_filesize
      BIN_FILE                    =
      TABLES
        OTF                         = t_otf
        LINES                       = t_lines
    EXCEPTIONS
       ERR_MAX_LINEWIDTH           = 1
       ERR_FORMAT                  = 2
       ERR_CONV_NOT_POSSIBLE       = 3
       ERR_BAD_OTF                 = 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.
    loop at t_lines.
    TRANSLATE t_lines USING '~'.
      CONCATENATE WA_BUFFER T_LINES INTO WA_BUFFER.
    ENDLOOP.
    TRANSLATE WA_BUFFER USING '~'.
    DO.
      t_RECORD = WA_BUFFER.
      APPEND t_RECORD.
      SHIFT WA_BUFFER LEFT BY 255 PLACES.
      IF WA_BUFFER IS INITIAL.
        EXIT.
      ENDIF.
    ENDDO.
    Attachment
    REFRESH: T_RECLIST,
    T_OBJTXT,
    T_OBJBIN,
    T_OBJPACK.
    CLEAR WA_OBJHEAD.
    T_OBJBIN[] = T_RECORD[].
    Create Message Body Title and Description
    T_OBJTXT = 'test with pdf-Attachment!'.
    APPEND T_OBJTXT.
    DESCRIBE TABLE T_OBJTXT LINES V_LINES_TXT.
    READ TABLE T_OBJTXT INDEX V_LINES_TXT.
    WA_DOC_CHNG-OBJ_NAME = 'smartform'.
    WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
    WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
    WA_DOC_CHNG-SENSITIVTY = 'F'.
    WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
    Main Text
    CLEAR T_OBJPACK-TRANSF_BIN.
    T_OBJPACK-HEAD_START = 1.
    T_OBJPACK-HEAD_NUM = 0.
    T_OBJPACK-BODY_START = 1.
    T_OBJPACK-BODY_NUM = V_LINES_TXT.
    T_OBJPACK-DOC_TYPE = 'RAW'.
    APPEND T_OBJPACK.
    Attachment (pdf-Attachment)
    T_OBJPACK-TRANSF_BIN = 'X'.
    T_OBJPACK-HEAD_START = 1.
    T_OBJPACK-HEAD_NUM = 0.
    T_OBJPACK-BODY_START = 1.
    DESCRIBE TABLE T_OBJBIN LINES V_LINES_BIN.
    READ TABLE T_OBJBIN INDEX V_LINES_BIN.
    T_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
    T_OBJPACK-BODY_NUM = V_LINES_BIN.
    T_OBJPACK-DOC_TYPE = 'PDF'.
    T_OBJPACK-OBJ_NAME = 'smart'.
    T_OBJPACK-OBJ_DESCR = 'test'.
    APPEND T_OBJPACK.
    CLEAR T_RECLIST.
    T_RECLIST-RECEIVER = 'mail id'.
    T_RECLIST-REC_TYPE = 'U'.
    APPEND T_RECLIST.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        DOCUMENT_DATA              = WA_DOC_CHNG
        PUT_IN_OUTBOX              = 'X'
        COMMIT_WORK                = 'X'
      TABLES
        PACKING_LIST               = T_OBJPACK
        OBJECT_HEADER              = WA_OBJHEAD
        CONTENTS_BIN               = T_OBJBIN
        CONTENTS_TXT               = T_OBJTXT
        RECEIVERS                  = T_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.
      WRITE:/ 'Error When Sending the File', SY-SUBRC.
    ELSE.
      WRITE:/ 'Mail sent'.
    ENDIF.
    please reward me if helpful.

  • How to send an Email Message along with a PO PDF Attachment in Word.

    I want to send an Email to a customer. The subject of the email is the PDF attachment of the Purchase order.
    Then in the Body of the email, we need to put a small Mesasge in the Body of the Email: Example
    Hello,
    Please see attached Purchase Order.
    thank you...
    Does anyone have a suggestion on how to do this? Best approach?
    thanks
    Walter Poe

    Hi Walter,
    In NACE transaction, select Application EF , then select your P.O Message ( standard is NEU ) .
    Then in "processing routing" parts check that there is an entry for medium 5 ( external send ) , if not please set it with corresponding print program, from routine and forms to use .
    Then in "Mail Title and Text" parts  you can define your mail title with variable and your mail body . Please find below a sample for this. To define the mail body just click on the icon for text ( it's like sapscript text ).
    Mail Title : "Your P.O &EKKO-EBELN"
    Mail Body : "Please find enclosed our P.O &EKKO-EBELN....."
    That's all for NACE parts.
    After this you have to define thru condition that the medium will be used for each P.O. For this check with functionnal consultant if everything is ok and the same that for medium 1.
    Then when you create a P.O, SAP will generate a mail with supplier e-mail adress define in his masterdata . The forms will be converted according to your customizing in transaction SCOT ( node SMTP , Support address type parts) .
    Of course you also have to define a job for sending the mail .
    Hope this help you
    Regards
    Bertrand

  • Sending an E-mail with attachment with PHP from Flex

    Hey,
    I've made a custom compontent wich mails your own drawings to you. But I have a problem to send an e-mail with attachment.
    I use the HttpService to send the data to the php-file, but I always get the Fault message (form phpFault()).
    This is my code in Flex:
    <mx:Script>
        <![CDATA[
            import mx.rpc.events.FaultEvent;
            import mx.rpc.events.ResultEvent;
            import mx.graphics.codec.PNGEncoder;
            import mx.events.ValidationResultEvent;
            import mx.controls.Alert;
            [Bindable]
            private var byteArray:ByteArray;
            private function mailImage(comp:DisplayObject):void
                var emailValidation:ValidationResultEvent = validEmail.validate();
                if(emailValidation.type == ValidationResultEvent.INVALID)
                    Alert.show("Invalid E-mail");
                else
                    var bitmapData:BitmapData = new BitmapData(comp.width, comp.height);
                    bitmapData.draw(comp);
                    var png:PNGEncoder = new PNGEncoder();
                    byteArray = png.encode(bitmapData);
                    httpMail.send();
            private function phpResult(evt:ResultEvent):void
                Alert.show("You've got mail.");
            private function phpFault(evt:FaultEvent):void
                Alert.show("Something went wrong. /n" + evt.message.toString());
        ]]>
    </mx:Script>
    <mx:EmailValidator id="validEmail" source="{ipEmail}" property="text"/>
    <mx:HTTPService id="httpMail" url="php/byte-receiver.php" method="POST" result="phpResult(event)" fault="phpFault(event)">
        <mx:request>
            <img>{byteArray}</img>
            <mail>{ipEmail.text}</mail>
        </mx:request>
    </mx:HTTPService>
    <mx:Label text="draw your own image" styleName="h1" x="10" y="0" width="493" height="60"/>
    <mx:Canvas
        id="drawCanvas"
        x="10" y="77"
        width="561" height="245"
        borderStyle="solid" borderColor="#A6A6A6">
    </mx:Canvas>
    <mx:Label x="10" y="329" text="Your e-mail:" styleName="text"/>
    <mx:TextInput
        id="ipEmail"
        x="86" y="324" width="417"/>   
    <mx:Label
        id="lblMailImage"
        x="10" y="383"
        text="Mail my image"
        click="mailImage(drawCanvas)"
        mouseOver="lblMailImage.setStyle('color',  '#00067b')"
        mouseOut="lblMailImage.setStyle('color',  '#717171')"
        styleName="button"/>
    </mx:Canvas>
    This is my PHP code
    <?php                 
    $fileatt_type = "application/octet-stream"; // File Type
    $fileatt_name = "ImgContact.png"; // Filename that will be used for the file as the attachment
    $email_from = "[email protected]"; //Who the email is from
    $email_subject = "Contact Winckelmans.net"; // The Subject of the email
    $email_message = "Mail send by winckelmans.net. Your drawing is in the attachment"; // Message that the email has in it
    $email_to = $_POST['mail']; // Who the email is too
    $headers = "From: $email_from";  
    $data= $_POST['img'];
    $semi_rand = md5(time());  
    $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";  
    $headers .= "\nMIME-Version: 1.0\n" .  
                "Content-Type: multipart/mixed;\n" .  
                " boundary=\"{$mime_boundary}\"";  
    $email_message = "This is a multi-part message in MIME format.\n\n" .  
                    "--{$mime_boundary}\n" .  
                    "Content-Type:text/html; charset=\"iso-8859-1\"\n" .  
                   "Content-Transfer-Encoding: 7bit\n\n" .  
    $email_message . "\n\n";  
    $email_message .= "--{$mime_boundary}\n" .  
                      "Content-Type: {$fileatt_type};\n" .  
                      " name=\"{$fileatt_name}\"\n" .  
                      //"Content-Disposition: attachment;\n" .
                      //" filename=\"{$fileatt_name}\"\n" .
                      "Content-Transfer-Encoding: base64\n\n" .  
                     $data . "\n\n" .  
                      "--{$mime_boundary}--\n";  
    $mailsend = mail($email_to, $email_subject, $email_message, $headers);  
    echo $mailsend;
    ?>
    This is the error I get in an Alert:
    (mx.messaging.messages::ErrorMessage)#0
      body = ""
      clientId = "DirectHTTPChannel0"
      correlationId = "F3C16CE1-65CF-E690-1907-D28293FD6BB9"
      destination = ""
      extendedData = (null)
      faultCode = "Server.Error.Request"
      faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: php/byte-receiver.php"]. URL: php/byte-receiver.php"
      faultString = "HTTP request error"
      headers = (Object)#1
        DSStatusCode = 0
      messageId = "7A1DCDBE-0358-7E39-3AF8-D282945A7748"
      rootCause = (flash.events::IOErrorEvent)#2
        bubbles = false
        cancelable = false
        currentTarget = (flash.net::URLLoader)#3
          bytesLoaded = 0
          bytesTotal = 0
          data = ""
          dataFormat = "text"
        eventPhase = 2
        target = (flash.net::URLLoader)#3
        text = "Error #2032: Stream Error. URL: php/byte-receiver.php"
        type = "ioError"
      timestamp = 0
      timeToLive = 0
    Thanks in advance
    Vincent

    Hi
    I'm having the same issue, except my application actually sends the email but the attachment is 0 octet and it doesn't even give me an error... Any chance you found a solution for this and could share it ?
    Thanks

  • HT1338 When I email an attachment with "Always Sent Windows-Friendly Attachments" checked, the result is a picture embedded in the body of the email, not a attachment.  What am I doing wrong.

    When I email an attachment (a .jpg file) with "Always Send Windows-Friendly Attachments" checked, the result is a picture embedded in the body of the email, not a attachment.  What am I doing wrong.

    1. "Always Send Windows-Friendly Attachments" has nothing to do with the display of attachments on either your machine or other ones. It's an esoteric setting that strips the resource fork from Mac files (that might have them) which could apper as a duplicate file on the Windows machine.
    2. Send Plain Text emails. Then it will always be received as an attachment.

  • Not able to send yahoo emails through 'Mail' with attachments size 5 MB or more.

    Hi all,
    I am not able sent mails though 'MAIL' with attachment size more than 5Mb or more. I am using macbook pro and 10.8.3 OS X. Can anyone tell me how we can sent mails with resonable size? pls note that I want to send mails with actual size.
    I am using yahoo for sending mails.
    Regards,
    Amit

    All email service providers have a size limit on sending an email.  See the following link for info on yahoo mail's file size restrictions, and ensure you are within this restriction.
    - http://answers.yahoo.com/question/index?qid=20100326083940AAQgBa5.

  • Sending an email using C++ with Add instead of AddBydisplayName

    Hi, I've been trying to send an email from my application using the
    GroupWise Object API, but I haven't been able to suceed. It only works
    when the destinatary mail is already in my contacts. So to fix this, I
    changed the code where they had:
    // Name to be resolved
    bstrName = SysAllocString(TO_OLE_STRING(szTo));
    // Add the name(s) to be resolved
    pIGWRecipients->AddByDisplayName(bstrName, vTargetType, &pDIGWRecipient);
    to:
    // Specify the class of message we are sending
    bstrClass = SysAllocString(OLESTR("GW.MESSAGE.MAIL"));
    VariantInit(&vClass);
    VariantInit(&vType);
    VariantInit(&vVersion);
    // Set class and type to empty
    V_VT(&vClass) = VT_BSTR;
    V_VT(&vType) = VT_I4;
    V_VT(&vVersion) = VT_EMPTY;
    V_BSTR(&vClass) = bstrClass;
    V_I4(&vType) = egwDraft;
    // This is where we get the Message Object to work with
    pIGWMessages->Add(vClass, vType, vVersion, &pDIGWMessage);
    I've been trying to work this around, and I haven't been able to. I can't
    work with vb, it has to be C++, so that is a restriction
    Thanks in advance
    Andres Rangel
    System Engineer
    Elctrical Engineer

    Sorry to all.
    I made a mistake in the from email address.
    Instead of gmail.com i had given gmail,com
    I am really sorry about it.

  • Send Invoice as PDF Attachment with variable Filename

    Hello!
    We got a requirement from one customer. We should send our invoices as PDF-Attachment via E-Mail but the attachment must have a variable filename. At the Moment we can send invoice as PDF-Attachment but only with a fix filename.
    How can we change the filename in our Adobe Forms?
    Best Regards
    Markus

    Hi Florian!
    Answer 1:
        The original Name is Druckdaten.pdf
    Answer 2:
         Our entry in NAST-NACHA = 1
    Answer 3:
         I can implement some ABAP-Code
    Here some Screenshots:
    Configuration  of printer E-MAIL:
    Best regards
    Markus

  • Problem while sending the *.txt as attachment  with mail

    Hi All,
    I am Using  function module (SO_NEW_DOCUMENT_ATT_SEND_API1) to send Mail with attachment in *.TXT format. But This function module is allowing only 255 char for a row. But the length of my Internal table is 700 char. Is there any another way to process the attachment without disturbing the data,that means need to process all 700 char in the field with out splitting.

    no other way and use mutilple lines as text ( This is possible )
    you want to keep text as multiple lines into internal table use FM
    SWA_STRING_SPLIT - Pass text and maintain length as 255 Charcters

  • Send the email to myself with 4 pictures for more than 100 times --- i didn't do this

    one of my colleages send an email to [email protected], and cc the email to me.
    and my blackberry send the email with 4 pictures in my camera folder to me and joegmail.com for more than 50 times a day.
    Why does it happen? and what should i do for that. please help.

    one of my colleages send an email to [email protected], and cc the email to me.
    and my blackberry send the email with 4 pictures in my camera folder to me and joegmail.com for more than 50 times a day.
    Why does it happen? and what should i do for that. please help.

  • Sending external email from SAP with following requirements...

    Hi All,
           I need to send external emails from SAP by meeting following requirements.
    1) With subject line more than 100 characters.
    2) No attachments, only body which has specific format (blueprint/layout) and would be amended often, hence code shouldn't be touched during amendments.
    3) Should be able to know the success/failure of mail sending at program level.

    Hi,
    The code below demonstrates how to send an email to an external email address
    *& Report  ZSENDEMAIL                                                  *
    *& Example of sending external email via SAPCONNECT                    *
    REPORT  zsendemail                    .
    PARAMETERS: psubject(40) type c default  'Hello',
                p_email(40)   type c default '[email protected]' .
    data:   it_packing_list like sopcklsti1 occurs 0 with header line,
            it_contents like solisti1 occurs 0 with header line,
            it_receivers like somlreci1 occurs 0 with header line,
            it_attachment like solisti1 occurs 0 with header line,
            gd_cnt type i,
            gd_sent_all(1) type c,
            gd_doc_data like sodocchgi1,
            gd_error type sy-subrc.
    data:   it_message type standard table of SOLISTI1 initial size 0
                    with header line.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Perform populate_message_table.
    *Send email message, although is not sent from SAP until mail send
    *program has been executed(rsconn01)
    PERFORM send_email_message.
    *Instructs mail send program for SAPCONNECT to send email(rsconn01)
    perform initiate_mail_execute_program.
    *&      Form  POPULATE_MESSAGE_TABLE
          Adds text to email text table
    form populate_message_table.
      Append 'Email line 1' to it_message.
      Append 'Email line 2' to it_message.
      Append 'Email line 3' to it_message.
      Append 'Email line 4' to it_message.
    endform.                    " POPULATE_MESSAGE_TABLE
    *&      Form  SEND_EMAIL_MESSAGE
          Send email message
    form send_email_message.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name  = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    Describe the body of the message
      clear it_packing_list.
      refresh it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      describe table it_message lines it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      append it_packing_list.
    Add the recipients email address
      clear it_receivers.
      refresh it_receivers.
      it_receivers-receiver = p_email.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      append it_receivers.
    Call the FM to post the message to SAPMAIL
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = gd_doc_data
                put_in_outbox              = 'X'
           importing
                sent_to_all                = gd_sent_all
           tables
                packing_list               = it_packing_list
                contents_txt               = it_message
                receivers                  = it_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.
    Store function module return code
      gd_error = sy-subrc.
    Get it_receivers return code
      loop at it_receivers.
      endloop.
    endform.                    " SEND_EMAIL_MESSAGE
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    form initiate_mail_execute_program.
      wait up to 2 seconds.
      if gd_error eq 0.
          submit rsconn01 with mode = 'INT'
                        with output = 'X'
                        and return.
      endif.
    endform.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • How to send an email without attaching the form or the form data?

    I'm creating a form that will have an email button to send an allert that the form was filled out. So far I got it to work based on another example on this forum, but it is attaching the file to the email. I don't want that, all I need is to send an email with a predefined Subject line. Here is the test form I'm trying to tweek:
    http://dl.dropbox.com/u/5098048/Forum.pdf
    Thanks a lot!

    Hi,
    you can find documentation for Designer under this website
    http://help.adobe.com/en_US/livecycle/10.0/documentation.html#task=4,5&module=2
    In Designer you can use the JavaScript API of Acrobat.
    So the Devnet for Acrobat is also a good source.
    http://www.adobe.com/devnet/acrobat.html
    http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf

Maybe you are looking for

  • How do you use Time Machine to reinstall Safari 4.05?

    I have Time Machine with back ups, but don't know how to make it reinstall just Safari> I can't revert my entire hard drive back a few days. Too much work would be lost. Help please if someone knows how to do this!! I need step by step directions! Th

  • Printing to pdf from arcmap

    When I print to pdf from ArcMap the file save as a pdf on my computer, but if I try to view the files from another computer on the network the files show up as .tmp files.  Any suggestions? Is this an adobe issue or an arcmap issue? Thanks, Sam

  • Upload Image Problem

    Hello, We want to print an image on a SAP script, this SAPscript is a bespoke (Z) script We are trying to upload an image dynamically (is image of a product, so differs on each call).  We have successfully achieved this using PERFORM import_bitmap_bd

  • Nokia C3 - unable to delete call log and some mess...

    Hi, I wonder if you can help me, I have tried to delete my call log from my phone however I get an "invalid selection" error message.  The logs do not have any time and date next to the names and I am unable to delete.  Also I have tried to delete so

  • Firefox won't delete cookies even after set to clear cookies on firefox exit

    I have use custom settings for remembering history in firefox. I set to clear history on firefox close. Under this settings, I set to clear cookies, active login and cache. But whenever firefox exits it doesn't remove cookies. Also, I set to keep coo