protected function sendPostmarkBatch($envios_preparados)
{
try {
$client = new PostmarkClient($this->postmarkToken());
$sendResult = $client->sendEmailBatchWithTemplate($envios_preparados);
} catch (PostmarkException $e) {
log_message('error', 'HTTP: ' . $e->httpStatusCode . ' MESSAGE: ' . $e->message . ' ERROR CODE: ' . $e->postmarkApiErrorCode);
$sendResult = new stdClass();
$sendResult->ErrorCode = $e->postmarkApiErrorCode;
} catch (Exception $generalException) {
log_message('error', 'GENERAL EXCEPTION: ' . $generalException);
$sendResult = new stdClass();
$sendResult->ErrorCode = '1';
}
return $sendResult;
}
protected function sendPostmarkBatch($envios_preparados)
{
$sendResult = new stdClass();
try {
$client = new PostmarkClient($this->postmarkToken());
$sendResult = $client->sendEmailBatchWithTemplate($envios_preparados);
} catch (PostmarkException $e) {
log_message('error', 'HTTP: ' . $e->httpStatusCode . ' MESSAGE: ' . $e->message . ' ERROR CODE: ' . $e->postmarkApiErrorCode);
$sendResult->ErrorCode = $e->postmarkApiErrorCode;
} catch (Exception $generalException) {
log_message('error', 'GENERAL EXCEPTION: ' . $generalException);
$sendResult->ErrorCode = '1';
}
return $sendResult;
}