sendgrid

Sending email with attachments

梦想与她 提交于 2019-12-23 09:16:02
问题 I've got a mailer that as follows: class Payments::LateNoticesMailer < AsyncMailer def notice(payment_id) @payment = PaymentDecorator.find(payment_id) @invoice = @payment.invoice template = "payments/invoices/#{@payment.made_with_type.downcase}/show" attachments["#{@payment.invoice_filename}.pdf"] = WickedPdf.new.pdf_from_string( render_to_string( pdf: @payment.invoice_filename, formats: [:pdf], template: template, layout: "layouts/pdf.html")) mail to: @payment.payer_email, from: '

SendGrid throwing InvalidApiRequestException in sending email

这一生的挚爱 提交于 2019-12-23 03:08:14
问题 SendGrid is throwing an InvalidApiRequestException when sending an email. I am using this code: public Task SendEmailAsync(string email, string subject, string message) { // Plug in your email service here to send an email. var myMessage = new SendGrid.SendGridMessage(); myMessage.AddTo(email); myMessage.From = new MailAddress("varshney@shobhit.com", "Shobhit", System.Text.Encoding.Default); myMessage.Subject = subject; myMessage.Text = message; myMessage.Html = message; var credentials = new

adding sendgrid addon to my heroku django app

可紊 提交于 2019-12-23 02:33:04
问题 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

“ImportError: No module named smtpapi” for SendGrid in Google App Engine

心不动则不痛 提交于 2019-12-23 02:30:44
问题 I'm trying to setup SendGrid with Google App Engine using python, following the instructions here: https://developers.google.com/appengine/docs/python/mail/sendgrid I can successfully use the sample app to send mail: https://github.com/sendgrid/google-python-sample-app but this is based on older sendgrid python code, and I'd like to use the latest version: https://github.com/sendgrid/sendgrid-python/tree/master/sendgrid I tried following the guidance here: sendgrid google app engine python

Using the Indy TidHttp component to send email file attachments through sendgrid

。_饼干妹妹 提交于 2019-12-22 11:03:35
问题 I am using the Indy TIdHTTP component and am successfully able to send emails via the sendgrid API using the following function. The sendgrid api documentation can be found here. Now I am tasked with including file attachments. In the API documentation it states: The file contents must be part of the multipart HTTP POST I have attempted to modify my function to include the TIdMultipartFormDataStream with no success. How should I modify the code to support file attachments? procedure

Adding Array Data to Sendgrid Templates

落花浮王杯 提交于 2019-12-22 07:55:12
问题 I want to send an invoice email with data unique to each user with Sendgrid. This seems like something so simple that no one has thought to include directions on how to do this. Within the email I want to populate four columns with 'N' rows with an array like: [{date: 05/05/15, amount: $30, user: abc123, type: A}, {date: X, amount: Y, user: Z, type: B} . . . ] I don't understand how I create this template or where this template is supposed to exist for me to call it to populate for a given

Adding Array Data to Sendgrid Templates

拟墨画扇 提交于 2019-12-22 07:55:11
问题 I want to send an invoice email with data unique to each user with Sendgrid. This seems like something so simple that no one has thought to include directions on how to do this. Within the email I want to populate four columns with 'N' rows with an array like: [{date: 05/05/15, amount: $30, user: abc123, type: A}, {date: X, amount: Y, user: Z, type: B} . . . ] I don't understand how I create this template or where this template is supposed to exist for me to call it to populate for a given

Is it possible to to send bulk pre-rendered email via the SendGrid API?

家住魔仙堡 提交于 2019-12-21 23:32:43
问题 I checked the SendGrid API docs, and didn't find a possibility to send bulk pre-rendered emails. Is this possible? What I want to do is use my own templating engine to render the individual email content, and then upload these (including recipient, subject and the mail body) as bulk to the SendGrid systems. I can send transactional mails without a problem, but it's currently too slow for large amounts of mails. I'm currently using the Node.js library https://github.com/sendgrid/sendgrid

Is it possible to exclude links from tracking

左心房为你撑大大i 提交于 2019-12-21 07:14:15
问题 I am building an app which is utilizing Sendgrid Marketing Email API, with the purpose of sending newsletters. It has a number of links to articles, but also banner ads and other service links. We would obviously like to keep tracking of article links, but exclude other links from affecting the click rate. Is it possible in any way to mark links which we don't wish to add to tracking? 回答1: Minor thread necromancy to let anyone who gets here via google know that they added an attribute to

Setting Up Devise & Sendgrid on Heroku

让人想犯罪 __ 提交于 2019-12-20 08:39:49
问题 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. 回答1: I just set up Devise and