Unsubscribe throwaway emails after one bounce

While Apple just introduced it’s Hide My Email feature, throwaway emails have been a thing for quite a while. Throwaway email addresses allow people to create a temporary address for the purpose of signing up for something, and then deactivate that email address after they get what they want.

As a user of throwaway email addresses, it’s nice because you can disable an email address rather than unsubscribing, and you can also keep tabs on who is selling or losing your email address.

As an email sender, throwaway email addresses are sort of a bummer. You never really know who your subscriber is, and attempts to nurture leads tend to be stonewalled. Additionally, if you get alerts when emails start bouncing, it is incredibly annoying.

Below is Marketing Cloud’s bounce flow chart. Most likely, if a throwaway email is disabled, it will send back a soft bounce. If that is the case, Marketing Cloud will keep sending to it for 15 days before acknowledging that it is no longer a valid address.

I recently started receiving alerts for a 100% bounce rate from the domain deliveryexpress.33mail.com. I am not sure why I received a sudden influx of email address from this throwaway domain and why they were all disabled at the same time, but nonetheless, I wanted to make it stop.

It is possible to set up the suppression of entire domains in Marketing Cloud, but it requires the involvement of support. Additionally, I want to allow throwaway domains to receive emails up until the point that they disable that address. I personally have started using Apple’s Hide My Email, and I actually do want to get emails from those companies until I don’t.

However, I want to unsubscribe throwaway email addresses after their first bounce so that we don’t keep trying to email them for the next 15 days. Continuing to email them is a waste of super messages, and it unnecessarily increases the bounce rate.

The first step is to isolate these email addresses. At the same time I am going to change their status from “bounced” to “unsubscribed” from within the SQL query so that the resulting data extension is set up for my next step.

SELECT SubscriberKey, EmailAddress, 'unsubscribed' AS Status
FROM _Subscribers
WHERE domain LIKE '%deliveryexpress.33mail.com%'
AND Status = 'bounced'

As you start to notice throwaway domains in your organization, you can add ORs to the WHERE clause to capture all the throwaway domains.

The next step is to create a Script Activity in Automation Studio. Replace the DE External Key with External Key for the Data Extension populated by the query in step one.

<script runat="server">
    Platform.Load("core", "1.1.1");
try {

    var deKey = "ABEE928D-XXXX-XXXX-XXXX-XXXXXXXXXXXX", // add your DE key
        prox = new Script.Util.WSProxy(),
        objectType = "DataExtensionObject[" + deKey + "]",
        cols = ["subscriberkey", "emailaddress", "status"],
        moreData = true,
        reqID = null,
        numItems = 0;

    while (moreData) {
        moreData = false;
        var data = reqID == null ?
            prox.retrieve(objectType, cols) :
            prox.getNextBatch(objectType, reqID);

        if (data != null) {
            moreData = data.HasMoreRows;
            reqID = data.RequestID;
            if (data && data.Results) {

                for (var i = 0; i < data.Results.length; i++) {
                    var subkey = data.Results[i].Properties[0].Value,
                        email = data.Results[i].Properties[1].Value,
                        status = data.Results[i].Properties[2].Value;

                    var sub = {
                        SubscriberKey: subkey,
                        EmailAddress: email,
                        Status: status,
                        Lists: [{
                            ID: '21'
                        }]
                    };
                    var options = {
                        SaveOptions: [{
                            PropertyName: "*",
                            SaveAction: "UpdateAdd"
                        }]
                    };

                    var resp = prox.createItem("Subscriber", sub, options);

                    numItems++;
                }
            }
        }
    }


} catch (e) {
    //Write(Stringify(e));
} 
</script>  

Finally, if you want to isolate these emails address for a Contact Delete process, follow this script with a query to select all held and unsubscribed email addresses from this throwaway domain.

SELECT SubscriberKey, EmailAddress, Status
FROM _Subscribers
WHERE domain LIKE '%deliveryexpress.33mail.com%'
AND (Status = 'held' OR Status = 'unsubscribed')

You can then delete these throwaway email addresses in Contact Builder under All Contacts -> Delete contacts from data extension.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.