sendgrid

Send email as reply to thread

江枫思渺然 提交于 2019-12-03 16:47:38
I am using sendgrid to send emails when users are offline and cannot chat in realtime Problem that right now, when I send an email, it is always creating a new 'thread' in the recipient's email. I want to have a conversation thread I am using the Send HTTP endpoint https://sendgrid.com/docs/API_Reference/Web_API/mail.html Any ideas? Justin Steele Try the following: First, I assume you are tracking the conversation(s) somehow using a unique conversation id? If not, start doing this. You'll want to send in custom headers: Message-ID, In-Reply-To, and References. Below is some sample code using C

SendGrid SMTP API : Embed Image : Bad Request

北战南征 提交于 2019-12-03 16:32:26
I am using the sendgrid SMTP API https://github.com/sendgrid/sendgrid-csharp to send emails but I cannot figure out how to embed an image. I can do it using .Net native mail api without issues. I am simply getting a Bad Request. Here is my code that is throwing private static void Main(string[] args) { try { //// Create the email object first, then add the properties. var myMessage = new SendGridMessage(); contact_list = new List<MailAddress>(); contact_list.Add(new MailAddress("email@gmail.com")); myMessage.To = contact_list.ToArray(); myMessage.From = new MailAddress("clientservice@stpis.com

How to Add Custom variables to SendGrid email via API C# and Template

百般思念 提交于 2019-12-03 16:29:26
问题 I am trying to figure out how to add variables to existing template (example: Web Link Or Name dynamically) which has been created in sendgrid template engine, I am unsure how to do this using the SendGrid C# .NET libraries. I am wondering if anyone could help me. // Create the email object first, then add the properties. SendGridMessage myMessage = new SendGridMessage(); myMessage.AddTo("test@test.com"); myMessage.From = new MailAddress("test@test.com", "Mr test"); myMessage.Subject = " ";

Send emails using Sendgrid with google appscript

淺唱寂寞╮ 提交于 2019-12-03 14:04:39
问题 I am creating a googlesheet addon to send mails.And for sending mails I am using sendgrid. I cannot find any documentation or example code for sending mails with Google Appscript. This is the code I am using, but it is no good. var data = { "api_user":"username", "api_key":"ioioi", "to":[], "tonnage":[], "cc":[], "ccname":[], "bcc":[], "subject":sub, "from":from, "html":htmlBody } var headers = { "Accept":"application/json", "Content-Type":"application/json" }; data = JSON.stringify(data);

How to create custom email headers

梦想的初衷 提交于 2019-12-03 06:47:50
问题 I'm trying to create a custom email header to use the SendGrid api. Here's what I'm doing - but its not working: class Mailman < ActionMailer::Base default :from => "info@sample.com" def send_message(name, email, message) @name = name @email = email @message = message mail(:to => 'info@sample.com', :from => email, :subject => "Message from the site", :headers['X-SMTPAPI'] => "category: Drip Email" ) end end Any help appreciated. Thanks, Adam 回答1: You can use the #headers method of

How can i send emails without a server ? Only front-end Javascript with sendgrid or

非 Y 不嫁゛ 提交于 2019-12-03 05:58:57
i was wondering lately how i could send emails with only a front-end language like Javascript through Email as a Service apps like sendgrid or mandrill or so. Sendgrid and mandrill have Curl APIS, so basically i can just do an AJAX post request to their API to send a mail but the thing is, i will have to put my API secret key in the JS file, this means it will be public... while it's supposed to be secret. On those two apps, there's nothing in the docs concerning front-end use except having your own server which will use the API, but i'm currently on front-end based project. No server

How to Add Custom variables to SendGrid email via API C# and Template

那年仲夏 提交于 2019-12-03 05:40:07
I am trying to figure out how to add variables to existing template (example: Web Link Or Name dynamically) which has been created in sendgrid template engine, I am unsure how to do this using the SendGrid C# .NET libraries. I am wondering if anyone could help me. // Create the email object first, then add the properties. SendGridMessage myMessage = new SendGridMessage(); myMessage.AddTo("test@test.com"); myMessage.From = new MailAddress("test@test.com", "Mr test"); myMessage.Subject = " "; var timestamp = DateTime.Now.ToString("HH:mm:ss tt"); myMessage.Html = "<p></p> "; myMessage

Send emails using Sendgrid with google appscript

一世执手 提交于 2019-12-03 04:58:18
I am creating a googlesheet addon to send mails.And for sending mails I am using sendgrid. I cannot find any documentation or example code for sending mails with Google Appscript. This is the code I am using, but it is no good. var data = { "api_user":"username", "api_key":"ioioi", "to":[], "tonnage":[], "cc":[], "ccname":[], "bcc":[], "subject":sub, "from":from, "html":htmlBody } var headers = { "Accept":"application/json", "Content-Type":"application/json" }; data = JSON.stringify(data); var options = { "method": "POST", "payload": data, "headers": headers, "muteHttpExceptions": true }; var

How to create custom email headers

左心房为你撑大大i 提交于 2019-12-02 20:29:14
I'm trying to create a custom email header to use the SendGrid api. Here's what I'm doing - but its not working: class Mailman < ActionMailer::Base default :from => "info@sample.com" def send_message(name, email, message) @name = name @email = email @message = message mail(:to => 'info@sample.com', :from => email, :subject => "Message from the site", :headers['X-SMTPAPI'] => "category: Drip Email" ) end end Any help appreciated. Thanks, Adam You can use the #headers method of ActionMailer, I've edited your example to show how: class Mailman < ActionMailer::Base default :from => "info@sample

Setting Up Devise & Sendgrid on Heroku

﹥>﹥吖頭↗ 提交于 2019-12-02 15:15:51
My site is hosted on Heroku and I installed the Sendgrid Add-On as it looked almost too good to be true - but so far none of the email functionality is working. I have read the documentation and it clearly says just add-the add on - is more configuration required to get Devise working? When I select 'send me new password' I get a 404 page which makes me think there is more to this. Like how does Sendgrid know/where to use the pre-installed Devise templates? Thx. Lucas I just set up Devise and SendGrid this morning and have no problems. I'm going to resume the steps I took. First, install