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

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.)

Related

Building a simple web form that connects to Recurly's API to allow a subscriber to change their subscription plan

I am trying to build a simple web form that would ideally sit on a WordPress page to allow the subscribers on our platform to change or update their subscriptions, without having to ask our support team (currently they can only cancel, but we want to offer them the option to upgrade).
We use Recurly to manage our billing, and their support team said:
'You would essentially want to build a form that will input values into the Subscription Update API request, that would then be sent to Recurly to make the changes on your customer account.'
They also shared the following document: https://dev.recurly.com/docs/update-subscription
I have limited experience of working with APIs and am also aware that because this form deals with sensitive information (the user ID of a subscriber in this case), I don't want to inadvertently jeopardise the accounts of the subscribers that choose to do this.
Any help would be much appreciated. I have tried searching for a solution but am unsure how to word my request effectively.
It sounds like using the Recurly Hosted UI might be your best bet. Instead of having to build a a web form you can just redirect your customer to the Recurly Hosted UI on a button click. You can retrieve and redirect the url using the Recurly API on your Wordpress site using some simple PHP and then that allows the customer to view invoices, change their plan (if you allow), and change CC information.

Retrieving Azure AD Invitation Redemption URL after-the-fact

We have a Powershell script that creates some guest users using the New-AzureADMSInvitation cmdlet, and its return value has a handy-dandy InviteRedeemUrl property that we include in a nice welcome email to the user to get them started with setting their account up and using our application. This works fine when inviting individual or small numbers of users.
However, we'll need to do this for many users, and carefully control when the emails go out, and I can't see any other way of retrieving this URL after-the-fact... the only option seems to be the "Resend invitation" button on the guest user in AD, which sends a Microsoft-branded email from "Microsoft Invitations" with the redeem URL, which is kind of a problem... For marketing reasons we need to put the invite redeem URL in our own welcome email, so we don't want Microsoft sending out those emails.
Is there any way to retrieve or calculate that invitation URL after the guest user had already been invited? I know I could delete and recreate the invitation itself, but that's still a manual process and I'd like to be able to create guest users in bulk first, and then retrieve those URLs in bulk once we're ready to send out emails. Especially since Azure AD itself seems to be able to fetch the redeem URLs later on via the "Resend invitation" button.
Alternatively , you can think of adding you company branding in the verification and invitation mails in azure AD.
Here is something similar you can find:-
https://learn.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-faqs#how-do-i-customize-verification-emails-the-content-and-the-from-field-sent-by-azure-ad-b2c
Basically you need to change the company branding in Azure active directory to have your custom logo and text.
Hope it helps.
We ended up modifying the AD invitation script to store the InviteRedeemUrl value in our CRM as a field on the customer record. Then later on when our Marketing team wants to start their email campaigns, they could include a reference to this field in the email template just like they would any other field. This way, we got all our analytics on click/open rates and retained complete control over the emails, including where each batch was being sent from (so customers could reply to the correct support staff member for their segment).

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

How does gmail show "action" without email markup present?

This is the email I received from flipkart - https://gist.github.com/syst3mw0rm/b5fe25633aed78865a0b
When I check the above email using markup tester - https://www.google.com/webmasters/markup-tester
it says, it has no structured data. i.e, it has no email markup in it. How does gmail show "View Order" action then?
Here's the screenshot showing it - https://www.evernote.com/l/ANzpEoWx0gpOOIdRXSupqzqmiWlr0gS7RHc
This is an integration from Gmail that is placed in the email. See this link for how to do it: https://developers.google.com/gmail/markup/reference/order
This data is usually read at the server level and is not displayed in the source shown in the email received. So looking through that you would not see the markup, etc that called this button.
Here is a link for other available actions that can be done in gmail - https://developers.google.com/gmail/markup/reference/go-to-action
Also found this great answer as well: https://webapps.stackexchange.com/questions/47674/new-view-order-button-in-google-mail
It's based on a initiative called Schema.org. Google announced this
feature for Gmail in May 2013:
http://gmailblog.blogspot.dk/2013/05/take-action-right-from-inbox.html
Quotes from the post (emphasis and linkifying mine):
Email is an important part of how we get things done -- from planning
an event with friends to organizing that family vacation to Costa
Rica. And today, getting those things done is getting a little easier
with new quick action buttons in Gmail, designed to help you tackle
your digital to-do’s as quickly as possible. ... and ...
These buttons appear next to certain types of messages in your inbox
and let you take action on an email without ever having to open it.
For example, you can RSVP to your friend's party invitation or rate
that restaurant you went to last night all right from the inbox.
You’ll be checking things off that to-do list in no time. ... and ...
If you are a developer and want to add actions to your emails, check
out http://developers.google.com/gmail/schemas to learn more.

Unique "reference" for form response?

I just created a Google form for online enquiries for my business. I set it up so that it sends an email to the person who submits the form using the "FormEmailer" script but my question is, is there a way I can give that person or more specifically that FormEmailer generated email a unique "Reference" number at the time of submission?
Thanks in advance.
Dan
Absolutely, if you are willing to do some coding on your own.
You may want to look at the recently launched Form Notification add-on for Google Forms, which also sends emails to people who respond to a form. This add-on is meant to be a code sample, and you can find the source code on GitHub, and a quickstart about it in the Apps Script documentation.
To do what you are asking, you would just need to copy the code and add another "Reference number" field to the RespondentNotification template, and then modify the sendRespondentNotification() function accordingly. Alternatively, you can just insert the reference number into the email subject in that function.
Note that this add-on has some limitations: the number of emails sent out (like all of Apps Script) are subject to quota limits. In addition, the add-on isn't really meant used for forms with multiple collaborators/editors. However, Form Notifications should give you a good idea of how to write scripts that respond well to form submissions.