Results 1 to 5 of 5
  1. #1
    chaitut715 is offline Member
    Join Date
    Mar 2012
    Posts
    1
    Rep Power
    0

    Default Sending E-Mail from Java at certain time

    Hi,
    I am developing event reminder web application. In this i need to send email for the user when ever he want. For example i want to send email before 2hrs(this is based on the user's request) of the event. Please help me.
    Thanks in advance.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    19

    Default Re: Sending E-Mail from Java at certain time

    You want a scheduler of some sort.
    You can either cron job it on whatever machine you're on to call your Java app or, if this is simply part of a running server application, use Quartz or similar to schedule a call to your emailing methods.
    Please do not ask for code as refusal often offends.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Sending E-Mail from Java at certain time

    1) Do you know how to send mail from Java?
    2) Do you know how to cause Java code to execute at a specified time, or after a specified delay?

    Oh and
    For example i want to send email before 2hrs
    I don't think even a quantum computer could accomplish that, unless moving at warp speed.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    19

    Default Re: Sending E-Mail from Java at certain time

    Quote Originally Posted by DarrylBurke View Post
    1) Do you know how to send mail from Java?
    I hadn't even thought of that possible problem...:)
    Please do not ask for code as refusal often offends.

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Sending E-Mail from Java at certain time

    Quote Originally Posted by Tolls View Post
    I hadn't even thought of that possible problem...:)
    I hadn't thought of
    0) Do you know how to compile a Java program?
    -1) Do you know how to write and save a Java source file?
    -2) ...
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 1
    Last Post: 04-04-2014, 03:25 PM
  2. Java Mail sending
    By jazz2k8 in forum Advanced Java
    Replies: 1
    Last Post: 05-01-2011, 06:08 AM
  3. problem with sending mail usin javaX.mail api
    By sandeepsai39 in forum New To Java
    Replies: 4
    Last Post: 11-25-2009, 05:37 AM
  4. Problem in sending mail from java
    By npoorni in forum Advanced Java
    Replies: 1
    Last Post: 06-30-2009, 04:09 PM
  5. Sending a mail with the local mail program
    By thedude in forum Advanced Java
    Replies: 2
    Last Post: 07-23-2007, 12:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •