Ignore guzzle certifcate error for dev environments
This commit is contained in:
parent
3ecd2c4ea0
commit
353a572c51
2 changed files with 18 additions and 1 deletions
|
@ -31,7 +31,22 @@ class Email
|
|||
$options->getOption('mjml_api_key'),
|
||||
$options->getOption('mjml_api_secret')
|
||||
);
|
||||
$html = $renderer->render($this->mjml);
|
||||
|
||||
$html = $this->mjml;
|
||||
|
||||
if (ENV_IS_DEV) {
|
||||
/**
|
||||
* Ignore SSL certificate errors
|
||||
*/
|
||||
try {
|
||||
$html = $renderer->render($this->mjml);
|
||||
} catch (\GuzzleHttp\Exception\RequestException $th) {
|
||||
error_log($th->getMessage());
|
||||
}
|
||||
} else {
|
||||
$html = $renderer->render($this->mjml);
|
||||
}
|
||||
|
||||
|
||||
$to = $this->to;
|
||||
$subject = $this->subject;
|
||||
|
|
|
@ -10,3 +10,5 @@ define('DATABASE_HOST', 'localhost');
|
|||
define('DATABASE_NAME', 'wishthis');
|
||||
define('DATABASE_USER', 'root');
|
||||
define('DATABASE_PASSWORD', '');
|
||||
|
||||
define('ENV_IS_DEV', false);
|
||||
|
|
Loading…
Reference in a new issue