Sending a mail at regular intervals

Hi everyone,
I need to develop an Auto Responder application where we have to send emails or news letters to our clients(customers) automatically at regular intervals(i.e., for every specific no. of days). I request you to help me in this matter so that my application can send mails automatically without any manual involvement.

I don't know what level of detail you need, but I'll toss the thread scheduler at you...
The java.util.concurrent.ScheduleExecutorService (returned by Executors) has a method called scheduleAtFixedRate. Given that your email code is in (or called from) a "Runnable", you can pass that Runnable object to scheduleAtFixedRate and the thread scheduler will run it for you ever x-number-of-seconds automatically.
It's just one piece of the puzzle, but maybe it'll help.

Similar Messages

  • I have problem on receiving my incoming mails with regular intervals but outgoing is perfect

    mails are coming but all of sudden it get stop and there is no alert or message related to errors, after few hours it used to come and then get stop.

    What is the interval you're checking for new mail?

  • Sending mails automatically at regular intervals

    Hello everyone,
    We have to create Auto Responder application where we need to send mails automatically to customers(clients) at regular intervals. we need to send these mails automatically without any manual involvement.Wat we know is just the client's email and once we get the clients mail,our application should be able to send these mails at regular periodic intervals. Plz help me out in arriving at a solution for this problem.

    I'm loathe to respond to a thread about what could very well be spamming software. You posted this question in multiple forums, which doesn't help the case any. In any case, you received responses pointing you in the right direction in the other forums. Please do not abuse our forums and waste our time by posting the same question in multiple forums.
    -Ian Evans

  • How to send a mail automatically at regular intervals

    Hello everyone,
    I need to develop an Auto Responder application where we have to send mails to customers automatically at regular intervals. I had no idea on the concept of sending mails automatically at certain time intervals. So, i request you to help me in this regard and solve my problem.

    Hi,
    its very simple, U can use Java mail or other api for sending mail,
    Use Timer and TimerTask for sending at regular intervals
    public SendMail extends TimerTask
    // other initializations
    public void run()
    // Send mail code
    public class MailExample
    // Half an Hour , every half an hour it runs the job
    static final int INTERVAL=1000*60*30;
    // Before running job wait 1 minute
    static final int WAIT=1000*60;
    public static void main(String args[])
    TimerTask sendMail=new SendMail();
    Timer mail=new Timer();
    mail. schedule(sendMail,WAIT,INTERVAL);
    if any help needed, send mail to prasadbr33 at gmail dot com
    Hope it would solve ur problem
    Cheers
    Rajendra Bandi

  • How to send data at large IQ rate, at regular intervals and avoid buffer underflow?

    Hello,
    I am using 2921's and I have a Tx that generates payload only once, feeds it to a loop and the loop sends the same packet over and over again at a high rate. Please see attachment for VI screen snapshot. I want to have transmissions at regular intervals of my choice, but it does not work. I tried introducing a wait [ms] module into the loop (not shown in the attached figure), but I am facing the underflow problem.
    Can someone please advise me on how to achieve this? Right now, the packet transmission interval is decided by the USRP, as soon as it sends a packet it sends another one, and if I try to control the transmission interval by using wait [ms] model, I have underflow.
    Here are some details that could help you help me:
    *30, 60, 90 or 120 bytes of payload
    *8/16 bits sample width
    *8 samples per symbol
    *IQ rate of 8 MS/s
    I would like to send every 10 ms, whereas sending 30,60,90,120 bytes takes about 1,2,3,4 ms, respectively.
    Thanks!
    Filip
    Attachments:
    snapshot.jpg ‏178 KB

    Here are some general tips to increase your Tx streaming throughput:
    0) Don't use a continuous generation at all.  For many applications you don't need to stream continuously- a finite transmission (and you can loop a finite transmission) will do and you will basically not underflow in that case if you provide all the data up front.
    1) As you can see from the chart, the bigger the data buffer you provide in each Write call, the faster you can stream.
    2) Write sizes in multiples of the maximum packet size seem to work well.  That number is 363for the USRP-292x series (although that may change in future driver releases).  Try sending bursts of 10890 samples.
    3) If your application allows it, set a Start Trigger Time a little in the future.  Then start writing data before the device starts transmitting.  For example, set the Start Trigger Time to the (current device time + 1 second).  Then start writing data and you will have a second to pre-fill the on-device buffers.  This will substantially reduce the number of underflows.
    4) Be sure to do your data processing out of your write loop, to keep the write loop filling the pipleline as quickly as possible.
    For your specific application, a finite, timed generation may be the write pattern.

  • Rules for exchange folders in mac mail are gone at regular intervals

    I have some problems with mac mail and my exchange account.
    At regular intervals my mail doesn't show my mails in my mail folders. Than I have to restart mail and those mails are back again. But then I have to set destination folders for each rule and for each shortcut in mail again.

    Why would I go to the Microsoft Community when I'm asking specifically for an answer to how much is left to download in my mail account in the Mac Mail App Officially from Apple?
    To speed things up, where's the "Items downloading, items remaining, and total items in Mailbox" for iCloud Accounts in Apple's Offical Mail Mac App?

  • Using mobile camera to send images to the web server at regular intervals

    Hi All,
    I am developing an application in which the camera is kept on and it takes picture at regular intervals 30 sec to be exact. And that picture is sent to the web server so that can be viewed at the server. Now I am testing this application on Nokia E50 but after running for 3 hours there was an error given as below
    MediaException: (in takes Symbian OS error :-2
    Whats this error about? Is this an OS error or theres some fault within the coding. Please reply its urgent.
    Thanks in advance
    Sunil

    Hi Db,
    I have tried what you have said but now the problem is that it gives Symbian OS : -4 error which is a memory error. Actually what happens in the project is that once the connection between web server and the mobile breaks down the mobile will continuosly try to establish the connection and in doing so it will create new objects. There is no limitation on the number of times the connection attempts can be made. It will keep on trying till the connection is established. If that is the reason which is causing the problem then I think I may have to find another way for the connection to be established.
    Thanks in advance
    Sunil

  • How to send e-mails using CAF GP?

    Hi All,
    I have created a sample application which uses Process Control -> Visual Approval Callable Object for approving a vendor. I have also developed two mail templates for Approval and Rejection.
    The SMTP server is set to the mail server of the company.
    But the system is unable to send mails to the recipient. The following error message is displayed on clicking on "Approve":
    <i>Recipient data is missing.
    The system failed to send an e-mail notification to <Initiator>.</i>
    Can any of you suggest what the problem is and what is the possible workaround?
    Thanks in advance,
    Pavithra

    Hi Pavithra,
    Have u completed all the necessary configurations needed at the Visual Administrator level,
    You need to configure GP to be capable of picking the mails from your mail server at some regular intervals of time,
    You can refer to the document "Configuring GP for Interactive forms" at
    SAP Composite Application Framework - CAF Tutorial Center [original link is broken]
    Hope this will help,
    Rgds
    Deepak

  • How to send a mail as .txt attachment ,As data is seperated by pipeline

    Hi ,
    I got a requirement to send a mail in .txt format (Using OOPS) and the data inside the mail is seperated by '|'  Pls help me in this regard.
    i have written a mail to send the mail in .xls it is working fine for me in .xls but i dont know how to write the same for txt where data should be seperated by '|'.
    Regards
    sas
    Ps:  i am attaching my code. and please specify where i need to modify to achieve the same. and any perfromance enhacements are also welcome.
    *& Report  ZGBTEST02
    REPORT  YSAS_MAIL2.
    *Changes done by sas
    *PARAMETERS: P_MAIL TYPE AD_SMTPADR OBLIGATORY, " G C by sas
    *P_MAIL1 TYPE AD_SMTPADR OBLIGATORY." G by sas
    tables: adr6.
    SELECT-OPTIONS:p_eaddr FOR adr6-SMTP_ADDR NO INTERVALS .
    *end of changes by sas
    DATA: I_GLT0 TYPE STANDARD TABLE OF GLT0.
    DATA: I_MARA  TYPE STANDARD TABLE OF MARA.  " MARA Entries
    *      I_MARC  TYPE STANDARD TABLE OF MARC.  " MARC Entries
    DATA: L_TEXT  TYPE CHAR255.  " Text
    DATA: L_LINES TYPE I,
          L_SIZE  TYPE SOOD-OBJLEN.
    " Size of Attachment
    * Mail related
    DATA: I_CONTENT         TYPE   SOLI_TAB, " Mail content
          I_ATTACH          TYPE   SOLI_TAB, " Attachment
          I_ATTACH1         TYPE   SOLIX_TAB. " Attachment
    DATA: L_SEND_REQUEST    TYPE REF TO    CL_BCS,
                                                " E-Mail Send Request
          L_DOCUMENT        TYPE REF TO    CL_DOCUMENT_BCS,
                                                " E-Mail Attachment
          L_RECIPIENT       TYPE REF TO    IF_RECIPIENT_BCS,
                                                " Distribution List
          L_SENDER          TYPE REF TO    IF_SENDER_BCS,
                                                " Address of Sender
          L_UNAME           TYPE           SALRTDRCPT,
                                                " Sender Name(SY-UNAME)
          L_BCS_EXCEPTION   TYPE REF TO    CX_DOCUMENT_BCS,
                                                " BCS Exception
          L_ADDR_EXCEPTION  TYPE REF TO    CX_ADDRESS_BCS,
                                                " Address Exception
          L_SEND_EXCEPTION  TYPE REF TO    CX_SEND_REQ_BCS.
    " E-Mail sending Exception
    *Constants------------------------------------------------------------*
    CONSTANTS: C_TAB(1) TYPE C VALUE
               CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB,
                                         " Tab Character
               C_CR(1)  TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF,
                                         " Line Feed for End-Of_line
               C_EXT    TYPE SOODK-OBJTP VALUE 'XLS'. " XLS Extension
    START-OF-SELECTION.
      SELECT * FROM MARA INTO TABLE I_MARA UP TO 20 ROWS.
      IF SYST-SUBRC EQ 0.
    *    SELECT * FROM MARC INTO TABLE I_MARC FOR ALL ENTRIES IN I_MARA WHERE MATNR = I_MARA-MATNR.
      ENDIF.
    *select * from glt0 into table i_glt0.
    * Preparing body of the Mail
      MOVE 'SAP Material Master Records' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
      CLEAR L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
      MOVE 'Thanks,' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
      MOVE 'SAP MM' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
    * Creates persistent send request
      TRY.
          L_SEND_REQUEST = CL_BCS=>CREATE_PERSISTENT( ).
    * Creating Document
          L_DOCUMENT = CL_DOCUMENT_BCS=>CREATE_DOCUMENT(
                                        I_TYPE  = 'RAW'
                                        I_TEXT  = I_CONTENT[]
                                        I_SUBJECT = 'SAS MASTER Records' ).
    * Preparing contents of attachment with Change Log
          PERFORM PREPARE_ATTACHMENT.
          DESCRIBE TABLE I_MARA LINES L_LINES.
    * Size to multiplied by 2 for UNICODE enabled systems
          L_SIZE = L_LINES * 2 * 255.
    * Adding Attachment
          CALL METHOD L_DOCUMENT->ADD_ATTACHMENT
            EXPORTING
              I_ATTACHMENT_TYPE    = C_EXT
              I_ATTACHMENT_SIZE    = L_SIZE
              I_ATTACHMENT_SUBJECT = 'MARA Details'
    *          i_att_content_hex    = i_attach[].
              I_ATT_CONTENT_TEXT   = I_ATTACH[].
    *      DESCRIBE TABLE I_MARC LINES L_LINES.
    * Size to multiplied by 2 for UNICODE enabled systems
    *      L_SIZE = L_LINES * 2 * 255.
    ** Adding Attachment
    *      CALL METHOD L_DOCUMENT->ADD_ATTACHMENT
    *        EXPORTING
    *          I_ATTACHMENT_TYPE    = C_EXT
    *          I_ATTACHMENT_SIZE    = L_SIZE
    *          I_ATTACHMENT_SUBJECT = 'MARC Details'
    *          I_ATT_CONTENT_HEX    = I_ATTACH1[].
    **          i_att_content_text   = i_attach1[].
    * Add document to send request
          CALL METHOD L_SEND_REQUEST->SET_DOCUMENT( L_DOCUMENT ).
          DATA:LR_SENDER TYPE REF TO IF_SENDER_BCS,
               LR_SEND TYPE REF TO CL_BCS.
    * Preparing the sender object
    *      LR_SENDER = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( sy-uname ).
           DATA: L1_UNAME TYPE SY-UNAME.
           L1_UNAME = SY-UNAME.
           LR_SENDER = CL_SAPUSER_BCS=>CREATE( L1_UNAME ).
    * Setting the sender
          CALL METHOD L_SEND_REQUEST->SET_SENDER
            EXPORTING
              I_SENDER = LR_SENDER.
    * E-Mail
       LOOP AT P_EADDR.
          TRANSLATE P_EADDR-LOW TO LOWER CASE.
          L_RECIPIENT = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( P_EADDR-LOW ).
          CALL METHOD L_SEND_REQUEST->ADD_RECIPIENT
            EXPORTING
              I_RECIPIENT  = L_RECIPIENT
              I_EXPRESS    = 'U'
              I_COPY       = ' '
              I_BLIND_COPY = ' '
              I_NO_FORWARD = ' '.
           IF SY-subrc EQ 0.
              WRITE:/'** SUCCESS:  Email Sent to', p_eaddr-LOW COLOR COL_NORMAL.
            ELSE.
              WRITE:/'** ERROR: Failed to send Email to',p_eaddr-LOW COLOR COL_NEGATIVE .
            ENDIF.
          ENDLOOP.
    *Trigger E-Mail immediately
          L_SEND_REQUEST->SET_SEND_IMMEDIATELY( ' ' ).
          CALL METHOD L_SEND_REQUEST->SEND( ).
          COMMIT WORK.
        CATCH CX_DOCUMENT_BCS INTO L_BCS_EXCEPTION.
        CATCH CX_SEND_REQ_BCS INTO L_SEND_EXCEPTION.
        CATCH CX_ADDRESS_BCS  INTO L_ADDR_EXCEPTION.
      ENDTRY.
    *&      Form  PREPARE_ATTACHMENT
    FORM PREPARE_ATTACHMENT .
      FIELD-SYMBOLS: <LFS_TABLE>,    " Internal table structure
                     <LFS_CON>.      " Field Content
      DATA: L_TEXT TYPE CHAR1024.     " Text content for mail attachment
      DATA: L_CON TYPE STRING. "(50) TYPE c.        " Field Content in character format
      DATA: L_STR TYPE STRING,
            L_STR1 TYPE STRING.
      DATA: LS_SOLIX TYPE SOLIX.
    * Columns to be tab delimeted
      LOOP AT I_MARA ASSIGNING <LFS_TABLE>.
        DO.
          ASSIGN COMPONENT SY-INDEX OF STRUCTURE <LFS_TABLE>
                 TO <LFS_CON>.
          IF SY-SUBRC NE 0.
            CONCATENATE C_CR L_TEXT INTO L_TEXT.
    *        CONCATENATE l_str c_cr l_text INTO l_str.
    *        ls_solix-line = l_text.
    *        APPEND ls_solix TO i_attach.
            APPEND L_TEXT TO I_ATTACH.
            EXIT.
          ELSE.
            CLEAR: L_CON.
            MOVE <LFS_CON> TO L_CON.
            CONDENSE L_CON.
            IF SY-INDEX = 1.
              CLEAR: L_TEXT.
              MOVE L_CON TO L_TEXT.
            ELSE.
              CONCATENATE L_TEXT L_CON INTO L_TEXT
                 SEPARATED BY C_TAB.
            ENDIF.
          ENDIF.
        ENDDO.
      ENDLOOP.
    ** Columns to be tab delimeted
    *  LOOP AT I_MARC ASSIGNING <LFS_TABLE>.
    *    DO.
    *      ASSIGN COMPONENT SY-INDEX OF STRUCTURE <LFS_TABLE>
    *             TO <LFS_CON>.
    *      IF SY-SUBRC NE 0.
    *        CONCATENATE C_CR L_TEXT INTO L_TEXT.
    **        CONCATENATE l_str c_cr l_text INTO l_str1.
    *        LS_SOLIX-LINE = L_TEXT.
    *        APPEND LS_SOLIX TO I_ATTACH1.
    *        EXIT.
    *      ELSE.
    *        CLEAR: L_CON.
    *        MOVE <LFS_CON> TO L_CON.
    *        CONDENSE L_CON.
    *        IF SY-INDEX = 1.
    *          CLEAR: L_TEXT.
    *          MOVE L_CON TO L_TEXT.
    *        ELSE.
    *          CONCATENATE L_TEXT L_CON INTO L_TEXT
    *             SEPARATED BY C_TAB.
    *        ENDIF.
    *      ENDIF.
    *    ENDDO.
    *  ENDLOOP.
    *  i_attach1[] = i_attach[].
    ENDFORM.                    " PREPARE_ATTACHMENT

    Hi Sas,
    I have copied the code and executed and it is working fine. I'm getting the text attachement in the email.
    * Adding Attachment
          CALL METHOD L_DOCUMENT->ADD_ATTACHMENT
            EXPORTING
              I_ATTACHMENT_TYPE    = 'TXT'          "  C_EXT   My change
              I_ATTACHMENT_SIZE    = L_SIZE
              I_ATTACHMENT_SUBJECT = 'MARA Details'
    *          i_att_content_hex    = i_attach[].
              I_ATT_CONTENT_TEXT   = I_ATTACH[].
    CONCATENATE i_mara-MATNR
                             i_mara-ERSDA
                             i_mara-ERNAM
                             i_mara-LAEDA
                   INTO   L_TEXT
                 SEPARATED BY '|'.

  • How to send a mail as .txt attachment ?

    Hi all,
    I got a requirement to write code for sending mail in oops.
    i have written code for .xls which is working fine. But requirement is to send the mail in the format of txt.
    i just only chnge the .xls to .txt where i can see the output properly in sap but problem is that i am unable to get the proper alignment. when i execute the report and see the output in sost i can see the attachment.i am downloading the attachment there only(Our server is not configured to get the mails directly) .So when i open the saved text file on my pc the output is appearing as follows...
    pernr nachn vorna
            0001 L0001 F0001
                0002 L0002 F0002
                   0003 L0003 F0003
                         0004 L0004 F0004...
    Where it should come in straight line as follows in my o/p code..
    pernr nachn vorna
    0001 L0001 F0001
    0002 L0002 F0002
    0003 L0003 F0003
    0004 L0004 F0004...
    i am puttin g my code ..please correct me where i am wrong .....waiting for your valuabel inputs..
    *& Report  ZGBTEST02
    REPORT  YSAS_MAIL2.
    *Changes done by sas
    *PARAMETERS: P_MAIL TYPE AD_SMTPADR OBLIGATORY, " G C by sas
    *P_MAIL1 TYPE AD_SMTPADR OBLIGATORY." G by sas
    TABLES: ADR6.
    SELECT-OPTIONS:P_EADDR FOR ADR6-SMTP_ADDR NO INTERVALS .
    *end of changes by sas
    DATA: I_GLT0 TYPE STANDARD TABLE OF GLT0.
    *DATA: I_pernr  TYPE STANDARD TABLE OF pa0002.  " MARA Entries
    DATA: BEGIN OF I_PERNR OCCURS 1 ,
    PERNR TYPE PA0002-PERNR,
    NACHN TYPE PA0002-NACHN,
    VORNA TYPE PA0002-VORNA,
    END OF I_PERNR..
    *      I_MARC  TYPE STANDARD TABLE OF MARC.  " MARC Entries
    DATA: L_TEXT  TYPE CHAR255.  " Text
    DATA: L_LINES TYPE I,
          L_SIZE  TYPE SOOD-OBJLEN.
    " Size of Attachment
    * Mail related
    DATA: I_CONTENT         TYPE   SOLI_TAB, " Mail content
          I_ATTACH          TYPE   SOLI_TAB, " Attachment
          I_ATTACH1         TYPE   SOLIX_TAB. " Attachment
    DATA: L_SEND_REQUEST    TYPE REF TO    CL_BCS,
                                                " E-Mail Send Request
          L_DOCUMENT        TYPE REF TO    CL_DOCUMENT_BCS,
                                                " E-Mail Attachment
          L_RECIPIENT       TYPE REF TO    IF_RECIPIENT_BCS,
                                                " Distribution List
          L_SENDER          TYPE REF TO    IF_SENDER_BCS,
                                                " Address of Sender
          L_UNAME           TYPE           SALRTDRCPT,
                                                " Sender Name(SY-UNAME)
          L_BCS_EXCEPTION   TYPE REF TO    CX_DOCUMENT_BCS,
                                                " BCS Exception
          L_ADDR_EXCEPTION  TYPE REF TO    CX_ADDRESS_BCS,
                                                " Address Exception
          L_SEND_EXCEPTION  TYPE REF TO    CX_SEND_REQ_BCS.
    " E-Mail sending Exception
    *Constants------------------------------------------------------------*
    CONSTANTS: C_TAB(1) TYPE C VALUE
               CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB,
                                         " Tab Character
               C_CR(1)  TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF,
                                         " Line Feed for End-Of_line
               C_EXT    TYPE SOODK-OBJTP VALUE 'TXT'. " XLS Extension
    START-OF-SELECTION.
      SELECT PERNR NACHN VORNA  FROM PA0002 INTO CORRESPONDING FIELDS OF TABLE I_PERNR UP TO 20 ROWS.
    *select * from glt0 into table i_glt0.
    * Preparing body of the Mail
    *  MOVE 'SAP Material Master Records' TO L_TEXT.
    *  APPEND L_TEXT TO I_CONTENT.
    *  CLEAR L_TEXT.
    *  APPEND L_TEXT TO I_CONTENT.
    *  MOVE 'Thanks,' TO L_TEXT.
    *  APPEND L_TEXT TO I_CONTENT.
    *  MOVE 'SAP MM' TO L_TEXT.
    *  APPEND L_TEXT TO I_CONTENT.
      MOVE '<BR>Attached is your HRIS report(s) generated from the Firm''s' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
      MOVE ' Human Resources  Information System (SAP).' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
      MOVE '<BR>  ' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
      MOVE '<BR>This is an automated report.' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
    *        MOVE '<BR>  ' TO l_text.
    *        APPEND l_text TO i_content.
      MOVE '<BR>  ' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
    *        MOVE '<BR>Please do not reply to this email' TO l_text.
    *        APPEND l_text TO i_content.
    *        MOVE '<BR>  ' TO l_text.
    *        APPEND l_text TO i_content.
      MOVE '<BR>Thank you.' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
    * Creates persistent send request
      TRY.
          L_SEND_REQUEST = CL_BCS=>CREATE_PERSISTENT( ).
    * Creating Document
          L_DOCUMENT = CL_DOCUMENT_BCS=>CREATE_DOCUMENT(
                                        I_TYPE  = 'RAW'
                                        I_TEXT  = I_CONTENT[]
                                        I_SUBJECT = 'Automated HRIS (SAP) Report' ).
    DATA: W_PERNR LIKE I_PERNR.
    * Preparing contents of attachment with Change Log
          PERFORM PREPARE_ATTACHMENT.
          DATA: compressed like solisti1 occurs 10 with header line.
    DATA: decompressed like solisti1 occurs 10 with header line.
          CALL FUNCTION 'TABLE_COMPRESS'
    *   IMPORTING
    *     COMPRESSED_SIZE       =
                        TABLES
    *      in                    = eerec
                          in                    = i_attach
                          out                   = compressed.
          CALL FUNCTION 'TABLE_DECOMPRESS'
            TABLES
              in  = compressed
              out = decompressed.
          DESCRIBE TABLE decompressed LINES L_LINES.
    * Size to multiplied by 2 for UNICODE enabled systems
          L_SIZE = L_LINES * 2 * 255.
    * Adding Attachment
          CALL METHOD L_DOCUMENT->ADD_ATTACHMENT
            EXPORTING
              I_ATTACHMENT_TYPE    = C_EXT
              I_ATTACHMENT_SIZE    = L_SIZE
              I_ATTACHMENT_SUBJECT = 'Hr Details'
    *          i_att_content_hex    = i_attach[].
              I_ATT_CONTENT_TEXT   = decompressed[].
    *      DESCRIBE TABLE I_MARC LINES L_LINES.
    * Size to multiplied by 2 for UNICODE enabled systems
    *      L_SIZE = L_LINES * 2 * 255.
    ** Adding Attachment
    *      CALL METHOD L_DOCUMENT->ADD_ATTACHMENT
    *        EXPORTING
    *          I_ATTACHMENT_TYPE    = C_EXT
    *          I_ATTACHMENT_SIZE    = L_SIZE
    *          I_ATTACHMENT_SUBJECT = 'MARC Details'
    *          I_ATT_CONTENT_HEX    = I_ATTACH1[].
    **          i_att_content_text   = i_attach1[].
    * Add document to send request
          CALL METHOD L_SEND_REQUEST->SET_DOCUMENT( L_DOCUMENT ).
          DATA:LR_SENDER TYPE REF TO IF_SENDER_BCS,
               LR_SEND TYPE REF TO CL_BCS.
    * Preparing the sender object
    *      LR_SENDER = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( sy-uname ).
          DATA: L1_UNAME TYPE SY-UNAME.
          L1_UNAME = SY-UNAME.
          LR_SENDER = CL_SAPUSER_BCS=>CREATE( L1_UNAME ).
    * Setting the sender
          CALL METHOD L_SEND_REQUEST->SET_SENDER
            EXPORTING
              I_SENDER = LR_SENDER.
    * E-Mail
          LOOP AT P_EADDR.
            TRANSLATE P_EADDR-LOW TO LOWER CASE.
            L_RECIPIENT = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( P_EADDR-LOW ).
            CALL METHOD L_SEND_REQUEST->ADD_RECIPIENT
              EXPORTING
                I_RECIPIENT  = L_RECIPIENT
                I_EXPRESS    = 'U'
                I_COPY       = ' '
                I_BLIND_COPY = ' '
                I_NO_FORWARD = ' '.
            IF SY-SUBRC EQ 0.
              WRITE:/'** SUCCESS:  Email Sent to', P_EADDR-LOW COLOR COL_NORMAL.
            ELSE.
              WRITE:/'** ERROR: Failed to send Email to',P_EADDR-LOW COLOR COL_NEGATIVE .
            ENDIF.
          ENDLOOP.
    *Trigger E-Mail immediately
          L_SEND_REQUEST->SET_SEND_IMMEDIATELY( ' ' ).
          CALL METHOD L_SEND_REQUEST->SEND( ).
          COMMIT WORK.
        CATCH CX_DOCUMENT_BCS INTO L_BCS_EXCEPTION.
        CATCH CX_SEND_REQ_BCS INTO L_SEND_EXCEPTION.
        CATCH CX_ADDRESS_BCS  INTO L_ADDR_EXCEPTION.
      ENDTRY.
    *&      Form  PREPARE_ATTACHMENT
    FORM PREPARE_ATTACHMENT .
      FIELD-SYMBOLS: <LFS_TABLE>,    " Internal table structure
                     <LFS_CON>.      " Field Content
      DATA: L_TEXT TYPE CHAR1024.     " Text content for mail attachment
      DATA: L_CON TYPE STRING. "(50) TYPE c.        " Field Content in character format
      DATA: L_STR TYPE STRING,
            L_STR1 TYPE STRING.
    *data: w_pernr type TABLE OF I_PERNR.
      DATA: LS_SOLIX TYPE SOLIX.
    *  CONCATENATE 'PERNR' 'FIRST NAME' 'Last Name' C_CR INTO L_TEXT SEPARATED BY '|'.
    *  append l_text to i_attach.
    *  clear l_text.
    * Columns to be tab delimeted
      LOOP AT I_PERNR ASSIGNING <LFS_TABLE>.
        DO.
          ASSIGN COMPONENT SY-INDEX OF STRUCTURE <LFS_TABLE>
                 TO <LFS_CON>.
          IF SY-SUBRC NE 0.
            CONCATENATE C_CR L_TEXT INTO L_TEXT.
    *        CONCATENATE l_str c_cr l_text INTO l_str.
    *        ls_solix-line = l_text.
    *        APPEND ls_solix TO i_attach.
            APPEND L_TEXT TO I_ATTACH.
            EXIT.
          ELSE.
            CLEAR: L_CON.
            MOVE <LFS_CON> TO L_CON.
            CONDENSE L_CON.
            IF SY-INDEX = 1.
              CLEAR: L_TEXT.
              MOVE L_CON TO L_TEXT.
            ELSE.
              CONCATENATE L_TEXT L_CON INTO L_TEXT
                 SEPARATED BY C_TAB.
            ENDIF.
          ENDIF.
        ENDDO.
      ENDLOOP.
    *  i_attach1[] = i_attach[].
    ENDFORM.                    " PREPARE_ATTACHMENT
    Please if any one having 6.0 version please upload it and see..
    Regards
    Sas

    Hi ,
    Did you downloaded from  SOST  using the display icon and inside that 4th tab for attachment ....
    and see?
    Regards
    sas
    pS: THE FIRST page is not allowing the spaces in sdn...
    i am getting o/p as
    pernr vochn norna
    .........0001 f0001 l0001
    .................0002 F0002 L0002
    .......................0003 F0003 L0003.....
    Please remove dots and understand that is the o/p i am getting in my presenation file
    i just expecting the o/p as told earlier..
    Regards
    sas

  • Blind copy while sending a mail...

    Hi Friends,
    How to set a recipient under the blind copy recipient list (BCC) while sending a mail using the function module SO_DOCUMENT_SEND_API1. I have checked the flag <b>blind_copy</b> but not seeing that recipient under the bcc list. Some body please help in this.
    Thanx in advance.
    Ram

    See the example program :
    TABLES: SOLI.
       Data Declarations
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: SAPID     RADIOBUTTON GROUP ADDR,
                EMAIL_ID  RADIOBUTTON GROUP ADDR.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    SELECT-OPTIONS: ID  FOR SOLI-LINE NO INTERVALS.
    SELECT-OPTIONS: CC  FOR SOLI-LINE NO INTERVALS.
    SELECT-OPTIONS: BCC FOR SOLI-LINE NO INTERVALS.
    *PARAMETERS:     SENDER LIKE SOUD-USRNAM.
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-009.
    PARAMETERS: SUB_LINE(60) TYPE C.
    SELECTION-SCREEN END OF BLOCK B3.
    SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-008.
    SELECT-OPTIONS:  TEXT1 FOR SOLI-LINE NO INTERVALS.
    SELECTION-SCREEN END OF BLOCK B4.
    SELECTION-SCREEN BEGIN OF BLOCK B5 WITH FRAME TITLE TEXT-009.
    SELECTION-SCREEN BEGIN OF LINE.
    parameters: P_ATTACH as checkbox.
    selection-screen comment 3(30) text-010.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B5.
    DATA: MAIL_CONTENT LIKE SOLI OCCURS 0 WITH HEADER LINE,
          SUBJECT_LINE LIKE SOOD1-OBJDES.
       Start of program processing
    START-OF-SELECTION.
    Get the Body of the Message from the selection screen or from
    calling program
      LOOP AT TEXT1.
        MOVE   TEXT1-LOW TO MAIL_CONTENT-LINE.
        APPEND MAIL_CONTENT.
      ENDLOOP.
    Subject of the Message
      MOVE  SUB_LINE TO SUBJECT_LINE.
    call a routine to send the workflow message
      PERFORM SEND_EMAIL
              TABLES MAIL_CONTENT
              USING  SUBJECT_LINE.
    *&      Form  SEND_EMAIL
    Send Workflow message
    FORM SEND_EMAIL TABLES OBJCONT STRUCTURE MAIL_CONTENT
                    USING  TITLE   LIKE SOOD-OBJDES.
      DATA: RECEIVERS LIKE SOOS1 OCCURS 0 WITH HEADER LINE,
            TSOOD1 LIKE SOOD1,
            PACKING_LIST LIKE SOXPL OCCURS 0 WITH HEADER LINE,
            OBJCONT1 LIKE MAIL_CONTENT OCCURS 0 WITH HEADER LINE.
      DATA: BEGIN OF AT_HEADER OCCURS 1.
              INCLUDE STRUCTURE SOLI.
      DATA: END OF AT_HEADER.
      CLEAR: TSOOD1,
             RECEIVERS.
      REFRESH RECEIVERS.
      MOVE:  SY-LANGU       TO TSOOD1-OBJLA,
             'Email Notice' TO TSOOD1-OBJNAM,
             'C'            TO TSOOD1-OBJSNS,
             TITLE          TO TSOOD1-OBJDES.
           'SCHIAVONIR'   TO TSOOD1-OWNNAM.
    loop through each ID and move them to recipient table
      LOOP AT ID.
        TRANSLATE ID-LOW TO UPPER CASE.
        IF SAPID = 'X'.
          MOVE: SY-DATUM     TO RECEIVERS-RCDAT,
                SY-UZEIT     TO RECEIVERS-RCTIM,
                ' '          TO RECEIVERS-RECESC,
                 ID-LOW      TO RECEIVERS-RECNAM,
                'X'          TO RECEIVERS-SNDEX.
        ELSE.
          MOVE: SY-DATUM     TO RECEIVERS-RCDAT,
                SY-UZEIT     TO RECEIVERS-RCTIM,
                'U'          TO RECEIVERS-RECESC,
                'U-'         TO RECEIVERS-RECNAM,
                ID-LOW       TO RECEIVERS-RECEXTNAM.
        ENDIF.
        APPEND RECEIVERS.
        CLEAR RECEIVERS.
      ENDLOOP.
    loop through each CC and move them to recipient table
      LOOP AT CC.
        TRANSLATE CC-LOW TO UPPER CASE.
        IF SAPID = 'X'.
          MOVE: SY-DATUM     TO RECEIVERS-RCDAT,
                SY-UZEIT     TO RECEIVERS-RCTIM,
                ' '          TO RECEIVERS-RECESC,
                 CC-LOW      TO RECEIVERS-RECNAM,
                'X'          TO RECEIVERS-SNDEX,
                'X'          TO RECEIVERS-SNDCP.
        ELSE.
          MOVE: SY-DATUM     TO RECEIVERS-RCDAT,
                SY-UZEIT     TO RECEIVERS-RCTIM,
                'U'          TO RECEIVERS-RECESC,
                'U-'         TO RECEIVERS-RECNAM,
                CC-LOW       TO RECEIVERS-RECEXTNAM,
                'X'          TO RECEIVERS-SNDCP.
        ENDIF.
        APPEND RECEIVERS.
        CLEAR RECEIVERS.
      ENDLOOP.
    loop through each BCC and move them to recipient table
      LOOP AT BCC.
        TRANSLATE BCC-LOW TO UPPER CASE.
        IF SAPID = 'X'.
          MOVE: SY-DATUM     TO RECEIVERS-RCDAT,
                SY-UZEIT     TO RECEIVERS-RCTIM,
                ' '          TO RECEIVERS-RECESC,
                 BCC-LOW     TO RECEIVERS-RECNAM,
                'X'          TO RECEIVERS-SNDEX,
                'X'          TO RECEIVERS-SNDBC.
        ELSE.
          MOVE: SY-DATUM     TO RECEIVERS-RCDAT,
                SY-UZEIT     TO RECEIVERS-RCTIM,
                'U'          TO RECEIVERS-RECESC,
                'U-'         TO RECEIVERS-RECNAM,
                BCC-LOW      TO RECEIVERS-RECEXTNAM,
                'X'          TO RECEIVERS-SNDBC.
        ENDIF.
        APPEND RECEIVERS.
        CLEAR RECEIVERS.
      ENDLOOP.
      AT_HEADER = SY-DATUM.
      APPEND AT_HEADER.
      AT_HEADER = SY-UZEIT.
      APPEND AT_HEADER.
    IF SENDER EQ SPACE.
       SENDER = SY-UNAME.
    ENDIF.
      IF P_ATTACH EQ 'X'.
        PACKING_LIST-HEAD_START = 1.
        PACKING_LIST-HEAD_NUM   = 2.
        PACKING_LIST-BODY_START = 1.
        PACKING_LIST-BODY_NUM   = 9999.
        PACKING_LIST-FILE_EXT   = 'TXT'.
        APPEND PACKING_LIST.
        CLEAR  PACKING_LIST.
        APPEND LINES OF OBJCONT TO OBJCONT1.
        REFRESH OBJCONT.
      ENDIF.
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                OBJECT_HD_CHANGE           = TSOOD1
                OBJECT_TYPE                = 'RAW'
           TABLES
                OBJCONT                    = OBJCONT
                RECEIVERS                  = RECEIVERS
                ATT_HEAD                   = AT_HEADER
                ATT_CONT                   = OBJCONT1
                PACKING_LIST               = PACKING_LIST
           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.
    ENDFORM.                               " SEND_EMAIL
    text elements
    BCC     Blind CC
    CC     Copy to
    EMAIL_ID     Email ID
    ID     ?...
    P_ATTACH     Send as Attachment?
    SAPID     SAP ID
    SUB_LINE     Subject
    TEXT1     Message

  • How can scripts and  smart forms send to mail and pdf?

    HI i want to know how script and smartforms will send to mail and pdf formates>?

    Dear Anees ,
                       Pleas pass on the parameter in itcpo - (getotf  ) structure while calling OPEN_FORM as 'X' .
    I have answered it in detail in your earlier post .
    also giving below sample program for sending SAPSCRIPT as PDFattachment in email  :
    REPORT zsapscript_pdf_via_mail MESSAGE-ID zvele LINE-SIZE 68
    NO STANDARD PAGE HEADING.
    TABLES: itcpo.
    Open your usual sapscript specifying that the output will be OTF
    itcpo-tdgetotf = 'X'.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    device = 'PRINTER'
    dialog = ''
    form = '............'
    language = sy-langu
    options = itcpo
    EXCEPTIONS
    canceled = 1
    device = 2
    form = 3
    options = 4
    unclosed = 5
    OTHERS = 6.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    window = '............'
    element = '............'
    EXCEPTIONS
    window = 1
    element = 2.
    DATA: BEGIN OF t_otfdata OCCURS 0.
    INCLUDE STRUCTURE itcoo.
    DATA: END OF t_otfdata.
    Closing the Sapscript, we save data (OTF) in a table
    CALL FUNCTION 'CLOSE_FORM'
    TABLES
    otfdata = t_otfdata
    EXCEPTIONS
    unopened = 1
    bad_pageformat_for_print = 2
    send_error = 3
    spool_error = 4
    OTHERS = 5.
    DATA: len_in LIKE sood-objlen,
    len_out LIKE sood-objlen.
    DATA: BEGIN OF t_pdfdata OCCURS 0.
    INCLUDE STRUCTURE solisti1.
    DATA: END OF t_pdfdata.
    DATA: BEGIN OF t_otfdata2 OCCURS 0.
    INCLUDE STRUCTURE solisti1.
    DATA: END OF t_otfdata2.
    Move OTF data to another table with lenght 255
    LOOP AT t_otfdata.
    CONCATENATE t_otfdata-tdprintcom t_otfdata-tdprintpar INTO t_otfdata2.
    APPEND t_otfdata2.
    ENDLOOP.
    Convert OTF format to PDF
    CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
    EXPORTING
    format_src = 'OTF'
    format_dst = 'PDF'
    devtype = 'PRINTER'
    FUNCPARA =
    len_in = len_in
    IMPORTING
    len_out = len_out
    TABLES
    content_in = t_otfdata2
    content_out = t_pdfdata
    EXCEPTIONS
    err_conv_failed = 1
    OTHERS = 2.
    Download on local directory
    *CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = len_out
    FILENAME = 'c:\test.pdf'
    FILETYPE = 'BIN'
    TABLES
    data_tab = t_pdfdata.
    Mail settings
    DATA: objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    DATA: objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINe.
    DATA: doc_chng LIKE sodocchgi1.
    DATA righe_attachment TYPE i.
    DATA righe_testo TYPE i.
    DATA z_email(80) TYPE c.
    Receivers parameters
    SELECT-OPTIONS: s_email FOR z_email LOWER CASE NO INTERVALS.
    PARAMETERS rec_type LIKE reclist-rec_type
    DEFAULT 'U'. " type of sending address
    CLEAR: reclist, reclist[],
    objhead, objhead[],
    objtxt, objtxt[],
    objbin, objbin[],
    objpack, objpack[].
    Attachment filling
    LOOP AT t_pdfdata.
    objbin-line = t_pdfdata.
    APPEND objbin.
    ENDLOOP.
    DESCRIBE TABLE objbin LINES righe_attachment.
    Text filling
    objtxt = 'Testo della Mail - Riga 1'.APPEND objtxt.
    objtxt = 'Testo della Mail - Riga 2'.APPEND objtxt.
    objtxt = 'Testo della Mail - Riga n'.APPEND objtxt.
    DESCRIBE TABLE objtxt LINES righe_testo.
    Other filling
    doc_chng-obj_name = 'URGENT'.
    doc_chng-expiry_dat = sy-datum + 10.
    doc_chng-obj_descr = 'Prova invio Mail con PDF'.
    doc_chng-sensitivty = 'O'.
    doc_chng-doc_size = righe_testo * 255.
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = righe_testo.
    objpack-doc_type = 'RAW'.
    APPEND objpack.
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 1.
    objpack-body_start = 1.
    objpack-body_num = righe_attachment.
    objpack-doc_type = 'PDF'.
    objpack-obj_name = 'TEST'.
    objpack-obj_descr = 'File.pdf'.
    objpack-doc_size = righe_attachment * 255.
    APPEND objpack.
    Receivers filling
    LOOP AT s_email WHERE sign = 'I'
    AND option = 'EQ'
    AND NOT ( low IS initial ).
    CLEAR reclist.
    IF sy-tabix > 1.
    reclist-copy = 'X'.
    ENDIF.
    reclist-receiver = s_email-low.
    IF rec_type IS INITIAL.
    reclist-rec_type = 'U'. " Internet e-mail
    ELSE.
    reclist-rec_type = rec_type.
    ENDIF.
    reclist-notif_del = 'X'. " request delivery notification
    reclist-notif_ndel = 'X'. " request not delivered notification
    APPEND reclist.
    ENDLOOP.
    Mail Send
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = doc_chng
    put_in_outbox = 'X'
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    OBJECT_PARA =
    OBJECT_PARB =
    receivers = reclist
    CONTENTS_HEX =
    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

  • How to send automatic mail and put attache file on batch file ?

    how to send automatic mail and put attache file on batch file ?
    START MAILTO:[email protected]?SUBJECT=PHONE%CALL^&BODY=Testing

    Hi,
    Do you want to use a batch file to create new email message (including recipients, subject and email body) with attachments? If so, I'd recommend you post your question in the Scripting Guys forum for further assistance:
    https://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Please feel free to let me know if I've misunderstood something.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Send e-mail settings to smartphone via service messages?

    Good Day,
    Is it possible to send e-mail settings to a blackberry phone via some form of service message so the phone user does not have to manually set it up?
    We recently had to reinstall our Exchange server and are now having to change the e-mail settings on all our staff members phone's, however, some of these staff members are not in the same city as I.T. support and as the staff members are not very computer/smartphone literate, it will be difficult for us to walk them through on how to change the e-mail settings, especially if the autodiscovery does not report the settings correctly to the phone and the domain/server settings has to be entered manually.
    One staff member in particular, has a Blackberry curve 9300.
    Any suggestion's will be appreciated as we would prefer to, as well as in the future, be able to update the phones with the necissary settings by means of some form of service message rather than error prone manual intervention.
    Regards
    Andre T. Dreyer
    Solved!
    Go to Solution.

    OK...then the answer is, well, maybe. It would require compromise of your security ethics.
    One way to do what you desire is for you to log into the users BIS account on their carriers BIS website and configure the email account there...doing so would, of course, require you to know the users BIS credentials. Of course, this also would require that the carrier actually have such a website...not all do.
    Another way would be to ring up the users carrier and impersonate the user, and have the carrier agent configure the email account.
    If the employer provides the devices as well as the service plan to the user, then I suppose the security compromise required is less since, technically, both belong to the company, not the user. But, if these are BYOD devices and/or the carrier account does not belong to the employer, then you would be in essence hacking into the users account to accomplish this.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Issues in sending e-mail from FDM

    Hi Experts,
    I am working on FDM v 11.1.1.3, windows 2003 SP2, IIS 6.0 and I am trying to send an e-mail using the Send Mail accelerator and following is the code:
    'Define variables etc.
    strFromAddress = DW.Security.fUserEmailGet(DW.Connection.PstrUserID)
    strToAddress = "[email protected]" '"YourToAddress"
    strSubject = "Import Failed" '"YourSubjectLine"
    strEmailMsgLine = "The import process has failed." '"YourMessageLine"
    strSMTPServer = "smtp.gmail.com"
    'CdoSendUsing enumeration-1=use smtp on local machine, 2=use smtp over network
    intSendUsing = 1
    'SMTP port on server
    intSMTPPort = 25
    Set objConfig = CreateObject("CDO.Configuration")     
    With objConfig.Fields
         .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = intSendUsing
         .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTPServer
         .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")= intSMTPPort
         .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
         .Update
    End With
    'Create CDO message object
    Set objMsg = CreateObject("CDO.Message")     
    'Assign config object to configuration property of message object
    Set objMsg.Configuration = objConfig
    'Set Message object settings and send mail
    With objMsg
         .To = strToAddress
         .From = strFromAddress
         .Subject = strSubject
         .TextBody = strEmailMsgLine
         .Send
    End With
    'Destroy message objects
    Set objMsg = Nothing
    Set objConfig = Nothing
    When I set 'CdoSendUsing' to 1, an eml file gets generated on the path 'C:\Inetpub\mailroot\Pickup' but I never receive it on my gmail ID. When I set the 'CdoSendUsing' to 2, I get an error on the .Send line saying 'The server rejected the sender address. Server response was 530 5.7.0 must issue a STARTTLS command first'. I also checked the MetaBase.XML, 'PickupDirectory' is set.
    Please suggest where am I going wrong.
    Thanks & Regards!

    Just to confirm what Tony is saying :
    - It's highly unlikely that Google functions as a Mail Relay for SMTP. If it did spammers would have a field day. An open relay is a mail server that will forward emails sent to it from unknown 3rd parties. I'm not familiar with your Google service; however, if they allow any type of mail relaying form you, it is probably secure with at least a login and password so they know it is coming from you. (This would mean when you use the CDONTS object, you'll need to supply a sender login and password)
    - The reason why files are accumulating in the Pickup folder is you do not have a running SMTP service that is processing emails on the server that you pointed FDM to. For reference, the following folders are used by your typical SMTP mail service :
    * Pickup : Email files waiting to be picked up by the SMTP server for processing (if you open the EML file in a text editor, should be apparent what it is) If the email is meant for an external party, it will be sent to their mail server. If the message is meant for an internal user, gets moved to Drop folder.
    * Drop : Incoming messages for local users are stored here
    * Queue : Messages that were sent but could not be immediately delivered are placed here. These will be resent at various intervals for a predetermined amount of attempts.
    * Badmail : Messages that could not be delivered. Viewing in a text editor should indicate the failure, etc. Senders are not notified of these failures in most cases unless an Admin notifies them based on what is in this folder.
    The easiest option here is to install SMTP on the FDM box and call it a day.
    * MS Install Instructions for Server 2003 - http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/e4cf06f5-9a36-474b-ba78-3f287a2b88f2.mspx?mfr=true
    * MS Configuration information for SMTP on IIS 6.0
    http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/e4cf06f5-9a36-474b-ba78-3f287a2b88f2.mspx?mfr=true
    One NOTE :
    - If your company has a mailserver (who doesn't?? :) ), the MX record will be linked to the IP of that machine and not your SMTP box. Certain anti-spam solutions as well as other mail servers might reject your emails as when they perform a reverse lookup, the IP address of your SMTP server will not match that of your MX entry (DNS).
    If this happens, you should configure your FDM SMTP server to send its mail to your local mail server and talk to your IT department to make sure all necessary changes are in place. (i.e. you might need to configure Exchange to let your FDM SMTP use it as a mail relay, etc)

Maybe you are looking for

  • No display on Zen Mi

    The display on my Zen Micro is blank (actually, I can see a very, very faint grey box). The player works, but I can't pick the music I want, access any options or change the display because I can't see what I am choosing. I tried resetting the player

  • PO falls under approval

    hi we recently changed the approval matrix leve ever since i noticed if  i reduced line item on po to lower than what it is po goes out of approval  what causes this before it only required when po amt increased thank you ash

  • Need to reduce the report size.

    Hi all, I am using CR2008, i have total 4 images(jpeg) in the header and footer. My problem is  size of the rpt file. i am getting 8MB for the blank report itself. so i cant able to export this file properly from my  application(.net)into .doc and RT

  • How do I unpublish my site?

    I want to completely remove my site. I did a search and tried going on the iDisk, navigating to web/sites/iweb and moving my site to the trash(I originally tried Command + delete, but it did nothing?). It no longer appears in the iweb folder, but whe

  • Is this a way to eject my usb?

    I clicked on file, then open and my usb port appeared in the list. I then clicked on the arrow which disappeared. Is this a way to eject my usb device?