在Node.js中接收电子邮件 [英] Receiving email in Node.js

查看:276
本文介绍了在Node.js中接收电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到那里有许多通过SMTP发送邮件的Node.js模块。

I see a lot of Node.js modules out there that sends mail through SMTP.

但是有一个接收邮件的模块吗?

But is there a module to receive mail?

推荐答案

您正在寻找电子邮件客户端库。当前,有2个选项(如此处所述):

You are looking for an e-mail client library. Currently, there are 2 options (as mentioned here):

  • node-imap (IMAP)
  • n3 (POP3, experimental)

我以前从未使用过它们,但是用法非常简单(根据文档)。 node-imap 似乎是更稳定的库,并且已针对gmail进行了测试。如果您的环境允许使用IMAP,我会坚持使用 node-imap

I never used them before, but usage is pretty straight forward (according to the docs). node-imap seems to be the more stable library and it has been tested against gmail. If IMAP is an option in your environment, i'd stick with node-imap.

这篇关于在Node.js中接收电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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