如何在 Spring Boot 中使用 Apache James 创建邮件服务器?

How to create Mail Server using Apache James in Spring Boot?

其实这个话题对我来说是新的。那么有人可以就这个话题提出建议吗?或者正确的工作路径。

必须创建自己的邮件服务器来处理测试邮件请求

例如用户名@.com

提前致谢。

**备注:

  • 您必须使用静态 IP。
  • 如果配置数据库,您只需创建空数据库。 Apache 自己创建相关 table。**
  • 在某些情况下,如果您正确配置了域和端口,那么在手动配置过程中它会自行获取值,无需您自己写下。

进程:

  • 从给定的 link:
  • 下载 Apache James 最新版本

http://james.apache.org/download.cgi

  • 解压并放入根文件夹 对于 windows、

c://program files/

  • 以管理员身份打开命令行。移动到以下路径, 对于 windows、

C:\Program Files\james-server-app-x.x.x\conf

  • 可选:默认它带有 Durby 数据库。但它可以支持其他各种。要使用您自己的数据库,
    • 创建一个空数据库。
    • 从给定路径打开数据库配置, 对于 windows、

C:\Program Files\james-server-app-3.5.0\conf\james-database.properties

- Replace following lines,
// Fill with your personal database configuration
  database.driverClassName=<database_driver>
  database.url=<database_url>
  database.username=<username>
  database.password=<password>

  // It define in above comments
  vendorAdapter.database=<vendor_name>
  • 可选:正如我们所知,Apache James 带有默认的 SMTP(25)、POP3(110)、IMAP 端口配置。您也可以根据需要更改它们。为此,您必须更改以下文件。

imapserver.xml or pop3server.xml or smtpserver.xml

  • 使用给定命令安装 Apache James(在 bin 文件夹)

james install

  • 使用给定命令启动 James

james start

  • 添加域

james-cli.bat -h 127.0.0.1 -p 9999 AddDomain <domain_name>

  • 添加用户

james-cli.bat -h 127.0.0.1 -p 9999 AddUser <user_name>
james-cli.bat -h 127.0.0.1 -p 9999 AddUser <user_name>

  • 现在安装 thunderbird

  • 像这样配置您的邮件 ID,

    添加姓名、电子邮件和密码,然后点击继续

  • 现在点击手动配置并放置相关值。

  • 点击完成

  • 尝试向第二个帐户发送邮件,希望它能成功。

    祝你有美好的一天...!!! :)