mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-30 00:46:04 +03:00
Removed pointless try and catch. None of the functions threw an exception and it was just rethrowing. Also Exception didn't exist in that namespace
This commit is contained in:
parent
33f3d27d7b
commit
34d8203262
@ -38,14 +38,11 @@ class Mailgun{
|
|||||||
return $this->post("$workingDomain/messages", $postData, $postFiles);
|
return $this->post("$workingDomain/messages", $postData, $postFiles);
|
||||||
}
|
}
|
||||||
else if(is_string($postFiles)){
|
else if(is_string($postFiles)){
|
||||||
try{
|
|
||||||
$tempFile = tempnam(sys_get_temp_dir(), "MG_TMP_MIME");
|
$tempFile = tempnam(sys_get_temp_dir(), "MG_TMP_MIME");
|
||||||
$fileHandle = fopen($tempFile, "w");
|
$fileHandle = fopen($tempFile, "w");
|
||||||
fwrite($fileHandle, $postFiles);
|
fwrite($fileHandle, $postFiles);
|
||||||
}
|
|
||||||
catch(Exception $ex){
|
|
||||||
throw $ex;
|
|
||||||
}
|
|
||||||
$result = $this->post("$workingDomain/messages.mime", $postData, array("message" => $tempFile));
|
$result = $this->post("$workingDomain/messages.mime", $postData, array("message" => $tempFile));
|
||||||
fclose($fileName);
|
fclose($fileName);
|
||||||
unlink($fileName);
|
unlink($fileName);
|
||||||
|
Loading…
Reference in New Issue
Block a user