Skip to content

Development #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 74 additions & 5 deletions src/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,36 @@ public function getRecipient()
return $this->recipient;
}

/**
* Get the e-mail recipient.
*
* @return string
*/
public function getRecipientAttribute()
{
return $this->recipient;
}

/**
* Get the e-mail from.
*
* @return array
* @return string
*/
public function getFrom()
{
return $this->from;
}

/**
* Get the e-mail from.
*
* @return string
*/
public function getFromAttribute()
{
return $this->from;
}

/**
* Get the e-mail from address.
*
Expand Down Expand Up @@ -137,6 +157,16 @@ public function getCc()
return $this->cc;
}

/**
* Get the e-mail CC addresses.
*
* @return array
*/
public function getCcAttribute()
{
return $this->cc;
}

/**
* Get the e-mail BCC addresses.
*
Expand All @@ -147,6 +177,16 @@ public function getBcc()
return $this->bcc;
}

/**
* Get the e-mail BCC addresses.
*
* @return array
*/
public function getBccAttribute()
{
return $this->bcc;
}

/**
* Get the e-mail subject.
*
Expand All @@ -157,6 +197,16 @@ public function getSubject()
return $this->subject;
}

/**
* Get the e-mail subject.
*
* @return string
*/
public function getSubjectAttribute()
{
return $this->view;
}

/**
* Get the e-mail view.
*
Expand All @@ -177,6 +227,16 @@ public function getVariables()
return $this->variables;
}

/**
* Get the e-mail variables.
*
* @return array
*/
public function getVariablesAttribute()
{
return $this->variables;
}

/**
* Get the e-mail body.
*
Expand All @@ -187,6 +247,16 @@ public function getBody()
return $this->body;
}

/**
* Get the e-mail body.
*
* @return string
*/
public function getBodyAttribute()
{
return $this->body;
}

/**
* Get the e-mail attachments.
*
Expand Down Expand Up @@ -393,10 +463,9 @@ public function send()
*/
public function retry()
{
$retry = new static;
$retry = $this->replicate();

$retry->fill(array_merge(
$this->toArray(),
$retry->fill(
[
'id' => null,
'attempts' => 0,
Expand All @@ -406,7 +475,7 @@ public function retry()
'sent_at' => null,
'delivered_at' => null,
]
));
);

$retry->save();
}
Expand Down