sendgrid

React unable to send email with SendGrid

廉价感情. 提交于 2020-03-05 03:21:52
问题 I am using react to send emails: const sgMail = require('@sendgrid/mail'); sgMail.setApiKey(process.env.REACT_APP_SENDGRID); const msg = { to: 'test@example.com', from: 'test@example.com', subject: 'Sending with SendGrid is Fun', text: 'and easy to do anywhere, even with Node.js', html: '<strong>and easy to do anywhere, even with Node.js</strong>', }; sgMail.send(msg); But I got the following error: Access to fetch at 'https://api.sendgrid.com/v3/mail/send' from origin 'http://localhost:3000'

SendGrid API for Android using Java

做~自己de王妃 提交于 2020-03-04 21:42:30
问题 Upon deep research, I was unable to integrate and send emails from SendGrid in the Android Application. SendGrid has Java API for sending emails but adding the dependency in Android Studio throws errors when a build is made. Also, there was a library by Dany Santiyago in GitHub but sadly it doesn't work too. It throws an error saying More than one file was found with OS independent path 'META-INF/LICENSE' I followed the guidelines in the question in Stack Overflow but again a new error came

SendGrid event notification authentication

醉酒当歌 提交于 2020-02-28 07:44:05
问题 I have setup an endpoint for sendgrid to send event notifications. However, the server is setup with basic authentication and the events don't come through because they are not authenticated. How can I authenticate these event webhooks by SendGrid or whitelist SendGrid? 回答1: You can use basic authentication when setting up the HTTP POST URL by setting it to a value like https://user:password@this.is.my.test/listening/endpoint Where "user" is the basic authentication user name and "password"

Sending dynamic variables in sendgrid v3 body using postman

冷暖自知 提交于 2020-02-25 07:01:48
问题 I am trying to send the emails via Sendgrid using v3 API using postman, I have created 3 separate variables in 3 different requests, I want to pass all those 3 variables in a single mail, for that I have used below sendgrid https://api.sendgrid.com/v3/mail/send with below body { "personalizations": [ { "to": [ { "email": "testing@test.com", "name": "API Testing" } ], "subject": "API testing successful" } ], "from": { "email": "noreply@testApi.com", "name": "API Testing" }, "content": [ {

SendGrid not working in Google app engine endpoints

你说的曾经没有我的故事 提交于 2020-01-26 03:57:09
问题 I need to send info to the google endpoint, which then sets up object with Sendgrid and then sends the email. The emails are not working, nothing is sent through from the app engine. Part of my endpoint code: @ApiMethod(name = "sendEmail") public sendEmailObject sendEmail(@Named("sendTo") String sendTo, @Named("sentFromClient") String sentFromClient, @Named("sendDescription") String sendDescription) { SendGrid sendgrid = new SendGrid(..., ...); SendGrid.Email email = new SendGrid.Email();

Fatal error when trying to send email using SwiftMailer and Sendgrid

蹲街弑〆低调 提交于 2020-01-24 10:31:06
问题 I'm getting this error when trying to send an email using swiftmailer and the sendgrid smtp Fatal error: *Uncaught exception 'Swift_TransportException' with message 'Expected response code 250 but got code "", with message ""'* Here's my code : $hdr = new SmtpApiHeader(); // Set all of the above variables $hdr->addTo($toList); $hdr->addSubVal('-name-', $nameList); $hdr->addSubVal('-time-', $timeList); // Specify that this is an initial contact message $hdr->setCategory("initial"); // The

Javascript Azure Function to send email using SendGrid

若如初见. 提交于 2020-01-24 00:51:05
问题 I want to send emails from an Azure function (Javascript) using SendGrid. I have done the following created a new AppSettings for SendGrid API Key SendGrid output binding set of Azure Function Following is my Azure Function module.exports = function (context, myQueueItem) { var message = { "personalizations": [ { "to": [ { "email": "testto@test.com" } ] } ], from: { email: "testfrom@test.com" }, subject: "Azure news", content: [{ type: 'text/plain', value: myQueueItem }] }; context.done(null,

Sendgrid Web API v3 different substitution value for each recipient

半城伤御伤魂 提交于 2020-01-23 01:18:05
问题 I want to send personalized emails with SendGrid. The whole body is similar, it's just 3-4 one-word-substitions in each mail, so I thought of using SendGrid substitutions Bob (bob@example.com) should get an Email saying "Hi Bob, lorem ipsum" Alice (alice@example.com) should get an Email saying "Hi Alice, lorem ipsum" The environment is a CodeIgniter-Installation using the provided PHP-Class installed by composer. The problematic function call is addSubstitution($key, $value), which leads to

Sending E-Mail through firebase functions

早过忘川 提交于 2020-01-21 15:13:25
问题 Its there a way to use an API like(sendgrid, mailgun) to send Email through Firebase cloud functions or it is considered as an Outbound connection? 回答1: Assuming you're asking because you're on the free Firebase plan. As explained on the Firebase pricing page: The Spark plan allows outbound network requests only to Google-owned services. Luckily, there is a Google-owned service that allows mail sending; Gmail! There is a quick-start sample available or a related StackOverflow answer, but the

Creating Outlook calendar invitations with SendGrid in Azure (C#, .NET)

久未见 提交于 2020-01-17 14:18:08
问题 Been trying to find an example on how to create and send Outlook calendar invitations via SendGrid service and found none. I need the invitations to arrive as Outlook native invites rather than attachments too. A simple example or a link to one will help a lot! 回答1: Recently had the same issue with Sendgrid through SMTP. Not the best, but working example: MailMessage mailMessage = new MailMessage(); mailMessage.From = new MailAddress(emailfrom); //from mailMessage.To.Add(new MailAddress