在 Node.js 中接收电子邮件 [英] Receiving email in Node.js
本文介绍了在 Node.js 中接收电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我看到很多 Node.js 模块通过 SMTP 发送邮件.
I see a lot of Node.js modules out there that sends mail through SMTP.
但是有接收邮件的模块吗?
But is there a module to receive mail?
推荐答案
您正在寻找一个电子邮件客户端库.目前,有 2 个选项(如 here 所述):
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屋!
查看全文