sendgrid

Heroku, Django, and Sendgrid - emails not sending?

纵饮孤独 提交于 2021-02-19 08:48:08
问题 So I'm using heroku and sendgrid and think I have my settings.py configured correctly: EMAIL_HOST_USER = os.environ['SENDGRID_USERNAME'] EMAIL_HOST= 'smtp.sendgrid.net' EMAIL_PORT = 587 EMAIL_USE_TLS = True EMAIL_HOST_PASSWORD = os.environ['SENDGRID_PASSWORD'] I'm sending email using send_mail like this (using pre_save receiver to check if attribute has changed... also 'myemail@gmail.com' is replaced with my actual email): @receiver(pre_save,sender=LotteryEntry) def send_email_if_invited

Send mail with Nuxt trough Sendgrid

帅比萌擦擦* 提交于 2021-02-08 08:49:12
问题 I have a simple vuetify contact form and I want to send this forms by email. I have tried to use a method to send the email, but it does not work, because its on client side. So I get CORS issues. Here's my code: async send() { if (this.$refs.form.validate()) { try { const sgMail = require("@sendgrid/mail"); sgMail.setApiKey(process.env.SENDGRID_API_KEY); const msg = { to: "test@example.com", from: "me@mydomain.com", subject: "Sending with SendGrid is Fun", text: "and easy to do anywhere,

Create Campaigns in Sendgrid

你。 提交于 2021-01-29 09:24:49
问题 I am trying to create Campaigns by using Sendgrid V3 API. if i use Try it out tool it shows like Error message like "authorization required" even though Authorization Bearer value(API KEY) given, if i hit the same in Postman it gives error response like "access forbidden". Is this Sendgrid API Issue or am i missing anything? and one more question here is shall we try campaign related operations by using trial account? Note : Same API key is working fine for some other operations like List

Content not added to SendGrid template email before it is sent

拜拜、爱过 提交于 2021-01-28 08:47:56
问题 I am creating a script accessed by a button in Google Sheets that when clicked, sends emails. I want to use SendGrid to send my mails rather than Google's MailApp or Gmail . There is not a lot of documentation on how to use SendGrid with Google Apps Script. I need to use SendGrid templates, but when I pass it as a parameter, the sent message consists only of the header of the template and not the content. Why is this happening, and how can I resolve it? var SENDGRID_KEY ='My_key'; var headers

sendgrid : add cc in email

隐身守侯 提交于 2021-01-27 14:21:00
问题 I am sending email using sendgrid from my app. Now I want to add cc or bcc if user reply to my mail. How Do I do this. let me explain first. I am sending answer of user's feedback comes on my web application using my application let say I am sending email via 'noreply@mydomain.com', and user receive this mail in his/her inbox in gmail/yahoo or any other email service. In this case user may click reply to this mail. so now, yours 'To:' has contain 'noreply@mydomain.com' default reply address.

Error: read ECONNRESET at TLSWrap.onStreamRead

自闭症网瘾萝莉.ら 提交于 2021-01-27 14:11:55
问题 I am trying to send an email in my nodejs app using @sendgrid/email library but when I try to send an email I am getting the following error: { Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27) errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' } I tried the following code please have a look. const sgMail = require('@sendgrid/mail'); sgMail.setApiKey('***************************'); // API KEY sgMail.send({ to: email, from: 's*****@gmail.com',

How to parse form data using Azure Functions

对着背影说爱祢 提交于 2021-01-27 05:38:33
问题 I am trying to get form data within an Azure function. public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log) { log.Info("C# HTTP trigger function processed a request."); NameValueCollection col = req.Content.ReadAsFormDataAsync().Result; return req.CreateResponse(HttpStatusCode.OK, "OK"); } I am getting the following error: Exception while executing function: System.Net.Http.Formatting: No MediaTypeFormatter is available to read an object of type

Sendgrid not sending text to new line

寵の児 提交于 2021-01-27 02:23:49
问题 I am using sendgrid api with nodejs and for some reason the emails are sending but not adding new lines. I've used and also \n but no luck. Any idea what is wrong? Here is the code I am using var email = { to: 'test@gmail.com', from: 'hello@test.com', subject: 'Membership', text: 'Please view in html', html: 'Hello there!,</br>\n\n' + 'Please click on the following link, or paste this into your browser to complete the process:\n\n' + 'Welcome and thanks for joining.\n\n' + '</br>Your details

Sendgrid not sending text to new line

馋奶兔 提交于 2021-01-27 02:22:12
问题 I am using sendgrid api with nodejs and for some reason the emails are sending but not adding new lines. I've used and also \n but no luck. Any idea what is wrong? Here is the code I am using var email = { to: 'test@gmail.com', from: 'hello@test.com', subject: 'Membership', text: 'Please view in html', html: 'Hello there!,</br>\n\n' + 'Please click on the following link, or paste this into your browser to complete the process:\n\n' + 'Welcome and thanks for joining.\n\n' + '</br>Your details

Sendgrid to stop changing plain text links?

拟墨画扇 提交于 2021-01-05 07:21:06
问题 How to tell sendgrid to stop decorating plain text URLs? Using sendgrid SDK for Python, if that matters. sendgrid.SendGridClient(username, pwd) mail = sendgrid.Mail() mail.set_html(html_message) mail.set_text(text_message_with_urls) # <-- urls are here ... sendgrid_client.send(mail) For HTML-side this already has an answer: Is it possible to exclude links from tracking Tracking still needed for HTML parts of mails. 回答1: I contacted support and they informed me that I could use Clicktrack SMTP