一个简单的本地 SMTP 服务器 [英] A simple local SMTP server

查看:231
本文介绍了一个简单的本地 SMTP 服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想测试用于发送电子邮件的 Java 代码.我不想使用任何商业邮件客户端或连接到任何外部邮件提供商(如 Gmail 或 Yahoo).我想知道是否有任何软件可以让用户配置虚拟电子邮件地址和服务器(本地),它们可以在我的软件中用于发送和接收邮件.我只是想测试 Java 代码的功能.

I want to test a Java code for sending email. I don't want to use any commercial mail client or connect to any external mail providers (like Gmail or Yahoo). I would like to know if there is any software which allows a user to configure dummy email addresses and server (locally) which can be used in my software to send and receive mails. I just want to test the functionality of the Java code.

推荐答案

对于电子邮件测试,请尝试 Dumbster.从他们的页面:

For email testing, try Dumbster. From their page:

Dumbster 是一个非常简单的假 SMTP 服务器,专为单位和发送电子邮件的系统测试应用程序.它响应所有标准 SMTP 命令,但不向用户发送消息.消息存储在 Dumbster 中供以后提取和验证.

The Dumbster is a very simple fake SMTP server designed for unit and system testing applications that send email messages. It responds to all standard SMTP commands but does not deliver messages to the user. The messages are stored within the Dumbster for later extraction and verification.

Dumbster 很容易将其插入您的测试策略中.作为只要您的应用程序使用 SMTP 与电子邮件服务器通信,那么Dumbster 可用于测试应用程序,无需更改代码.

The Dumbster slots itself very easily into your testing strategy. As long as your application talks to an email server using SMTP then the Dumbster can be used to test the application with no code changes.

由于原始页面不再可用,因此存在各种分支:

Various forks exist since the original page is no longer available:

可以使用 Github 搜索

这篇关于一个简单的本地 SMTP 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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