Tag: gmail

使用Mandrill发送时是否可以指定我自己的Message-Id电子邮件标题?

我使用Mandrill发送电子邮件,我想自己设置消息ID。 我现在看到一个这样的ID: Message-Id: <30152892.20150311183809.55008b919f0c49.69649774@mail132-29.atl131.mandrillapp.com> 我试图做的是找出为什么Gmail不会将从Mandrill发送的消息分组到对话中。 也许这与Message-ID和In-Reply-To头有关。 我正在使用Mandrill Node API ,并且sendTemplate函数有一个设置headers的选项。 但是这不起作用,因为Mandrill显然覆盖了我的ID。

通过nodemailer的电子邮件发送到Gmail的垃圾邮件

我通过nodemailer发送邮件进入Gmail的收件箱,如果我从本地服务器运行,但进入Gmail的垃圾邮件,如果我从微软Azure服务器运行脚本。 以下是我的脚本 var nodemailer = require('nodemailer'); var EmailTemplates = require('swig-email-templates'); var smtpConfig = { service: 'smtp.office365.com', host: 'smtp.office365.com', port: 587, starttls: { enable: true }, secureConnection: true, auth: { user: 'xxxxx@yyyy.com', pass: 'zzzzzz' } } var templates = new EmailTemplates(); var transporter = nodemailer.createTransport(smtpConfig); var context = { username:'Rajesh', email:'xxxxx@gmail.com', link : 'www.google.co.in' }; templates.render('activate_email.html', […]

nodejs emailjs连接econnrefused,smtp

我的节点服务器启动正常,运行良好,直到我试图发送一封电子邮件与电子邮件js …这个exception被抛出: error : code 5 error : previous { [Error: connect ECONNREFUSED] code: 'ECONNREFUSED', errno: 'ECONNREFUSED', syscall: 'connect' } error : smtp undefined 我的代码: var ES = require('./email-settings'); var EM = {}; module.exports = EM; EM.server = require("emailjs/email").server.connect({ host : ES.host, user : ES.user, password : ES.password, ssl : true, port : 465 }); […]

节点服务器落在服务器上,但在本地运行良好

通过nodemailer发送邮件使用一个完美的谷歌帐户运行在本地运行,但在服务器上失败。 var smtpTransport = nodemailer.createTransport("SMTP", { service: "Gmail", auth: { user: "my email ", pass: "my pass" } });

如何在我的Node.js脚本中从我的Gmail帐户发送电子邮件?

app.get('/email', function(req,res){ var emailjs = require('emailjs'); var email_server = emailjs.server.connect({ host: 'smtp.gmail.com', ssl: true, tls: true, port: "465", user:'kateholloway@gmail.com', password:'mypassword', }); var h={ text: 'hey how you doing', from: 'Kate Holloway <kateholloway@gmail.com>', to: 'someonesemail@gmail.com', subject: 'where is your phone' }; var message = emailjs.message.create(h); email_server.send(message, function(err,message){ console.log(err); console.log(message); res.send('ok'); }); }); 这是正确的设置吗? 我得到的错误消息是: { [Error: […]

无法通过nodejs发送带有googleapis服务帐户和JWTauthentication的邮件

我试图发送一个电子邮件使用服务帐户和JWT身份validation,并不断获取和一个非常无益的消息错误: { code: 500, message: null } 此代码片段来自以下StackOverflow链接: 无法通过nodejs中的google api发送邮件 这似乎是解决scheme是将参数中的密钥更改为resource而不是message但它不适合我。 这很奇怪,因为在文档( https://developers.google.com/gmail/api/v1/reference/users/messages/send )中的JS示例中,它声称密钥仍然是message 我正在用身份validation var jwtClient = new google.auth.JWT(config.SERVICE_EMAIL, config.SERVICE_KEY_PATH, null, config.ALLOWED_SCOPES); 然后发送一封电子邮件 jwtClient.authorize(function(err, res) { if (err) return console.log('err', err); var email_lines = []; email_lines.push("From: \"Some Name Here\" <rootyadaim@gmail.com>"); email_lines.push("To: hanochg@gmail.com"); email_lines.push('Content-type: text/html;charset=iso-8859-1'); email_lines.push('MIME-Version: 1.0'); email_lines.push("Subject: New future subject here"); email_lines.push(""); email_lines.push("And the […]

在Cloud Foundry Node.js上发送Gmail SMTP电子邮件?

我有下面这个代码在本地工作,但是当我部署到api.cloudfoundry.com ,根本没有电子邮件发送。 你能帮我理解为什么吗? 是否因为Cloud Foundry阻止了某个端口? var port = (process.env.VMC_APP_PORT || 3000), host = (process.env.VCAP_APP_HOST || 'localhost'), http = require('http'), async = require('async'); var email = require("emailjs"); var server = email.server.connect({ user: "username", password:"password", host: "smtp.gmail.com", ssl: true }); // send the message and get a callback with an error or details of the message that […]

与节点的SMTP连接

我试图连接我的客户端到Gmail邮件服务器,而不使用特定的节点smtp库(我想了解如何套接字和smtp都工作),但设置连接到服务器后,我没有得到任何回应,无论我写给sockets。 这是我的代码的一部分: var options = { host: 'smtp.gmail.com', username: 'mylogin@gmail.com', password: 'mypass', port: 25 }, net = require('net'); exports.addEmail = function(req, res) { var client = net.connect(options.port, options.host, function() { console.log('CONNECTED TO: ' + options.host + ':' + options.port); //i can write to a socket anything, still no response client.write('HELO smtp.gmail.com'); }); client.on('data', function(data) { […]

使用node.js和google-api获取Gmail收件箱

我的代码如下(上面的代码与google开发人员网站中的nodejs示例中给出的代码相同)。 function listLabels(auth) { var gmail = google.gmail({ auth: auth, version: 'v1' }); var emails = gmail.users.messages.list({ includeSpamTrash: false, maxResults: 500, q: "", userId: 'me' }, function (err, results) { console.log(results.messages); }); } 我得到了包含ID和threadIds的对象数组 现在,如果我input这些ID 进入这些 function getMessage(messageId,auth) { var requestt = google.gmail({ auth: auth, version: 'v1' }).users.messages.get({ 'userId': 'me', 'id': messageId }); console.log(requestt) requestt.execute(function(response){ […]

哪个平台是GMail服务器端JavaScript运行的?

根据这个问题和这篇文章 ,GMail服务器端是用JavaScript编写的。 我想知道哪个平台是GMail服务器端JavaScript运行。 Node.js的? RingoJS?