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.
解决方案
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).