aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes E-mail Information from a Java Program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "E-mail Information from a Java Program" Watch "E-mail Information from a Java Program" New topic
Author

E-mail Information from a Java Program

Dawson Irvine
Greenhorn

Joined: Dec 07, 2003
Posts: 9
Is there anyway I can get some strings from a Java Program e-mailed to me. I want to use this as a way from people sharing serials for my programs. My SMTP also requires a password to send e-mails. If you would like you can e-mail me a method that would work. I am a beginner after all. Any help would be great.


------------<br />Dawson Irvine<br />CEO - DNI Web Design<br /><a href="http://www.dniwebdesign.ca.tt" target="_blank" rel="nofollow">http://www.dniwebdesign.ca.tt</a>
don cline
Ranch Hand

Joined: Oct 10, 2003
Posts: 35
Absolutely there is. Check out
http://java.sun.com/products/javamail/index.html
Don
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9053
    
  12
Javamail is not beginner-type stuff.

I'm moving this to the Other Java APIs forum where Javamail stuff is discussed regularly.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Dawson Irvine
Greenhorn

Joined: Dec 07, 2003
Posts: 9
Yeah, I'm a beginner and have no clue about JavaMail.
Dawson Irvine
Greenhorn

Joined: Dec 07, 2003
Posts: 9
Here is what I want to use this for:
I have a program I just created.
I require a user to purchase a serial.
The user has to enter his name, e-mail and serial during "setup" which will then set everything needed and set a file so the program nows that it has been set up.
What I want now is after entering his name, e-mail and serial that it would be e-mailed to me so I can compare the data during purchase and now, seeing that he didn't give away his serial or crackers somehow got a serial.
As well my e-mail servers are POP3 and SMTP.
[ December 07, 2003: Message edited by: Dawson Irvine ]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Sending an email from a Java application is pretty easy.
I haven't read it, but over at JavaWorld, Tony Loton wrote an article title "JavaMail quick start" that looks promising as an easy guide to help get started.
If you're looking for other examples, you might want to try a quick search on this forum for the subject.
And below is an example from a past project I worked on. (If I recall correctly, this example borrows heavily from an example in Murach's book on Java Servlets and JSPs.)
[ December 07, 2003: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dawson Irvine
Greenhorn

Joined: Dec 07, 2003
Posts: 9
How come I get so many errors with the code you gave? Doesn't this need a free SMTP server or something? Any help or code without errors?
Dawson Irvine
Greenhorn

Joined: Dec 07, 2003
Posts: 9
Also what is with the:
import javax....
I don't think I have javax, do I?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: E-mail Information from a Java Program