-
Notifications
You must be signed in to change notification settings - Fork 624
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version Bump: v6.0.0: PR #408: Update Mail constructor to signify whi…
…ch parameters are required for sending all email
- Loading branch information
1 parent
e6f7c9e
commit 8db454e
Showing
6 changed files
with
45 additions
and
45 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,61 +21,55 @@ function helloEmail() | |
|
||
function kitchenSink() | ||
{ | ||
$mail = new Mail(); | ||
|
||
$email = new Email("DX", "test@example.com"); | ||
$mail->setFrom($email); | ||
$from = new Email("DX", "[email protected]"); | ||
$subject = "Hello World from the SendGrid PHP Library"; | ||
$to = new Email("Example User", "test1@example.com"); | ||
$content = new Content("text/plain", "some text here"); | ||
|
||
$mail->setSubject("Hello World from the SendGrid PHP Library"); | ||
$mail = new Mail($from, $subject, $to, $content); | ||
|
||
$personalization = new Personalization(); | ||
$email1 = new Email("Example User", "[email protected]"); | ||
$personalization->addTo($email1); | ||
$email2 = new Email("Example User", "[email protected]"); | ||
$personalization->addTo($email2); | ||
$mail->personalization[0]->addTo($email2); | ||
$email3 = new Email("Example User", "[email protected]"); | ||
$personalization->addCc($email3); | ||
$mail->personalization[0]->addCc($email3); | ||
$email4 = new Email("Example User", "[email protected]"); | ||
$personalization->addCc($email4); | ||
$mail->personalization[0]->addCc($email4); | ||
$email5 = new Email("Example User", "[email protected]"); | ||
$personalization->addBcc($email5); | ||
$mail->personalization[0]->addBcc($email5); | ||
$email6 = new Email("Example User", "[email protected]"); | ||
$personalization->addBcc($email6); | ||
$personalization->setSubject("Hello World from the SendGrid PHP Library"); | ||
$personalization->addHeader("X-Test", "test"); | ||
$personalization->addHeader("X-Mock", "true"); | ||
$personalization->addSubstitution("%name%", "Example User"); | ||
$personalization->addSubstitution("%city%", "Denver"); | ||
$personalization->addCustomArg("user_id", "343"); | ||
$personalization->addCustomArg("type", "marketing"); | ||
$personalization->setSendAt(1443636843); | ||
$mail->addPersonalization($personalization); | ||
|
||
$personalization2 = new Personalization(); | ||
$mail->personalization[0]->addBcc($email6); | ||
$mail->personalization[0]->setSubject("Hello World from the SendGrid PHP Library"); | ||
$mail->personalization[0]->addHeader("X-Test", "test"); | ||
$mail->personalization[0]->addHeader("X-Mock", "true"); | ||
$mail->personalization[0]->addSubstitution("%name%", "Example User"); | ||
$mail->personalization[0]->addSubstitution("%city%", "Denver"); | ||
$mail->personalization[0]->addCustomArg("user_id", "343"); | ||
$mail->personalization[0]->addCustomArg("type", "marketing"); | ||
$mail->personalization[0]->setSendAt(1443636843); | ||
|
||
$personalization1 = new Personalization(); | ||
$email7 = new Email("Example User", "[email protected]"); | ||
$personalization2->addTo($email7); | ||
$personalization1->addTo($email7); | ||
$email8 = new Email("Example User", "[email protected]"); | ||
$personalization2->addTo($email8); | ||
$personalization1->addTo($email8); | ||
$email9 = new Email("Example User", "[email protected]"); | ||
$personalization2->addCc($email9); | ||
$personalization1->addCc($email9); | ||
$email10 = new Email("Example User", "[email protected]"); | ||
$personalization2->addCc($email10); | ||
$personalization1->addCc($email10); | ||
$email11 = new Email("Example User", "[email protected]"); | ||
$personalization2->addBcc($email11); | ||
$personalization1->addBcc($email11); | ||
$email12 = new Email("Example User", "[email protected]"); | ||
$personalization2->addBcc($email12); | ||
$personalization2->setSubject("Hello World from the SendGrid PHP Library"); | ||
$personalization2->addHeader("X-Test", "test"); | ||
$personalization2->addHeader("X-Mock", "true"); | ||
$personalization2->addSubstitution("%name%", "Example User"); | ||
$personalization2->addSubstitution("%city%", "Denver"); | ||
$personalization2->addCustomArg("user_id", "343"); | ||
$personalization2->addCustomArg("type", "marketing"); | ||
$personalization2->setSendAt(1443636843); | ||
$mail->addPersonalization($personalization2); | ||
$personalization1->addBcc($email12); | ||
$personalization1->setSubject("Hello World from the SendGrid PHP Library"); | ||
$personalization1->addHeader("X-Test", "test"); | ||
$personalization1->addHeader("X-Mock", "true"); | ||
$personalization1->addSubstitution("%name%", "Example User"); | ||
$personalization1->addSubstitution("%city%", "Denver"); | ||
$personalization1->addCustomArg("user_id", "343"); | ||
$personalization1->addCustomArg("type", "marketing"); | ||
$personalization1->setSendAt(1443636843); | ||
$mail->addPersonalization($personalization1); | ||
|
||
$content = new Content("text/plain", "some text here"); | ||
$mail->addContent($content); | ||
$content = new Content("text/html", "<html><body>some text here</body></html>"); | ||
$mail->addContent($content); | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
*/ | ||
class SendGrid | ||
{ | ||
const VERSION = '5.6.2'; | ||
const VERSION = '6.0.0'; | ||
|
||
/** | ||
* | ||
|
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