Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 15, 2016
1 parent 7b1474d commit dc2ce4f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
5 changes: 4 additions & 1 deletion src/Illuminate/Mail/MailServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ public function register()
$mailer->alwaysTo($to['address'], $to['name']);
}

$replyTo = $app['config']['mail.reply-to'];
// If a "reply to" address is set, we will set it on the mailer so that each
// message sent by the application will utilize the same address for this
// setting. This is more convenient than specifying it on each message.
$replyTo = $app['config']['mail.reply_to'];

if (is_array($replyTo) && isset($replyTo['address'])) {
$mailer->alwaysReplyTo($replyTo['address'], $replyTo['name']);
Expand Down
22 changes: 11 additions & 11 deletions src/Illuminate/Mail/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ class Mailer implements MailerContract, MailQueueContract
protected $from;

/**
* The global to address and name.
* The global reply-to address and name.
*
* @var array
*/
protected $to;
protected $replyTo;

/**
* The global reply-to address and name.
* The global to address and name.
*
* @var array
*/
protected $replyTo;
protected $to;

/**
* The IoC container instance.
Expand Down Expand Up @@ -108,27 +108,27 @@ public function alwaysFrom($address, $name = null)
}

/**
* Set the global to address and name.
* Set the global reply-to address and name.
*
* @param string $address
* @param string|null $name
* @return void
*/
public function alwaysTo($address, $name = null)
public function alwaysReplyTo($address, $name = null)
{
$this->to = compact('address', 'name');
$this->replyTo = compact('address', 'name');
}

/**
* Set the global reply-to address and name.
* Set the global to address and name.
*
* @param string $address
* @param string|null $name
* @return void
*/
public function alwaysReplyTo($address, $name = null)
public function alwaysTo($address, $name = null)
{
$this->replyTo = compact('address', 'name');
$this->to = compact('address', 'name');
}

/**
Expand Down Expand Up @@ -436,7 +436,7 @@ protected function createMessage()
$message->from($this->from['address'], $this->from['name']);
}

// If a global reply-to address has been specified we will set it on every message
// When a global reply address was specified we will set this on every message
// instances so the developer does not have to repeat themselves every time
// they create a new message. We will just go ahead and push the address.
if (! empty($this->replyTo['address'])) {
Expand Down

0 comments on commit dc2ce4f

Please sign in to comment.