How to send a dynamic template email to a mailing list on Sendgrid - sendgrid

I have a newsletter I'd like to send every other week to the same list of users. I have a link for new users to sign up, and I'd like to let users unsubscribe at the bottom of the bi-weekly email.
Is there a way to send to a mailing list instead of just an array of users on Sendgrid?
The best I've seen is that you can make one API call to a mailing list to get the emails, but it caps you by returning a maximum of 50 users.
I've also seen that you can specify lists in marketing campaigns, but apparently you can't use dynamic templates in those campaigns? So I'd have to manually extract the HTML.
This leads me to believe I'll need to request the version of the template I want with test_data, grab the HTML content from that, and manually insert it into a new campaign with the mailing list ID I want?
Any ideas? Is there a better way?

Related

how I can validate subscribers list?

I have list of subscribers from my old blog. Now I want to resubscribe users to my new blog. But when I upload list to MailChimp I've been banned. From support, I know that my list isn't clean, like lots of dead mails in it. How I can improve list quality to finally start sending mailings?
You may use email validation service, like mailcheck it's not unique service, but comparing to others they do contact enrichment. Like showing you Surname of yours prospect. It also could be helpful.

Does SendGrid support double opt-in as a feature?

Does SendGrid support double opt-in to Lists as a feature or is that something we will have to implement for ourselves?
https://sendgrid.api-docs.io/v3.0/contacts-api-recipients/add-recipients
It doesn't appear to me to be anywhere in the docs, but I thought I'd ask in case I missed it.
Not as of the current date; I asked their support staff and received the following answer:
Double opt-in needs to be implemented by you in the form/page you're subscribing your recipients. The confirmation email can be sent through SendGrid.
For Marketing Campaigns we have the SendGrid’s WordPress Subscription Widget that makes it easy for people visiting your WordPress site to subscribe to your marketing emails;
or Building a SendGrid Subscription Widget.
I got this answer from their support. It turns out we have to implement it by ourselves.
The double opt-in functionality is not something SendGrid provides as
we expect our customers to handle any opt-in practices on their side.
We apologize for any inconvenience.
SendGrid will be GDPR compliant by May, 25, 2018. Please note that
SendGrid does not – and does not currently have plans to – use servers
or data centers in the European Union to process email. Thus, SendGrid
cannot restrict data to the EU. However, neither current EU law nor
the GDPR require this. Instead, what is required is that SendGrid must
provide "appropriate safeguards" for data that it hosts and processes
on its US servers (see Art 46 of the GDPR here). SendGrid offers a
Data Processing Addendum (DPA) to provide such adequate safeguards,
which includes provisions for when GDPR goes into effect.
More info on GDPR can be found here. Our DPA can be reviewed and
signed by filling out the information here.
They do not support it. I asked support many times, which is a strange as it would seem a company of that size could spare the dev resources to build a feature that literally all of their customers need.
However, https://sgwidget.com is a third party product that provides double opt in functionality for Sendgrid accounts.
Full Disclosure: I am a developer at SG Widget.
No, indeed still today, they do not. Not in their forms, nor in their API is there simple, flip-switchable support for double opt-in. But, with email automation fairly recently implemented in their marketing services ("free" and "advanced" plans, not "essential") you can send an automated email directly upon sign-up.
My solution is to have 2 lists for new contacts, where one is a "pre-confirmation" list and the other being the "real" list. Here´s a way to use automation:
Create initial signup form, either via their sparse Web forms or via your own, using HTML/JS/PHP and API endpoint:
Create 2 separate lists, one for "pre-confirmation" emails and the other for people who confirm their addresses.
Make the form sign up new contacts to the first list, "pre-confirmation".
Create a marketing automation flow that triggers upon new signups to the "pre-confirmation" list. Make the automation trigger an email that contains a button or a link with the following link structure:
https://yoursite.com?email=user#email.com&passphrase=[phrase-you-set-manually]
where ?email= is your user´s email, substitute this in the email template/design by {{ Sender_Email }}
where &passphrase= is a phrase long enough to not be guessed. Since you only have one single email design here, and you can only enter one single phrase, unless you make a script or a hash, you make it difficult enough for people to think it was generated by a server :).
On your server/application, yoursite.com, use $_POST['email'] and $_POST['passphrase'], or whatever you name them, to validate the email clicks from your list and then enter all validated emails to the correct list using the PUT
/marketing/contacts endpoint.
you may also have to delete the user from the previous list, using DELETE
/marketing/lists/{id}/contacts, but I do think that the PUT /marketing/contacts takes care of placing the contact in only the lists specified in the list_ids field.
once the contact has been entered into the correct list, you can also have a marketing automation set up for that list, which sends him/her a welcome message.
This method takes care of double opt-in for SendGrid without using one single email credit from the Email API (transactional plan). The only catch is that we utilize one initial and one second/final list to achieve it.
Note: the initial sign-up message that here acts as the "confirm your email" message, will be tied to the first list and will require a marketing unsubscribe link in the footer. Make it clear in the bottom of the email that it is a temporary list, to not get any spam complaints. But it will not be an issue, as we wont be sending to anyone in that list except for this initial time. Unless you have a user who enters his/her email twice, after some time of inactivity when they forgot they already signed up. That could happen. But it´s a separate issue.
I think this is possible by switching the flow of a typical email subscriber. When the user clicks your subscribe button, instead of calling the sendgrid members/contact PUT api to add to your list, send an email with a link to a URL of yours that will then trigger the members/contact PUT api call.
Not sure what stack you are using but I was able to build something like this with next.js utilizing their api routes

Send mail to a particular user from subscriber list in Sendy API

I have multiple users in Subscriber list (suppose 10 users) and I want to send email to only one user from that list. I cannot create one list per user as I will need to generate report also. So how can I achieve this without making any changes in their core code.
Thanks

I would like to create a script for collecting multiple subscription requests and generating an e-mail notification

We have an existing website that is built on DNN. I would like to add a script to an existing page that collects a user's request for to subscribe to various e-mails we publish and then to generate an e-mail that idenfies those requested newsletter subscription titles. Any ideas?
Data springs has some good subscription tools available, check out their suite of modules.
If you want to just collect names and email addresses with a request, the DNN Form and List module will work just fine.
If you just want a "subscribe to our newsletter" type of link on your page, you could couple that with a modal popup that shows the form when the link is clicked(Here is an excellent tutorial: http://www.dnncreative.com/Tutorials/DNNTutorialsforAdministrators/EasilycreatePopupsusingdnnModalshow/tabid/679/Default.aspx that will show you how to do it.)

Integrating dynamic content into mass email

We're looking for the best way to integrate dynamic content into emails sent by various individuals (or companies) using various mass mailing systems, some of them proprietary.
What are the options to do that and what are the advantages and disadvantages?
For example, I guess that one of the options is to add an iframe to the emails. In this case the url for the iframe content will carry a token which will identify the specific email, and our system will generate the iframe content.
Any advice on the subject is highly appreciated.
Most email readers won't allow you to input dynamic content into emails. Unfortunately there's no way round this other than asking the users to click a link to get to the content (something I've seen done before).
Almost all email clients nowadays do not even download images from remote locations unless explicitly told to do so, let alone displaying iframes. So your best bet will be to ask users to click some link.
I created a multi threaded email mailer that has to generate unique content for each user. Each thread is creating the body of the email. Each section in the email has reference links to the detail page of that record inside the system