diff --git a/src/Mailgun/Connection/RestClient.php b/src/Mailgun/Connection/RestClient.php index 63f160b..1c18d12 100644 --- a/src/Mailgun/Connection/RestClient.php +++ b/src/Mailgun/Connection/RestClient.php @@ -96,7 +96,7 @@ class RestClient $builder->addResource($file['name'], $file['contents'], $file); } $body = $builder->build(); - $headers['Content-Type'] = 'multipart/form-data; boundary='.$builder->getBoundary(); + $headers['Content-Type'] = 'multipart/form-data; boundary="'.$builder->getBoundary().'"'; } elseif (is_array($body)) { $body = http_build_query($body); $headers['Content-Type'] = 'application/x-www-form-urlencoded'; diff --git a/src/Mailgun/RequestBuilder.php b/src/Mailgun/RequestBuilder.php index f5d5cf9..6df9a12 100644 --- a/src/Mailgun/RequestBuilder.php +++ b/src/Mailgun/RequestBuilder.php @@ -65,7 +65,7 @@ class RequestBuilder $multipartStream = $builder->build(); $boundary = $builder->getBoundary(); - $headers['Content-Type'] = 'multipart/form-data; boundary='.$boundary; + $headers['Content-Type'] = 'multipart/form-data; boundary="'.$boundary.'"'; return $this->getRequestFactory()->createRequest($method, $uri, $headers, $multipartStream); }