This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. git clone the repository | |
$ git clone http://github.com/username/yourawesomerepo.git | |
# 2. add your SendGrid/Twilio/Twitter/Giphy credentials | |
# 3. run azk start | |
$ azk start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Documentation: http://docs.azk.io/Azkfile.js | |
*/ | |
// Adds the systems that shape your system | |
systems({ | |
'sendgrid-parse-api-example': { | |
// Dependent systems | |
depends: [], | |
// More images: http://images.azk.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.post('/login', function(req,res) { | |
console.log('user email: ', req.body.email); | |
res.render('index', {title: 'Sent authentication email'}); | |
}); | |
app.get('/verify_email', function(req,res) { | |
console.log('verify_email token: ',req.query.token); | |
res.render('index', {title: 'Authenticating...'}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <SendGrid/SendGrid.h> | |
#import <SendGrid/SendGridEmail.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void SendSendgridEmailWebAPI () { | |
string url = "https://sendgrid.com/api/mail.send.json?"; | |
url += "to=" + toEmail; | |
url += "&from=" + fromEmail; | |
//you have to change every instance of space to %20 or you'll get a 400 error | |
string subjectWithoutSpace = subject.Replace(" ", "%20"); | |
url += "&subject=" + subjectWithoutSpace; | |
string bodyWithoutSpace = body.Replace(" ", "%20"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MailMessage mail = new MailMessage(); | |
mail.From = new MailAddress(fromEmail); | |
mail.To.Add(toEmail); | |
mail.Subject = subject; | |
mail.Body = body; | |
mail.Headers.Add("X-SMTPAPI", xsmtpapiJSON); | |
SmtpClient smtpServer = new SmtpClient("smtp.sendgrid.net"); | |
smtpServer.Port = 587; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(NSString* word in wordDictionary) | |
{ | |
if([word hasPrefix:appDelegate2.matchLetter] && [word isEqualToString:wordString]) | |
{ | |
return YES; | |
} | |
} | |
return NO; |
NewerOlder