Solved

automated emails

Posted on 2007-03-19
6
237 Views
Last Modified: 2010-03-31
was wondering how hard it would be, or even possible in java to automate emails at a specific time.

Mail client A at x time on y date

Mail client b at x time on y date


etc...
0
Comment
Question by:steadfast9661
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:suprapto45
ID: 18753329
Yep,

That should be doable. You should use a kind of Timer to do that. I think that Quartz should help you doing that.

http://www.opensymphony.com/quartz/

David
0
 

Author Comment

by:steadfast9661
ID: 18753954
is Java not capable of tracking time on its own? Any ideas on how i can get this started?
0
 
LVL 16

Expert Comment

by:suprapto45
ID: 18753972
Is this web application or Desktop Application (J2SE)? As far as I know, there is a Timer class in Java itself but I never used it.

I still prefer Quartz. Do you have any constraint(s) to use 3rd party lib?

David
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Author Comment

by:steadfast9661
ID: 18754136
desktop app, i can use anything i want. Its just for sending out patching notices to clients.
0
 
LVL 16

Accepted Solution

by:
suprapto45 earned 250 total points
ID: 18754238
I prefer Quartz on web application.

For desktop app, you can use Timer class which has been part of jdk 1.4.2.

This should get you started
http://www.exampledepot.com/egs/java.util/ScheduleLater.html?l=rel

David
0
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 250 total points
ID: 18756935
Yes, you can use the Timer class. For sending e-mails, you will need to download the Java mail API along with Java beans activation framework. Download from:

http://java.sun.com/products/javamail/

http://java.sun.com/products/javabeans/jaf/downloads/index.html

Have a look at the sample for sending e-mail:

http://www.exampledepot.com/egs/javax.mail/SendApp.html?l=new
 
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question