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
<?php | |
require_once('config.php'); | |
require_once "phar://iron_mq.phar"; | |
require 'vendor/autoload.php'; | |
//Get Post from SendGrid | |
$from = $_POST["from"]; | |
$subject = $_POST["subject"]; |
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
<?php | |
require_once "phar://iron_mq.phar"; | |
require_once('config.php'); | |
require 'vendor/autoload.php'; | |
//setup the queue | |
$ironmq = new IronMQ(array( | |
"token" => $config['iron']['token'], | |
"project_id" => $config['iron']['id'] |
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
//convert body to image | |
$imageUrl= file_get_contents("http://api.img4me.com/?text=".$urlbody."&font=arial&fcolor=000000&size=10&bcolor=FFFFFF&type=png"); | |
$imgName = $emailID.".png"; | |
file_put_contents('img/'.$imgName, file_get_contents($imageUrl)); | |
//html body to show | |
$htmlbody = "<img src=\"http://magicmail.io/img/".$imgName."\" />"; |
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
<?php | |
$file = $_POST["filename"]; | |
$im = imagecreatetruecolor(55, 30); | |
$white = imagecolorallocate($im, 255, 255, 255); | |
imagefilledrectangle($im,0,0,55,30,$white); | |
imagepng($im, 'img/'.$file); | |
imagedestroy($im); |
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 "ViewController.h" | |
@interface ViewController () | |
@end | |
@implementation ViewController | |
- (id)initWithCoder:(NSCoder *)aDecoder { |
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 <UIKit/UIKit.h> | |
#import <Parse/Parse.h> | |
@interface ViewController : PFQueryTableViewController { | |
NSString *List; | |
NSDictionary *params; | |
NSInteger counter; | |
NSInteger refresh; | |
} | |
- (IBAction)sendList:(id)sender; |
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
var sendgrid = require("sendgrid"); | |
sendgrid.initialize("SendGrid_Auth_User", "SendGrid_Auth_token"); | |
// Use Parse.Cloud.define to define as many cloud functions as you want. | |
// For example: | |
Parse.Cloud.define("hello", function(request, response) { | |
response.success("Hello world!"); | |
}); | |
Parse.Cloud.define("emailGrocery", function(request, response) { |
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
NSDictionary *params = [NSDictionary dictionaryWithObject:List forKey:@"text"]; | |
[PFCloud callFunctionInBackground:@"emailGrocery" withParameters:params block:^(id object, NSError *error){} ]; |
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
//create Email Object | |
sendgrid *msg = [sendgrid user:@"ApiUser" andPass:@"ApiKey"]; | |
//set parameters | |
msg.subject = @"email subject"; | |
msg.tolist = @[@"[email protected]", @"[email protected]"]; | |
msg.from = @"[email protected]"; | |
msg.text = @"hello world"; | |
msg.html = @"<html><body><h1>hello world</h1></body></html>"; | |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"log" | |
"github.com/sendgrid/sendgrid-go" | |
"regexp" | |
) |
OlderNewer