Automatically send mails

Hi Gurus,
I am using adf stack for development using JDev 11.1.1.5. I want to know how do i send mails to automatically at some interval of time
thnks

Thnks John, if you can advice which is the best place to write the mail logic. view layer/ or model layer and which api integrates well (java mail api/Simple Java Mail API or any other ..i can see a list here http://java.sun.com/products/javamail/Third_Party.html)

Similar Messages

  • Automatically send mail from ALV reports

    hi experts,
        I have created an ALV report for overtime calculation.The report will be generated on weekly basis in the background and will display calculated  overtime worked by employees in the previous week. I want the Report to run background and send the report in the HR dept concened officer in excel format automatically on weekly basis for his approval.
    how do i go about.
    regards,
    aero

    hi,
    <b>1</b>. u can prepare the output in an internal table ITAB.
    <b>2</b>. and then u can fill mail content with the help of ITAB data
    <b>3</b>. and then call function <b>'SO_NEW_DOCUMENT_SEND_API1'</b> if u have no attachement to be sent, but only normal mail with content in it.
    The sample code is below.
    FORM header_of_mail.
      CLEAR g_s_object_content.
      REFRESH g_t_object_content.
    Get an empty line
      MOVE space TO g_s_object_content+0(81).
      APPEND g_s_object_content TO g_t_object_content.
    Print partner number and description
      CLEAR g_s_object_content.
      MOVE text-t13 TO g_s_object_content.  " WMS
      MOVE sy-uline TO g_s_object_content+15(1).
      MOVE g_f_wms_descr TO g_s_object_content+30.
      APPEND g_s_object_content TO g_t_object_content.
    Print Division for which the mail is meant for
      CLEAR g_s_object_content.
      MOVE text-t14 TO g_s_object_content.  " Material with division
      MOVE sy-uline TO g_s_object_content+25(1).
      MOVE g_t_y16m_rcp_par-spart TO g_s_object_content+30.
      APPEND g_s_object_content TO g_t_object_content.
    Get an empty line
      CLEAR g_s_object_content.
      MOVE space TO g_s_object_content+0(81).
      APPEND g_s_object_content TO g_t_object_content.
    Get a dotted line.
      CLEAR g_s_object_content.
      MOVE sy-uline TO g_s_object_content+0(120).
      APPEND g_s_object_content TO g_t_object_content.
    Print column headings
      CLEAR g_s_object_content.
      MOVE text-t04 TO g_s_object_content+3(16). " IDoc number
      MOVE text-t05 TO g_s_object_content+27(18). " Material number
      MOVE text-t07 TO g_s_object_content+63(6). " Length
      MOVE text-t08 TO g_s_object_content+81(5). " Width
      MOVE text-t09 TO g_s_object_content+97(6). " Height
      MOVE text-t10 TO g_s_object_content+109(11). " Brut Weight
      APPEND g_s_object_content TO g_t_object_content.
    Get a dotted line.
      CLEAR g_s_object_content.
      MOVE sy-uline TO g_s_object_content+0(120).
      APPEND g_s_object_content TO g_t_object_content.
    ENDFORM.                    " HEADER_OF_MAIL
    FORM body_of_mail.
    Print contents such as IDoc number, material no. and measures
      LOOP AT g_t_mail_for_division.
        CLEAR g_s_object_content.
        MOVE g_t_mail_for_division-docnum TO g_s_object_content+3(16).
        MOVE g_t_mail_for_division-matnr TO g_s_object_content+27(18).
        MOVE text-t11 TO g_s_object_content+49(4).
        MOVE g_t_mail_for_division-laeng_from_sap TO
                                            g_s_object_content+57(13).
        MOVE g_t_mail_for_division-breit_from_sap TO
                                            g_s_object_content+74(13).
        MOVE g_t_mail_for_division-hoehe_from_sap TO
                                            g_s_object_content+91(13).
        MOVE g_t_mail_for_division-brgew_from_sap TO
                                            g_s_object_content+108(13).
        APPEND g_s_object_content TO g_t_object_content.
        CLEAR g_s_object_content.
        MOVE text-t12 TO g_s_object_content+49(4).
        MOVE g_t_mail_for_division-laeng_from_idoc TO
                                            g_s_object_content+57(13).
        MOVE g_t_mail_for_division-breit_from_idoc TO
                                            g_s_object_content+74(13).
        MOVE g_t_mail_for_division-hoehe_from_idoc TO
                                            g_s_object_content+91(13).
        MOVE g_t_mail_for_division-brgew_from_idoc TO
                                            g_s_object_content+108(13).
        APPEND g_s_object_content TO g_t_object_content.
      ENDLOOP.
    ENDFORM.                    " BODY_OF_MAIL
    FORM send_mail USING  p_y16m_rcp_par STRUCTURE y16m_rcp_par.
    Have a subject for the mail
      g_s_document_data-obj_name = text-t02.
      g_s_document_data-obj_descr = text-t03.
    Fill receiver information
      CLEAR g_s_receivers.
      REFRESH g_t_receivers.
      g_s_receivers-rec_type = p_y16m_rcp_par-rec_type.
      g_s_receivers-receiver = p_y16m_rcp_par-rec_id.
      g_s_receivers-express = 'X'.
      APPEND g_s_receivers TO g_t_receivers.
    Call function to send mail
      CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = g_s_document_data
               document_type              = 'RAW'
             PUT_IN_OUTBOX              = ' '
        IMPORTING
             SENT_TO_ALL                =
             NEW_OBJECT_ID              =
           TABLES
             OBJECT_HEADER              =
               object_content             =  g_t_object_content
             CONTENTS_HEX               =
             OBJECT_PARA                =
             OBJECT_PARB                =
                receivers                  = g_t_receivers
          EXCEPTIONS
               too_many_receivers         = 1
               document_not_sent          = 2
               document_type_not_exist    = 3
               operation_no_authorization = 4
               parameter_error            = 5
               x_error                    = 6
               enqueue_error              = 7
               OTHERS                     = 8
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " SEND_MAIL
    hope this helps.
    pls reward if useful...
    Message was edited by:
            pawan ambadas

  • Automatic Send mail when sales order is change

    Hi friends,
    I have a requirement that  when ever sales order is created or change i.e in va01 or va02 automatically mail to send to customer. So please can u sujjest me in doing this ?
    with regards,
    prasad.

    Write the codes in sales order exit program so that as soon as you save the sales order the email can be triggered.
    Abap Program: MV45AFZZ
    USEREXIT_SAVE_DOCUMENT
    Sending e-mails using ABAP
    Thanks
    Ganesh
    you can also use work flow to trigger the email from sales order.
    Edited by: Ganesh Modhave on Oct 6, 2008 10:54 AM

  • UMS adapter email component automatically sends mails

    Hi Experts,
    I am working on SOA 11.1.1.7. I configured email driver with the required smtp details and tested email notifications from BPM process using Email Notification activity using my email id.
    This is working fine.
    Today i saw that there are some automatic mails being sent to few email addresses in my contact list. These emails contain an attachment called Humanworkflowactivity.html
    Request your help in trying to understand and resolve this.
    Thanks,
    Sai

    Don't see where Struts comes into the equation. Just use [Quartz |http://www.quartz-scheduler.org/] or something.

  • Iphone 4 automatically sending nuisance/ viral e-mail messages from my yahoo account to members of my phone/ e-mail/ facebook contact list. What can I do to stop this?

    This has occurred on 2 different occassions. In both cases, I can not identify a viral email that I would have opened that could have started this as we are very cautious about opening unknown emails, and definately NEVER double click on links that come through in nuisance/ spam type e-mails.
    This morning was the second time that it appears my iphone was somehow involved in automatically sending out a mass nuisance message to all my contacts (phone contacts/ facebook contacts/ yahoo contacts).  The email contained no message - except for a single link to an unknown destination of course since I refuse to dbl click on it to see what I have sent out to my friends.
    This is the second time it has happened. I have posted on facebook to all my friends to not open the message. I have deleted ALL my contacts from both my phone and from yahoo contact list. I even deleted facebook and all it's info. from my phone to remove their contact lists. I don't want this to keep happening to my friends. The only thing I haven't deleted is my phone contacts (phone numbers) but I am assuming it may very well happen again since the automatic message was also sent to my phone contacts. (Not sure how that even happens - an auto email to a phone number?)
    I have been reading on this site that it is nearly impossible to get a virus on your iphone - however, what other explanation is there? I don't have a PC - I don't have any Windows products in my home. We own 1 ipad and 2 iphones at the moment. I never access my yahoo account from anywhere but my MAC products.  What is happening and how can it be resolved?
    Thanx!

    if it's a message coming from your yahoo account, it means that your account has been compromised, not your phone itself. i would suggest changing the password for your email account

  • I want to bcc myself when sending mail from one account but not another. When I check "automatically bcc myself", it bcc's me from both accounts.  Can I set this to work with only one account?

    I have two mail accounts on my Mac.  I want one account to bcc me when I send emails from that account.  I checked "automatically bcc myself" under mail>preferences>composing, but both accounts bcc me when sending mail.  Can I set this to only bcc myself from one specific email account? Thanks.

    It does not make sense that your ssh does not have a dash capital Y (-Y) option. It is in "man ssh", and my 10.6.6 has the -Y option, and I've had a -Y option since at least Tiger (10.4) days.
    My ssh is in /usr/bin/ssh
    I'm not very good at X11 issues, so I'm just throwing ideas out there.
    Does your broken account have a $HOME/.ssh/config file, and if so, what is in it?
    Does the broken account have any $HOME/.x* or $HOME/.X* files that X11 might be reading to configure your X11 behavior differently from the new test account?
    $HOME/.Xauthority
    $HOME/.Xdefaults-<hostname>
    $HOME/.Xresources
    $HOME/.ICEauthority
    $HOME/.keymap.km
    The above are a few names I found looking through "man X"
    While I'm thinking about it, I assume that when going to the server, you are using the exact same user account on the server, so that you have a constant at least at that end.
    Have you tried trashing your
    $HOME/Library/Preferences/org.x.X11.plist
    file, to see if that is affecting the broken account?
    Again, I am just throwing out ideas to see if anything sticks.

  • 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

  • Sending mail automatically on date

    Hi,
    I am new to JavaMail. I am having a doubt that is there any method in JAVA that automatically send the mail on a particular day. For e-x, if i set the sentDate as tomorrow, it has to send the mail on tomorrow itself, not the day, when i composed the mail.i.e., composing the mail today and sending it later.

    No, there's no special method to do precisely that. And this question really has nothing to do with JavaMail. If you want a program that does something at a particular time, there are many ways of doing that. Most operating systems have a task scheduler that let you run jobs at specified times or frequencies, and there's a Timer class in Java if you need to code it yourself.

  • Workflow to send mail for purchase requisation and approval msg which automatically updates sap

    I am new to workflow,I need to create work flow for purchase requisation and send mail for concern person for approval,like if he clicks approve in mail ,automatically it should get updated in sap if he rejects then he should enter reason for rejection
    pls help...

    Hi Surya,
    SAP had provided you with a standard WF template for PR. You only have to activate it. The workflow template is WS20000077. In this what you have to do is, make all the tasks in this
    WF as a general task. For that go to each activity and double click on the task ID. Then from within the task go to menu Additional Data->Agent Assignment->Maintan. Then slect the task and press Attributes and select general task. This will ask for a customizing request. Do this for all task.
    The give event linkage by going to the Basic Data of the workflow and give binding. This will fulfill
    your requirement.
    Regards,
    Abijith

  • Configure sender in automatic e-mail for EWA

    Hi,
    I configured the automatic e-mail for EWA.
    How can I change the sender of the e-mail to a specific one or to an default?
    I already tried to set up the automatic e-mail with an other user but always my user is set as sender in the e-mail.
    Does anyone have an idea?
    Thanks for your help in advance.
    Regards,
    Alex

    Hi Alexander,
    Did you just change the SM: EXEC SERVICES owner now, or it was set to a different user all this time and the email was being sent in your name? 
    Either way, can you delete this job and re-add it with the correct sender so that we make sure you dont' have this incorrect Sender ID appearing again?
    Thanks,
    Mark

  • Automatic send a mail to vendor

    Dear SRM community,

    I can not send automatic a mail to the vendor. I use SRM 7.0 andprocess-controlled workflows with automatic approval.
    But I can send manuel over my purchase order in the portal to the vendor
    Please, can you help me?
    Thank advance.

  • ALV - is there a way to automatically send the ALV via e-mail

    Hi,
    I have a requirement to automatically send the ALV to an e-mail address.
    Is this possible to do by just using the ALV methods available ?
    Cheers
    Colin.

    Hi Colin,
    Check the weblog:
    /people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
    Check these link..
    http://www.sap-img.com/abap/sending-email-with-attachment.htm
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/789. [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    Have a look at below code:
    REPORT ZSENDEXTERNAL.
    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: TAB_LINES LIKE SY-TABIX.
    Creation of the document to be sent
    File Name
    DOC_CHNG-OBJ_NAME = 'SENDFILE'.
    Mail Subject
    DOC_CHNG-OBJ_DESCR = 'Send External Mail'.
    Mail Contents
    OBJTXT = 'Minimum bid : $250000'.
    APPEND OBJTXT.
    OBJTXT = 'A representation of the pictures up for auction'.
    APPEND OBJTXT.
    OBJTXT = 'was included as attachment.'.
    APPEND OBJTXT.
    DESCRIBE TABLE OBJTXT LINES TAB_LINES.
    READ TABLE OBJTXT INDEX TAB_LINES.
    DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    Creation of the entry for the compressed document
    CLEAR OBJPACK-TRANSF_BIN.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM = 0.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM = TAB_LINES.
    OBJPACK-DOC_TYPE = 'RAW'.
    APPEND OBJPACK.
    Creation of the document attachment
    (Assume that the data in OBJBIN is in BMP format)
    *OBJBIN = ' O/ '. APPEND OBJBIN.
    *OBJBIN = ' | '. APPEND OBJBIN.
    *OBJBIN = ' /  '. APPEND OBJBIN.
    *DESCRIBE TABLE OBJBIN LINES TAB_LINES.
    *OBJHEAD = 'PICTURE.BMP'.
    *APPEND OBJHEAD.
    Creation of the entry for the compressed attachment
    *OBJPACK-TRANSF_BIN = 'X'.
    *OBJPACK-HEAD_START = 1.
    *OBJPACK-HEAD_NUM = 1.
    *OBJPACK-BODY_START = 1.
    *OBJPACK-BODY_NUM = TAB_LINES.
    *OBJPACK-DOC_TYPE = 'BMP'.
    *OBJPACK-OBJ_NAME = 'PICTURE'.
    *OBJPACK-OBJ_DESCR = 'Representation of object 138'.
    *OBJPACK-DOC_SIZE = TAB_LINES * 255.
    *APPEND OBJPACK.
    Completing the recipient list
    RECLIST-RECEIVER = '[email protected]'.
    RECLIST-REC_TYPE = 'U'.
    APPEND RECLIST.
    *RECLIST-RECEIVER = 'SAPUSERNAME'.
    *RECLIST-REC_TYPE = 'P'.
    *APPEND RECLIST.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    TABLES
    PACKING_LIST = OBJPACK
    OBJECT_HEADER = OBJHEAD
    CONTENTS_BIN = OBJBIN
    CONTENTS_TXT = OBJTXT
    RECEIVERS = RECLIST
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    OPERATION_NO_AUTHORIZATION = 4
    OTHERS = 99.
    CASE SY-SUBRC.
    WHEN 0.
    WRITE: / 'Result of the send process:'.
    LOOP AT RECLIST.
    WRITE: / RECLIST-RECEIVER(48), ':'.
    IF RECLIST-RETRN_CODE = 0.
    WRITE 'The document was sent'.
    ELSE.
    WRITE 'The document could not be sent'.
    ENDIF.
    ENDLOOP.
    WHEN 1.
    WRITE: / 'No authorization for sending to the specified number',
    'of recipients'.
    WHEN 2.
    WRITE: / 'Document could not be sent to any recipient'.
    WHEN 4.
    WRITE: / 'No send authorization'.
    WHEN OTHERS.
    WRITE: / 'Error occurred while sending'.
    ENDCASE.
    Reward points if this Helps.
    Manish

  • Automatic deletion of users who are not responsible from sending mail list.

    Hi ,
    i have designed a workflow where mail will be sent to 5 users. my requirement is mails should be  deleted automatically from users who are nor resposible . please guide me.
    Thanks and regards.
    kasturi

    Hi,
    i have designed a workflow where mail will be sent to 5 users.
    Are you picking the 5 User via coding, If yes you can restrict in the coding
    my requirement is mails should be deleted automatically from users who
    are nor resposible .
    You mean to say you want to Send Mail to the User's who receive the Workitem.
    If yes, you can achieve via Extended Notification.
    If No, can you please explain your requirement?
    Regards,
    Surjith

  • Automatically sending e-mails

    I need help writing a script that will automatically send an e-mail when production quanitiy is below expectations.  Right now I have a script for sending an e-mail but its not automated.  It brings up the actually e-mail it's self and the user has to manually hit send.  I do not want them to have the option of not sending the e-mail.  Is there any way to do this??
    Please help!

    Then use this as the folder-level script:
    myMailMsg = app.trustPropagatorFunction(function(vTo, vSubject, vMsg){
        app.beginPriv();
        app.mailMsg({ bUI: false, cTo: vTo, cSubject: vSubject, cMsg: vMsg });
        app.endPriv();
    myTrustedMailMsg = app.trustedFunction(function(vTo, vSubject, vMsg) {
        app.beginPriv();
        myMailMsg(vTo, vSubject, vMsg);
        app.endPriv();
    And then you can call it like this:
    myTrustedMailMsg("[email protected]", "Subject Line", "Hi there!")

  • Automatic Assign account to send mail from?

    I have several accounts and would like to know if there is some way to send mail to certian individules from a specific account automatically?
    So If I create a "new" email addressed to John Smith MacMail will automatically choose to send that email using a predetermined email account, without having to choose it from the drop down menu?
    Is that possible?
    Thank you.

    I you select the inbox of the account you want to send from then create a new message it will send from that account.
    If you are hitting Reply then it will send from the account that particular email is in.
    There is a popup window right under Subject on the new or reply email that makes for quick and easy switching.

Maybe you are looking for