java 不通过服务器发送邮件,如何在不指定带有java的smtp服务器的情况下发送邮件?...

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).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值