Tag: sendgrid

使用SendGrid发送的电子邮件内容中的随机空格

我创build了用户注册时发送电子邮件的WebAPI。 电子邮件 问题 电子邮件内容中添加了随机空格 例如: api / account / authUser – api / account / a uthUser 我使用nodemailer和SendGrid作为电子邮件服务

发送网格 – 当我使用api发送电子邮件时,收到的电子邮件缺less所有devise,例如只显示文本

发送网格 – 当我使用api发送电子邮件时,收到的电子邮件缺less所有devise,例如只显示文本。 我正在使用javascript的节点js应用程序。 我拥有这一切与API的工作。 我只需要调用模板来包含图像。 是否有某种发送网格设置? 这是我使用的交易电子邮件。 我在下面的代码示例中调用ID。 它调用的模板很好,只是不包括图像和只有文本。 文档示例: var email = new sendgrid.Email(); email.addTo('example@domain.com'); email.subject = "Send with templates app"; email.from = 'from@example.com'; email.text = 'Hi there!'; email.html = '<h1>Hi there!</h1>'; // add filter settings one at a time email.addFilter('templates', 'enable', 1); email.addFilter('templates', 'template_id', '09c6ab89-9157-4710-8ca4-db7927c631d6'); 链接到文档: https : //github.com/sendgrid/sendgrid-nodejs 有任何想法吗? 提前致谢。

Sendgrid发送没有embedded代码的HTML电子邮件

我只想直接input我的HTML文件,input./blabla.html,而不是创build一个广告系列或模板。 有没有办法发送邮件没有把embedded式代码? 如果是这样,我会很高兴,谢谢! 我目前的代码如下所示: var helper = require('sendgrid').mail from_email = new helper.Email("blabla@hotmail.com") to_email = new helper.Email("heyhey@gmail.com") subject = "Merhaba !" content = new helper.Content("text/plain", "selam") mail = new helper.Mail(from_email, subject, to_email, content) } var sg = require('sendgrid').SendGrid("mysecretapikey") var requestBody = mail.toJSON() var request = sg.emptyRequest() request.method = 'POST' request.path = '/v3/mail/send' request.body = requestBody sg.API(request, […]

我如何发送与前端JavaScript的自动电子邮件?

有没有什么办法从纯前端JavaScript而不是node.js发送自动电子邮件? Mailgun,Maildrill和Sendgrid都只使用node.js或php? 没有服务器端代码可以做到这一点吗? 我需要这样做的原因是,我不知道如何将node.js添加到现有的网站项目中,而且node.js也非常混乱。 有什么build议么?

如何replaceSendgrid模板variables? (在node-js中)

这似乎是一个简单的参数,我错过了,但我很难搞清楚它是什么。 这是我用'@ sendgrid / mail'发送的请求: email.js: const sgMail = require('@sendgrid/mail'); function emailRequest() { msg = { to: 'test+10@gmail.com from: 'info@owner.io', subject: 'Receipt for Business Expenses', template_id: 'db6d11ae-41e4-4e1a-a71b-f5368eb21c9c', personalizations: [ { to: 'test+10@gmail.com, from: 'info@ownr.io, subject: 'Receipt for Business Expenses, template_id: 'db6d11ae-41e4-4e1a-a71b-f5368eb21c9c', substitutions: { ':firstname': 'Bobba', ':ordernumber': 'WHAAA', ':orderdate': 'today', ':ordertime': 'NOW!', }, custom_args: { ':firstname': […]

sendgrid:在电子邮件中添加cc

我使用sendgrid从我的应用程序发送电子邮件。 现在我想添加抄送或密件抄送,如果用户回复我的邮件。 我该怎么做呢。 让我先解释一下。 我发送用户反馈的答案出现在我的web应用程序上,使用我的应用程序让我说,我通过'noreply@mydomain.com'发送电子邮件,用户收到这封邮件在他/她的收件箱在Gmail /雅虎或任何其他电子邮件服务。 在这种情况下,用户可以点击回复这封邮件。 所以现在,你的':'包含'noreply@mydomain.com'的默认回复地址。 没关系。 现在我想添加'cc:'(抄送)如下'feedback@mydomain.com'。 这个怎么做?

是否可以通过SendGrid API发送批量预渲染电子邮件?

我检查了SendGrid API文档,并没有发现发送批量预渲染电子邮件的可能性。 这可能吗? 我想要做的是使用我自己的模板引擎来渲染单个电子邮件内容,然后将这些内容(包括收件人,主题和邮件正文)作为批量上传到SendGrid系统。 我可以发送交易邮件,但没有问题,但是对于大量的邮件来说,它现在太慢了。 我目前正在使用Node.js库https://github.com/sendgrid/sendgrid-nodejs

sendgrid的打字稿定义

我正在尝试编写一个使用sendgrid的打字稿应用程序,但与其他定义不同,我从打字input中find了typings install sendgrid –ambient一些typings install sendgrid –ambient引起了一些问题: 我能够像这样实例化客户端: import * as sendgrid from 'sendgrid'; import Email = Sendgrid.Email; import Instance = Sendgrid.Instance; … private client: Instance; … this.client = sendgrid(user, key); 然后在代码的后面,我试图发送一封电子邮件,这就是为什么ts迫使我导入电子邮件接口的第一位。 var email = new Email(); … this.client.send(email, (err, data) => { if (err) { throw err; } }); tslint不会抛出任何错误,但是当我构build和运行程序(或者只是我的testing),我得到这个: 摩卡爆炸了! ReferenceError:Sendgrid没有在Object中定义。 (/Users/chrismatic/codingprojects/weview/weview-node/build/server/components/mail/clients/sendgrid.js:4:13) 有没有人有一个工作实施展示,还是我必须写我自己的界面? […]

types错误:require(…)不是SendGrid NodeJS中的函数

我正尝试使用sendrid上的以下文档发送电子邮件: https://sendgrid.com/docs/Integrate/Code_Examples/v2_Mail/nodejs.html 我的app.js看起来像这样: var sendgrid = require('sendgrid')('SENDGRID_APIKEY'); 当runnig npm开始,我得到以下错误: var sendgrid = require('sendgrid')(conf); ^ TypeError: require(…) is not a function at Object.<anonymous> (C:\Users\Grandullon\Desktop\angular\app.js:8:36) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (C:\Users\Grandullon\Desktop\angular\bin\www:7:11) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) 任何想法我做错了什么? conf是我存储API密钥的variables。 我正在使用干净的快速安装。 谢谢 我的package.json可以在这里查看请求: […]

NodeJS Sendrgrid发送电子邮件给多个收件人的问题

我在向多个收件人发送邮件时遇到问题。 我的脚本是 var SendGrid = require('sendgrid').SendGrid; var sendgrid = new SendGrid('<<username>>', '<<password>>'); sendgrid.send({ to: 'nabababa@gmail.com', from: 'sengupta.nabarun@gmail.com', bcc: ["sengupta.nabarun@gmail.com","sengupta_nabarun@rediffmail.com"], 我在这里有两个问题 我可以列出收件人列表吗? 如何在密件抄送列表中有一个收件人数组? 与上述两个查询有关的解决scheme确实有帮助 谢谢Nabarun