Skip to content

Commit

Permalink
Add 'from' support to MessageCreateOptions
Browse files Browse the repository at this point in the history
jm-mailosaur committed Sep 6, 2022
1 parent dedc76e commit 48d4e76
Showing 2 changed files with 24 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/Models/MessageCreateOptions.php
Original file line number Diff line number Diff line change
@@ -10,6 +10,12 @@ class MessageCreateOptions
*/
public $to = null;

/**
* @var string Partially overrides of the message's 'from' address. This **must** be an address ending
* with `YOUR_SERVER.mailosaur.net`, such as `my-emails @a1bcdef2.mailosaur.net`.
*/
public $from = null;

/**
* @var bool If true, email will be sent upon creation.
*/
@@ -39,6 +45,7 @@ public function __toArray()
{
return array(
'to' => $this->to,
'from' => $this->from,
'send' => $this->send,
'subject' => $this->subject,
'text' => $this->text,
@@ -56,4 +63,4 @@ public function toJsonString()
{
return json_encode($this->__toArray());
}
}
}
17 changes: 16 additions & 1 deletion src/Models/SearchCriteria.php
Original file line number Diff line number Diff line change
@@ -15,6 +15,21 @@ class SearchCriteria
*/
public $sentTo = null;

/**
* @var string The full email address to which the target email was sent.
*/
public $to = null;

/**
* @var string The full email address to which the target email was sent.
*/
public $cc = null;

/**
* @var string The full email address to which the target email was sent.
*/
public $bcc = null;

/**
* @var string The value to seek within the target email's subject line.
*/
@@ -52,4 +67,4 @@ public function toJsonString()
{
return json_encode($this->__toArray());
}
}
}

0 comments on commit 48d4e76

Please sign in to comment.