@@ -24,6 +24,9 @@ It's main advantage is that the syntax is the same as the Laravel Mail component
24
24
- [Embedding Inline Images](#embedding-inline-images)
25
25
- [Scheduling](#scheduling)
26
26
- [Tagging](#tagging)
27
+ - [Campaigns](#campaigns)
28
+ - [Tracking](#tracking)
29
+ - [Dkim](#dkim)
27
30
- [Testmode](#testmode)
28
31
- [Catch all](#catch-all)
29
32
- [Custom Data](#custom-data)
@@ -33,8 +36,16 @@ It's main advantage is that the syntax is the same as the Laravel Mail component
33
36
34
37
Open your ` composer.json ` file and add the following to the ` require ` key:
35
38
39
+ ### Laravel 4.2 ###
40
+
41
+ "bogardo/mailgun": "v3.0.*"
42
+
43
+ ### Laravel 4.1/4.0 ###
44
+
36
45
"bogardo/mailgun": "v2.*"
37
46
47
+ ---
48
+
38
49
After adding the key, run composer update from the command line to install the package
39
50
40
51
``` bash
@@ -358,6 +369,66 @@ Mailgun::send('emails.welcome', $data, function($message)
358
369
359
370
> If you pass more than 3 tags to the ` tag ` method it will only use the first 3, the others will be ignored.
360
371
372
+ ### Campaigns ###
373
+ If you want your emails to be part of a campaign you created in Mailgun, you can add the campaign to a message with the ` campaign ` method.
374
+ This method accepts a single ID ` string ` or an ` array ` of ID's (with a maximum of 3)
375
+
376
+ ``` php
377
+ Mailgun::send('emails.welcome', $data, function($message)
378
+ {
379
+ $message->campaign('my_campaign_id');
380
+ //or
381
+ $message->campaign(array('campaign_1', 'campaign_2', 'campaign_3'));
382
+ });
383
+ ```
384
+
385
+ ### Tracking ###
386
+ You can toggle tracking on a per message basis.
387
+
388
+ ``` php
389
+ Mailgun::send('emails.welcome', $data, function($message)
390
+ {
391
+ $message->tracking(true);
392
+ //or
393
+ $message->tracking(false);
394
+ });
395
+ ```
396
+
397
+ #### Tracking Clicks ####
398
+ Toggle clicks tracking on a per-message basis. Has higher priority than domain-level setting.
399
+
400
+ ``` php
401
+ Mailgun::send('emails.welcome', $data, function($message)
402
+ {
403
+ $message->trackClicks(true);
404
+ //or
405
+ $message->trackClicks(false);
406
+ });
407
+ ```
408
+
409
+ #### Tracking Opens ####
410
+ Toggle opens tracking on a per-message basis. Has higher priority than domain-level setting.
411
+
412
+ ``` php
413
+ Mailgun::send('emails.welcome', $data, function($message)
414
+ {
415
+ $message->trackOpens(true);
416
+ //or
417
+ $message->trackOpens(false);
418
+ });
419
+ ```
420
+
421
+ ### DKIM ###
422
+ Enable/disable DKIM signatures on per-message basis. ([ see Mailgun Docs] ( http://documentation.mailgun.com/user_manual.html#verifying-your-domain ) )
423
+ ``` php
424
+ Mailgun::send('emails.welcome', $data, function($message)
425
+ {
426
+ $message->dkim(true);
427
+ //or
428
+ $message->dkim(false);
429
+ });
430
+ ```
431
+
361
432
### Testmode ###
362
433
You can send messages in test mode. When you do this, Mailgun will accept the message but will not send it. This is useful for testing purposes.
363
434
@@ -395,7 +466,9 @@ Mailgun::send('emails.welcome', $data, function($message)
395
466
});
396
467
```
397
468
398
- ### Email Validation ###
469
+ ---
470
+
471
+ ## Email Validation ##
399
472
Mailgun offers an email validation service which checks an email address on the following:
400
473
* Syntax checks (RFC defined grammar)
401
474
* DNS validation
0 commit comments