sendgrid

send mails via sendgrid

喜欢而已 提交于 2019-12-12 18:41:14
问题 I'm trying to send mails via sendgrid, here my code : // Setup Swift mailer parameters $transport = Swift_SmtpTransport::newInstance('smtp.sendgrid.net', 25); $transport->setUsername($username); $transport->setPassword($password); $swift = Swift_Mailer::newInstance($transport); // Create a message (subject) $message = new Swift_Message($subject); // attach the body of the email $message->setFrom($from); $message->setBody($html, 'text/html'); $message->setTo($to); $message->addPart($text,

Sendgrid System.ArgumentException: Unknown element: html

强颜欢笑 提交于 2019-12-12 13:28:08
问题 I've just update the following packages to their latest version: a) SendGrid.SmtpApi updated to 1.3.1 b) SendGrid update to 6.0 and suddenly the WebTransport.Deliver method is not there anymore - no problem, I've switched to DeliverAsync method but now I get a very strange error, that it's supposed to be fixed since 2 years ago: System.ArgumentException: Unknown element: html This is part of the stack trace that can be of interest: System.ArgumentException: Unknown element: html at SendGrid

How to add headers in sendgrid?

守給你的承諾、 提交于 2019-12-12 12:26:31
问题 I'm trying to send a calendar invitation on outlook using php and sendgrid. So I need to create an ics file which is not the issue. The issue is that I need to set headers. Gmail recognizes the ics file as a calendar invitation but outlook does not. This is the entire code that I've come up with but I'm going nowhere in this. Please help. I've searched every blog to find out how I can add headers such as content-type and content-disposition in sendgrid but to no avail. <html> <head> <title

Trigger sendgrid template email using meteor

醉酒当歌 提交于 2019-12-12 11:01:27
问题 I am using sendgrid to send an email. I want to send template as an email to users. Below code is just sending the simple text based email instead of defining the headers part and using the template id. if (Meteor.isServer) { Email.send({ from: "from@mailinator.com", to: "abc@mail.com", subject: "Subject", text: "Here is some text", headers: {"X-SMTPAPI": { "filters" : { "template" : { "settings" : { "enable" : 1, "Content-Type" : "text/html", "template_id": "3fca3640-b47a-4f65-8693

How to convert EmailMessage alternate views into SendGrid Html and Text

岁酱吖の 提交于 2019-12-12 09:53:22
问题 I have an interface for sending mails public interface IMailSender { void SendMail(MailMessage message); } When I create a mail I use AlternateView for that (plain text and html) And now I would like to create a SendGridMailSender class that implements that interface, but my problem is that I don't know how to I populate the SendGrid.Html and SendGrid.Text based on the MailMessage. The only solution I could find means using a StreamReader and accesing the AlternateViewsCollection by index, I

SendGrid emailing API , send email attachment

99封情书 提交于 2019-12-12 09:34:54
问题 Am using sendgrid to send emails and it works fine using the following code but its without attachment. package sendgrid; import com.sendgrid.Content; import com.sendgrid.Email; import com.sendgrid.Mail; import com.sendgrid.Method; import com.sendgrid.Request; import com.sendgrid.Response; import com.sendgrid.SendGrid; import java.io.IOException; public class SendEmail { public static void main(String[] args) throws IOException { Email from = new Email("test@example.com"); String subject =

SendGrid SMTP API : Embed Image : Bad Request

时光怂恿深爱的人放手 提交于 2019-12-12 08:15:15
问题 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

Coldfusion CFMAIL and sendgrid

强颜欢笑 提交于 2019-12-12 07:27:24
问题 I have 2 clients on the same server that I host, that both send email through sendgrid.com (both have their own accounts). I was looking at reports on sendgrid and noticed that categories from "client 1" were showing up in a report for "client 2". I spent extensive time on the phone with sendgrid and they are telling me that a handful of emails 65 from a batch of 3000 for "client 1" show as being sent through "client 2"'s authenticated user. In my scripting, I use coldfusion cfmail and I

JasperReport Server email by Sendgrid

耗尽温柔 提交于 2019-12-12 03:46:23
问题 When trying to send email from JasperReport Server using Sendgrid it throws error 2016-05-22 05:27:20,212 ERROR ReportExecutionJob,quartzScheduler_Worker-1:349 - The job error notification was not completed. An error occurred while sending it. org.springframework.mail.MailSendException: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 550 Unauthenticated senders not allowed ; message exception details (1) are: Failed message 1: com.sun.mail.smtp.SMTPSendFailedException: 550

Unable to send emails on Azure Web App using Sendgrid

情到浓时终转凉″ 提交于 2019-12-12 03:14:30
问题 I am unable to send emails on a MVC4 Web App that I configured on Azure. I am being able to send emails locally on my machine, but when I upload the code to my azure app in the cloud, the mail delivery doesn't say it fails, but emails are not delivered, SendGrid doesn't report that the mail was sent on its dashboard either. Has someone ran into similar issues? Have looked into similar questions with no exact answer. I did follow the instructions of this article (https://azure.microsoft.com/en