mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-26 06:46:08 +03:00
Merge pull request #56 from jchamberlain/master
Don't require @ prefix for attachment filenames
This commit is contained in:
commit
d744b0a809
@ -169,7 +169,6 @@ class MessageBuilder
|
|||||||
|
|
||||||
public function addAttachment($attachmentPath, $attachmentName = null)
|
public function addAttachment($attachmentPath, $attachmentName = null)
|
||||||
{
|
{
|
||||||
if (preg_match("/^@/", $attachmentPath)) {
|
|
||||||
if (isset($this->files["attachment"])) {
|
if (isset($this->files["attachment"])) {
|
||||||
$attachment = array(
|
$attachment = array(
|
||||||
'filePath' => $attachmentPath,
|
'filePath' => $attachmentPath,
|
||||||
@ -186,9 +185,6 @@ class MessageBuilder
|
|||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
throw new InvalidParameter(INVALID_PARAMETER_ATTACHMENT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addInlineImage($inlineImagePath, $inlineImageName = null)
|
public function addInlineImage($inlineImagePath, $inlineImageName = null)
|
||||||
|
Loading…
Reference in New Issue
Block a user