Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

E-mail Information from a Java Program

 
Dawson Irvine
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
don cline
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Absolutely there is. Check out
http://java.sun.com/products/javamail/index.html
Don
 
Marilyn de Queiroz
Sheriff
Posts: 9063
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Javamail is not beginner-type stuff.

I'm moving this to the Other Java APIs forum where Javamail stuff is discussed regularly.
 
Dawson Irvine
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, I'm a beginner and have no clue about JavaMail.
 
Dawson Irvine
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Dawson Irvine
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also what is with the:
import javax....
I don't think I have javax, do I?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic