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.

Similar Messages

  • Sending MAIL on particular date in APEX 4.1

    Hello all,
    I want send mail automatically on the basis of a date column in my table. whenever that date is the current date of the system a mail should be sent to user?
    Please help me with this.

    Hello Pankaj,
    My approach will be as follows:
    <ul><li>
    Create a procedure to notify all the users whose say account expiry date matches system date i.e. sysdate
    procedure send_notification
    as
    begin
    for rec in (select EMP_ID, EMP_MAIL from EMP where ACCT_EXP_DT = SYSDATE)
    loop
         //call procedure to send mail to notify the expiry date
    end loop;
    end;</li><li>
    Now, schedule the above procedure to run every day at say 06:00 PM with the help of DBMS_SCHEDULER
    begin
    -- create a schedule
    -- daily from Monday to Sunday at 18:00 (06:00 p.m.) 
    dbms_scheduler.create_schedule (
    schedule_name    => 'INTERVAL_DAILY_1800', 
    start_date       => trunc(sysdate)+18/24, 
    repeat_interval  => 'FREQ=DAILY; BYDAY=MON,TUE,WED,THU,FRI,SAT,SUN; BYHOUR=18;', 
    comments         => 'Runtime: Every day (Mon-Sun) at 18:00 o''clock');
    -- Call the procedure to send mail 
    dbms_scheduler.create_program (
    program_name    => 'PROG_NOTIFY_ACCNT_EXP', 
    program_type    => 'STORED_PROCEDURE', 
    program_action  => 'SEND_NOTIFICATION', 
    enabled         => true, 
    comments        => 'Procedure to notify account expiry' );
    -- Connect both dbms_scheduler parts by creating the final job 
    dbms_scheduler.create_job (
    job_name       => 'JOB_NOTIFY_ACCNT_EXP', 
    program_name   => 'PROG_NOTIFY_ACCNT_EXP', 
    schedule_name  => 'INTERVAL_DAILY_1800', 
    enabled        => true, 
    auto_drop      => false, 
    comments       => 'Job to notify account expiry');
    end;</li></ul>
    If you are planning to use [url http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_mail.htm#CIHDIEJI]APEX_MAIL package to send mail and if you are using packaged procedure to send mail then take following in consideration:
    {message:id=10145867}
    Hope it helps!
    Regards,
    Kiran

  • 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

  • Re : send mail automatically

    Hi
    I had configured email setup for sales order creation and its working fine.
    Now my query is mail has to be sent automatically, at present mail triggers if i click in "SBWP - business work place"(sap-inbox).
    But i need to send mail automatically without making a click in SBWP.
    How to solve this.
    Thanks
    Anto

    Hi Antony!
    Did you try implementing the standard task and triggering it with the event as mentioned by Arghadip? Let us know whether this has resolved your problem or not.
    Regards,
    anwar.

  • Help required in triggering concept for sending mails automatically

    I am developing an application in which i had to develop an Auto Responder application. For this application i need to send different mails to different customers automatically on different days. Though i got the concept of using timers and the scheduling process from some of the developers, I think it is not suitable for our application because it is a standalone program and it needs to be executed seperately. I am not much sure of this mail application using timers and scheduling concept.
    So i need a different application where i can be using triggers in database so that it runs embedded in the application.. As per my idea i will be having two variables x and y in the database. X will be a fixed value which contains the no. of days after which a mail has to be sent to the customer.Y is a counter variable which is initialised to 0 and will be incremented daily(For this i wrote a trigger). Once x and y are equal mail should be sent automatically. But the problem is that i need to monitor this application continously. I don't know how to monitor this application. Therefore i request your help in this regard and tell me whether my idea is correct. If it is correct plz tell me how to do it and if possible send me an example.
    Thank you,

    I am developing an application in which i had to develop an Auto Responder application. For this application i need to send different mails to different customers automatically on different days. Though i got the concept of using timers and the scheduling process from some of the developers, I think it is not suitable for our application because it is a standalone program and it needs to be executed seperately. I am not much sure of this mail application using timers and scheduling concept.
    So i need a different application where i can be using triggers in database so that it runs embedded in the application.. As per my idea i will be having two variables x and y in the database. X will be a fixed value which contains the no. of days after which a mail has to be sent to the customer.Y is a counter variable which is initialised to 0 and will be incremented daily(For this i wrote a trigger). Once x and y are equal mail should be sent automatically. But the problem is that i need to monitor this application continously. I don't know how to monitor this application. Therefore i request your help in this regard and tell me whether my idea is correct. If it is correct plz tell me how to do it and if possible send me an example.
    Thank you,

  • Send mail on specific date and time

    Does anyone know how can I tell Mail to send a mail on a specific date and time?

    Mail won't do it by itself, but iCal will. Create an event at the specific date and time you want the mail sent. You will then need to create a simple applescript to send the desired email content to the desired recipient. Then instruct iCal to 'run script' at the desired time.
    Check out the applescript forum here on Apple Discussions for help with the applescript.
    It will be a FUN learning experience!

  • Sending mails automatically using trigger concept-Auto Responder

    I am developing an application in which i had to develop an Auto Responder application. For this application i need to send different mails to different customers automatically on different days. Though i got the concept of using timers and the scheduling process from some of the developers, I think it is not suitable for our application because it is a standalone program and it needs to be executed seperately. I am not much sure of this mail application using timers and scheduling concept.
    So i need a different application where i can be using triggers in database so that it runs embedded in the application.. As per my idea i will be having two variables x and y in the database. X will be a fixed value which contains the no. of days after which a mail has to be sent to the customer.Y is a counter variable which is initialised to 0 and will be incremented daily(For this i wrote a trigger). Once x and y are equal mail should be sent automatically. But the problem is that i need to monitor this application continously. I don't know how to monitor this application. Therefore i request your help in this regard and tell me whether my idea is correct. If it is correct plz tell me how to do it and if possible send me an example.
    Thank you,

    Hi,
    if u dont want use a standalone application , U can integrate ur schedular class (which i mentioned earlier ) using quartz ,
    go to this URL
    http://www.opensymphony.com/quartz/
    cheers
    Rajendra Bandi

  • HT1146 I want to send mail automatically (Without user interaction) in iOS6, Is it possible?

    Hi All,
    I want to send a photo through mail in iPhone5, But it is telling that it is not possible to do like this .
    Please guide me , how to handle this issue.
    -Thanks.

    Hi,
    Thanks for your replay.
    Here i need to send a photo with out tap on the "send" button . (So i dont want to see the "Cancel" and "Send" Buttons)
    PLease guide me.
    -Thanks.

  • Sending Mail after saving data in QA11

    Hi all,
    In QA11 my user will change or enter some quantity( to unrestricted use field )  in Inspection lot stock tab.
    Whenever they change or eneter  the quantity a mai(internal sap mail)l should be generated with the details of lot number,material code and quantity what they entered.
    How I can achieve this...
    Plz help me regarding this issue..
    Thanks in advance....
    Regards,
    Murthy.

    Hi ,
    Thanks for quick reply.
    I tried it, but its not triggering..
    I tried the following userexits also..QEVA0004,QEVA0005,QEVA0006,QEVA0007,QEVA0008,QEVA0009,QLCO0001,QSS10001.
    Could you tell me and BADI'a are there for this tcode QA11.
    thanks & regards,
    Murthy.
    Edited by: kan murthy on Sep 17, 2009 12:29 PM

  • 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 a mail automatically based on a date from ORACLE database

    Hi,
    I want to send a mail automatically based on a date from ORACLE database.
    Please help me.
    thanks
    --Sara                                                                                                                                                                                                                                   

    programs are available on net to send mail directly from oracle ie procedure s in oracle sending mails

  • Send e-mail automatically at specific date

    I need to send an e-mail to everyone automatically at their birthday. I am handling the SQL Server database through a winform C#. I need something that triggers an e-mail when the date associated with the e-mail address is the same as the server's time.
    Is there a way to do that? An example of code would be very appreciated!

    Hi,
    Refer below links.
    Configure Database Mail – Send Email From SQL Database
    Schedule a Job
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    Praveen Dsa | MCITP - Database Administrator 2008 |
    My Blog | My Page

  • 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

  • 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

  • Is it possible to have Thunderbird send an e-mail automatically when a message with a specific subject is received?

    Is it possible to have Thunderbird send an e-mail automatically when a message with a specific subject is received?
    I basically want to create a rule that will send an automatically crafted form e-mail to the sender when I receive an e-mail with the subject line "New Swimmer". Is this possible?

    Thank you Todd, I was able to get it to work but I do have a few more questions...
    1) When I tested this, at the top of the message, before any of the text I created, this showed up: This is a multi-part message in MIME format. --------------040406040801080102080500 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
    2) After the signature line, this showed up: --------------040406040801080102080500 Content-Type: image/jpeg Content-Transfer-Encoding: base64 Content-ID: /9j/4AAQSkZJRgABAQEAYABgAAD/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAEAAAAA AAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0K CgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwMDAwMDAwMDAwMDAwM DAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCAC5ApUDASIAAhEBAxEB/8QA HwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQID AAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6 Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/
    (It was actually much longer than that)
    Is there anyway that I can get that to go away? I obviously would prefer a nice, cleanly formatted e-mail to be sent just like I would send if I were creating it on the spot.
    Thanks,
    Evan

Maybe you are looking for

  • Requested protocol does not exist.

    Hello, I've compiled one the the connection demo's I've found (included below) I'm running it through kvm instead of the phone emulator. When running I get a: javax.microedition.io.ConnectionNotFoundException: The requested protocol does not exist ht

  • Property inspector not working in fireworks

    Hi folks, I am using Fireworks CS 5.1 on a MAC Pro. I haven't used Fireworks in ages but I can't for the life of me figure out where the Property Inspector has gone. I'm creating a very simple button. I put a simple line of text on my page, a box and

  • Mouse not working?

    I have an IMac bought new in 2009. I have a Logitech ergonomic mouse M510 which I've had for a few months, with no problems. I have Mountain Lion OS X 10.8.4. A new problem just started happening today or yesterday. You know when you are typing somet

  • Use Adobe Creative Suite CS4 with Windows 8.1 (64 BIT)

    Hello, could you please help me: I installed CS4 on my PC. But now im looking for a new PC, which I will buy in the next days. Is it possible to use the Creative Suite CS4 with a new PC, which has 64 Bit (Windows 8.1.)? ) Or should I buy a PC with on

  • BOM Prices for production...

    Hi Experts, My client activated the ML, They are following Actual costing...no Standard cost estimation... Now the reqirement is ..for one product they are having the multiple BOMs(With different combination of Raw materials), at the time of producti