sendgrid

SendGrid with dynamic PHP params

喜你入骨 提交于 2019-12-25 03:24:07
问题 Hi All I am trying to do is get a simple PHP contact form on my site to work. I am using bootstrap 3 and SendGrid. I can get it to send an email but I can not seem to get it to pass the contact form params to SendGrid to then send to me. This is what I have. I just don't understand why something so simple is so complicated. <?php $url = 'https://api.sendgrid.com/'; $user = 'XXXXXXXX'; $pass = 'XXXXXXXX'; $first_name = $_POST["firstname"]; $last_name = $_POST["lastname"]; $email = $_POST[

Sendgrid v3 not working for me with rails my_mailer.rb

余生颓废 提交于 2019-12-24 21:13:37
问题 I want to send a transactional mail via Sendgrid when a user registers (I use devise for authentication). I had this working fine in my_mailer.rb using SMTP as follows: def confirmation_instructions(record, token, opts={}) # SMTP header for Sendgrid - v2 # headers["X-SMTPAPI"]= { # "sub": { # "-CONFIRM_TOKEN-": [ # token # ] # }, # "filters": { # "templates": { # "settings": { # "enable": 1, # "template_id": "1111111-1111-1111-1111-111111111111" # } # } # } # }.to_json However, prompted by

PHP Parse Json from HTTP response & Foreach Iterate Array

僤鯓⒐⒋嵵緔 提交于 2019-12-24 12:25:34
问题 There are several focused questions on this topic but after trying them all I felt the need to seek out help. I am using Sendgrid, their webhook sends a json response and for some reason I have been unable to figure out how to integrate with our CRM. Update: 12/3/2015 @ 1:01pm - I got some code to work (probably not the most efficient but it works) see below. Example JSON from Sendgrid being sent: [ { "sg_message_id":"sendgrid_internal_message_id", "email": "john.doe@sendgrid.com", "timestamp

sendgrid username and password environment variables are not read when action mailer is executed

陌路散爱 提交于 2019-12-24 09:43:12
问题 expected: telnet smtp.sendgrid.net 587 EHLO AUTH LOGIN Enter username in Base64 Enter password in Base64 235 Authentication successful Actual: Via localhost config/environments/development.rb config.action_mailer.raise_delivery_errors = true config/environment.rb ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.smtp_settings = { address: 'smtp.sendgrid.net', port: 587, domain: 'example.com', user_name: ENV["SENDGRID_USERNAME"], password: ENV["SENDGRID_PASSWORD"], authentication:

Azure Function (JS) using SendGrid with attachment

孤街醉人 提交于 2019-12-24 08:26:10
问题 I want to send emails with attachment 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 }] };

Fix Postfix Authentication for Sendgrid? [closed]

久未见 提交于 2019-12-24 07:49:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm having trouble configuring Postfix to deliver e-mail via relay to Sendgrid. I get the following error: "Unauthenticated senders not allowed" 回答1: Looks like it was the SASL config within Postfix authenticating to Sendgrid. We were able to use the following: smtpd_sasl_local_domain = $myhostname smtpd

Node: Using a passthrough stream to Nodemailer

╄→гoц情女王★ 提交于 2019-12-24 02:17:16
问题 I'm generating a Word document using officegen that I then plan to attach to an email using Nodemailer (and Sendgrid). officegen outputs a stream, but I'd prefer to pass that straight through to the attachment rather than saving the Word document locally and then attaching it. // Generates output file docx.generate(fs.createWriteStream ('out.docx')); var client = nodemailer.createTransport(sgTransport(options)); var email = { from: 'email@here', to: user.email, subject: 'Test Email send',

Node js - send grid issue on sending basic email

戏子无情 提交于 2019-12-24 02:13:55
问题 Node js - send grid issue on sending basic email I've setup my node js server and need help with the setup. Error "cant set headers" This is my code: var express = require('express'); var router = express.Router(); var sendgrid = require('sendgrid')('IHaveAKey'); router.get('/', function(req, res) { res.sendStatus(200); }); router.get('/welcomeEmail/:email/:name', function(req, res) { var subject = 'Hello' + req.params.name; sendgrid.send({ to: 'test@hotmail.co.uk', from: 'noreply@test.com',

extra newlines in plain text emails sent via sendgrid

纵然是瞬间 提交于 2019-12-23 20:32:41
问题 We send emails in plain text from PHP using CodeIgniter (v1.7) and also PHPMailer (v5.1). Current production setup uses a cheapie SMTP relay, plan is to switch to a CritSend or SendGrid. We are testing the options now from a Rackspace Cloud server. When we use SendGrid SMTP all "\r\n" newlines in the emials end up being doubled up, so end up as "\r\n\r\n". All works fine when using CritSend SMTP and also two other SMTP servers. SendGrid tech support don't think it is anything to do with their

Can I have an image with a substitution tag in a SendGrid template?

三世轮回 提交于 2019-12-23 10:56:36
问题 I am creating a template in SendGrid and I was trying to put an image in the center, and the URL I would like to be a tag so I can substitute dynamically in my code, because it will come from my database. I tried to simply place a tag in the input field, but it doesn't accept that. Is there a way I can accomplish that? Thank you! 回答1: I assume that you have managed to trigger the SendGrid API via Node.js, since you're tagging the question with the Express tag. I'm currently trying to build