Skip to content

Instantly share code, notes, and snippets.

View andreeacretu's full-sized avatar

Andreea andreeacretu

View GitHub Profile
@andreeacretu
andreeacretu / VBA Sendgrid
Created February 29, 2016 12:31 — forked from iolaru/VBA Sendgrid
VBA Sendgrid API example provided by user
Dim reportName As String
Dim path As String
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Dim oFile As Object
Dim strAttachments As String
Dim strTransPort As String
Dim byteData() As Byte
Dim xmlhttp As Object
Dim eTo As String
@andreeacretu
andreeacretu / gist:520b3f5f7ac3cb6433bd
Created February 29, 2016 12:31 — forked from iolaru/gist:05e115096f6e440e5698
Code example provided by user for sending emails with PDF attachments from Salesforce.com using Sendgrid API v2
global class SendGrid {
private static final String ENCODING = 'UTF-8';
private static final String API_URL = 'https://api.sendgrid.com/api/mail.send.json';
private transient String username;
private transient String password;
private transient String apikey;
private enum AUTHTYPE {KEY, USER_PASS}
private AUTHTYPE selAuthType;