Click here to Skip to main content
15,888,968 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!

I am a beginner in java.

My project is a web project based on struts2 + spring + hibernate.

I want to send a mail without specifying java.

Almost Examples needs to specify the smtp server, but I want specify only 2 email addresses.

Please help me.
Posted
Comments
bbirajdar 10-Mar-13 12:39pm    
Just like a car which cannot be driven without gas/petrol , an email cannot be sent without SMTP server...
[no name] 10-Mar-13 12:39pm    
"to send a mail without specifying java", makes no sense at all.
"needs to specify the smtp server", yes and? You usually have to use a mail server to send mail...
"I want specify only 2 email addresses", okay so do that.
Not sure what kind of help you are asking for. You did not ask any kind of a question or describe any kind of a problem.

You might think you are only involving 2 systems here but there are at least 3.

When you send an email to a conventional email address, you are really sending it to a mail server. The protocol used to send to the server is (usually) SMTP. [The email server may or may not be the SMTP server.] When the recipient goes to read the message, it uses POP3 protocol to request any outstanding messages from the mail server.

Unless you invent your own mail protocol, you really can't get away from use of an SMTP server.

What I have described here is the SMTP/POP3 connection, which is the most popular, but not the only configuration. There are others (eg. IMAP, X.500, X.25, ...) but there are no common situations which involve two machines (exception: VMS Mail).

You really need to include an SMTP server somewhere (especially if you use the SMTP protocol).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900