Your SlideShare is downloading. ×
hack princeton
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

hack princeton

177
views

Published on


1 Comment
0 Likes
Statistics
Notes
  • Free Download : https://www.mediafire.com/?8nz717bo19i6uv7
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Views
Total Views
177
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
1
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Hack Princeton Kunal Batra Developer Evangelist 11/08/13
  • 2. What is SendGrid ? • Cloud based SMTP email Provider – Transactional: Registration, forgotten passwords, account notifications. • Massively Scalable • Analytics on the emails you send – Unsubscribes, bounces …etc.
  • 3. Why not build it myself ? • Focus on your core application • Maintaining Email Infrastructure Sucks! – Costly, Time-consuming, Boring!! • 20% of legitimate email goes to spam
  • 4. Some of our APIs • • • • SMTP API Web API Parse Webhook (Cool!) Event Webhook
  • 5. Parse API Demo!! Take a photo of some Text && Send an email to: ocrthat@si.ht
  • 6. Take a Photo
  • 7. Parse Data from email //Get Post from SendGrid $from = $_POST["from"]; $subject = $_POST["subject"]; //Get Attached Image $fh = fopen('/tmp/parse.log', 'a+'); if ( $fh ) { fwrite($fh, print_r($_POST, true) . print_r($_FILES, true)); foreach ($_FILES as $key => $file) { move_uploaded_file($file['tmp_name'], "upload/".$file['name']); } fclose($fh); }
  • 8. Convert Photo to text $ocrapi = new Abby($config['abby']['app_id'], $config['abby']['password']); $docName = $ocrapi->convert($file['name']);
  • 9. Send reply email //Send reply email with attached text document $filePath = dirname(__FILE__).'/upload/'.$docName; $sendgrid = new SendGrid($config['sendgrid']['api_user'], $config['sendgrid']['api_key']); $mail = new SendGridMail(); $mail-> addTo($from)-> setFrom($config['sendgrid']['my_email'])-> setSubject('Re: '.$subject)-> setText($docName)-> setHtml($docName)-> addAttachment($filePath); $sendgrid->smtp->send($mail)
  • 10. Awesome Prizes- Retro NES/SNES Game Systems
  • 11. Ouya Gaming Console
  • 12. Mortal Kombat- 1993
  • 13. Assorted NES Games
  • 14. Hack.Sendgrid.com GO TO Hack.Sendgrid.com Sign up for a FREE account && Tweet @kunal732 with your SendGrid username to get setup.