Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 28 lines (19 sloc) 0.57 kb
323b100 @rkononov [#45]Refactor Email Example (master/slave, IronMQ, _ng, php) added PHP v...
rkononov authored
1 <?php
2 include("../IronCore.class.php");
3 include("../IronWorker.class.php");
4
5 $name = "emailWorker.php";
6
7 $iw = new IronWorker('config.ini');
8
9 //uploading worker
10 $iw->upload(dirname(__FILE__)."/workers/email_worker", 'emailWorker.php', $name);
11
12
13 $payload = array(
14 'host' => 'smtp.gmail.com',
15 'port' => 587,
16 'username' => 'username',
17 'password' => 'passw',
18 'from' => 'from@mail.com',
19 'to' => 'sample@mail.com',
20 'subject' => "Title",
21 'body' => "Hey it's a body"
22 );
23
24 //queueing task
25 $task_id = $iw->postTask($name, $payload);
26
27
Something went wrong with that request. Please try again.