sendgrid

AddAttachment from MemoryStream

和自甴很熟 提交于 2019-12-07 03:53:58
问题 The SendGrid API docs specify you can add attachments from a Stream. The example it gives uses a FileStream object. I have some blobs in Azure Storage which I'd like to email as attachments. To achieve this I'm trying to use a MemoryStream : var getBlob = blobContainer.GetBlobReferenceFromServer(fileUploadLink.Name); if(getBlob != null) { // Get file as a stream MemoryStream memoryStream = new MemoryStream(); getBlob.DownloadToStream(memoryStream); emailMessage.AddAttachment(memoryStream,

Can custom email headers trigger spam filters?

▼魔方 西西 提交于 2019-12-07 03:50:40
问题 We do a lot of mailing and we use Sendgrid to give it unique arguments and categories. But for storage, archiving, filtering and search capabilities, I would like to give them some other custom headers too, something like a json format of this array array('user' => 300, 'item' => 8842, 'country' => 'Croatia'); Now, is it possible for such custom headers to hurt the passthrough rate of our emails? In other words, is there a chance of our emails triggering spam filters due to having such custom

Laravel: Expecting response 250 but got “” with message “”

对着背影说爱祢 提交于 2019-12-07 02:07:22
问题 I continue to get this error from Laravel, but everything looks correct: Expecting response 250 but got "" with message "" From what I've been able to research, the problem occurs when sending email through Sendgrid (or any provider) and the receiving server responds with a blank code. Instead of passing along the blank code, SendGrid translates it into this; Sendgrid expects the 250 (every thing is okay) code, but gets nothing. I don't know how to fix this. I've come across a couple

SendGrid SMTP API: Multiple e-mails to the same recipient

爷,独闯天下 提交于 2019-12-07 00:21:34
问题 I have a web app that uses SendGrid's X-SMTP functionality to construct a single e-mail that is then merged and forwarded to a list of recipients specified in the X-SMTPAPI header. Documentation here: http://sendgrid.com/docs/API_Reference/SMTP_API/ I am using MVC.NET and sending the e-mail using a MailMessage object via smtp.sendgrid.net Everything seems to be working fine as far as merging values from the header and sending out the e-mails is concerned. However I have noticed that if I

sendGrid mail function not working in yii-framework

放肆的年华 提交于 2019-12-06 21:53:26
I used below code for sendGrid codes for sending mails from my project. require_once(YII_BASE_PATH . "/lib/sendgrid-php/SendGrid.php"); require_once(YII_BASE_PATH . "/lib/sendgrid-php/SendGrid_loader.php"); $sendgrid = new SendGrid('uname', 'pwd'); $mail = new SendGrid\Mail(); $mail->addTo('xxxxxxxxxx@gmail.com')-> setFrom('xxxyyyy5@yahoo.co.in')-> setSubject('Subject goes here')-> setText('Hello World!')-> setHtml('<strong>Hello World!</strong>'); $sendgrid->smtp->send($mail); I already downloaded the sendGrid package and put it into lib folder in yii. if I execute the above code i got error

Post Angular form data to Node.js with Sendgrid/Nodemailer

安稳与你 提交于 2019-12-06 18:38:24
问题 I have followed this example to post data from my Angular app to Node.js to post a webform to Sendgrid. This works fine after some changes and thanks a lot for the quickstart. Posting my form data to Sendgrid is working now! For this project i'm using Angular Fullstack to be able to use Node functionalities within my Angular app. However, this example has just input fields and a textarea. I want to be able to add a file (PDF, Docx, e.g) so that people can send an attachment to the recipient

adding sendgrid addon to my heroku django app

╄→尐↘猪︶ㄣ 提交于 2019-12-06 16:36:18
I have a django app hosted on heroku.I am using django-registration which sends validation email to a registering user.So ,I tried to add the sendgrid addon using heroku addons:add sendgrid but this fails with the following message Adding sendgrid:starter on myapp... failed ! Please verify your account to install this add-on ! For more information, see http://devcenter.heroku.com/categories/billing ! Verify now at https://heroku.com/verify It seems to go to a page which asks for my credit card info..Unfortunately I don't have one..Is it still possible for me to get this addon without having a

SendGrid: How to attach a file from Azure blob storage?

心不动则不痛 提交于 2019-12-06 11:28:25
I have blobs in Windows Azure blob storage that I'd like to attach to emails sent with SendGrid. I'd like to specify the file name for the attachment (real file names are just mumbo jumbo) which afaik forces me to add the attachment as a stream. My code looks like this: var msg = SendGrid.GetInstance(); // Code for adding sender, recipient etc... var storageAccount = CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings["storage"].ConnectionString); var blobClient = storageAccount.CreateCloudBlobClient(); var container = blobClient.GetContainerReference(typeName); var blob =

Sendgrid Java Not working in Maven

老子叫甜甜 提交于 2019-12-06 11:19:32
I am using https://github.com/sendgrid/sendgrid-java in my app. When I tried to run a sendgridexample.java its causing error InvocationTargetException and the root cause is java.lang.NoClassDefFoundError: org/apache/http/impl/client/HttpClientBuilder com.sendgrid.SendGrid.<init>(SendGrid.java:80) I am using maven. Is there anyone tried this in maven. I tried reaching the sendgrid support team but still didn't get any update regarding this. Can any one tell what is wrong with my code. Thanks in advance. SendGrid sendgrid = new SendGrid("API_KEY"); SendGrid.Email email = new SendGrid.Email();

Using SendGrid in a console application

百般思念 提交于 2019-12-06 11:09:57
Is it possible to use Send Grid in Console Application in C#? My code doesn't work and I really do not know why. Could you help me? using System; using System.Net; using System.Net.Mail; using SendGrid; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { // Create the email object first, then add the properties. var myMessage = new SendGridMessage(); myMessage.From = new MailAddress("adresfrom@example.com", "It's me"); myMessage.AddTo("adressj@gmail.com"); myMessage.Subject = "Testing the SendGrid Library"; myMessage.Text = "Content of the e-mail"; var username =