Skip to content

Instantly share code, notes, and snippets.

View vacatrin's full-sized avatar

Victor vacatrin

  • Iasi
View GitHub Profile
@vacatrin
vacatrin / Sendgrid unsubscribe
Last active October 31, 2016 07:52 — forked from andreeacretu/Sendgrid unsubscribe
Add addresses from CSV file to SendGrid Global Unsubscribe list - Ruby script using APIv2 call
require 'rubygems'
require 'httparty'
require 'csv'
url = 'https://api.sendgrid.com/api/unsubscribes.add.json'
username = 'sg_username'
password = 'sg_passwd'
arr_of_addresses = []
# Opens the CSV from where you'll add the addresses to unsubscribe list