有人知道用于Java的邮件(SMTP)传递库吗? [英] Someone knows a mail (SMTP) delivery library for Java?

查看:145
本文介绍了有人知道用于Java的邮件(SMTP)传递库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想发送邮件,而不用担心用于传送的SMTP服务器。

I'd like to send mail without bothering with the SMTP-Server which is used for delivery.

所以 JavaMail API 对我来说不起作用,因为我必须指定要连接的SMTP服务器。

So JavaMail API doesn't work for me because I have to specify a SMTP server to connect to.

我想让图书馆通过查询邮件地址域的MX记录了解哪个SMTP服务器负责哪个电子邮件地址。

I'd like the library to find out on its own which SMTP server is responsible for which email address by querying the MX record of the mail address domain.

我正在寻找类似阿司匹林的内容。不幸的是,我不能使用阿司匹林本身,因为开发停止了2004年,并且库无法正确与现代垃圾邮件加密的服务器进行通信。

I'm looking for something like Aspirin. Unfortunately I can't use Aspirin itself because the development stopped 2004 and the library fails to communicate with modern spam hardened servers correctly.

可嵌入版本的 James 将完成任务。但是我没有找到有关这是否可行的文件。

An embeddable version of James would do the task. But I haven't found documentation concerning whether this is possible.

还是有人知道我可以使用的其他库吗?

Or does anyone know about other libraries I could use?

推荐答案

这是完全错误的处理方式。

This is completely the wrong way to handle this.

任何连接到互联网的人都会有某种合法的SMTP服务器可供他们提交电子邮件 - 您的ISP,您的办公室等。

Anyone connected to the internet will have some kind of "legit" SMTP server available to them to take the submission of email -- your ISP, your office, etc.

您想要利用,因为他们为您做了几件事情。

You WANT to leverage because they do several things for you.

1)他们承担您的信息并负责处理该消息。丢掉它后,这不是你的问题了。

1) they take your message and the responsibility to handle that message. After you drop it off, it's not your problem anymore.

2)任何邮件去垃圾邮件技术都由服务器处理。更好的是,当/如果这些技术发生变化(域密钥任何人),服务器处理它,而不是您的代码。

2) Any mail de-spamming technologies are handled by the server. Even better, when/if those technologies change (Domain keys anyone?), the server handles it, not your code.

3)作为发送的客户端邮件系统,已经有任何您需要与该服务器通话的凭据。主SMTP服务器通过身份验证,IP范围等进行锁定。

3) You, as a client of that sending mail system, already have whatever credentials you need to talk to that server. Main SMTP servers are locked down via authentication, IP range, etc.

4)您不是重新开发车轮。利用您拥有的基础架构。你在写一个应用程序还是一个邮件服务器?设置邮件服务器是一个通常很简单的日常任务。互联网上所有这些休闲笨的用户都设法获得电子邮件设置。

4) You're not reinventing the wheel. Leverage the infrastructure you have. Are you writing an application or a mail server? Setting up mail server is an every day task that is typically simple to do. All of those casual "dumb" users on the internet have managed to get email set up.

这篇关于有人知道用于Java的邮件(SMTP)传递库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆