Tag: 节点制作者

Outlook中的HTML格式的msg格式

有没有任何纯粹的开源解决scheme直接从Javascript和/或NodeJSparsingOutlook味精格式? 我相信有必要在nodemailer中支持Outlook msg格式,它至less能正确parsingeml。 到目前为止,我找不到比依靠linux命令行更好的方法: 使用msgconvert linux命令从msg转到eml: sudo apt install -y libemail-outlook-message-perl cd /tmp msgconvert test\ with\ html\ content.msg # creates test\ with\ html\ content.eml 使用https://github.com/nodemailer/mailparser从eml获取信息,例如: git clone https://github.com/nodemailer/mailparser.git npm install cd mailparser/examples node extractInfoFromEml.js /tmp/test\ with\ html\ content.eml 下面是extractInfoFromEml.js的代码(只是simple.js,但接受一个参数。 'use strict'; const util = require('util'); const fs = require('fs'); const simpleParser = require('../lib/simple-parser.js'); const args […]

如何获取服务器的IP地址在nodejs中发送邮件

我正在使用nodemailer在nodejs中发送邮件。 我正在embedded超链接到mailbody它工作正常。 我的示例mailbody在下面 `This is confirmation mail.\n please click below link to login http://${req.headers.host}/login\n\n \n` 观察场景,如果我打开我的页面作为localhost:port它是发送邮件与localhost:port当我打开Ipaddress:port然后它与Ipaddress:port发送。 这里来了我的问题,我成功的邮件,现在我打开我的邮件在另一个系统,并从那里我点击链接,然后得到server can't be reached. 这是非常直接的,因为服务器正在另一台机器上运行,但我试图在与locahost不同的机器上打开。 那么我怎样才能发送邮件服务器的IP地址。 我也看到关于server.address().address但如何使用我感到困惑。