//$response = AppInitHelper::simpleCurlPost('https://api.elasticemail.com/v2/email/send', $postData, (int)$this->timeout);
/* STUFF I ADDED START */
$ch = curl_init('https://api.elasticemail.com/v2/email/send');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, (int)$this->timeout);
curl_setopt($ch, CURLOPT_TIMEOUT, (int)$this->timeout);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_USERAGENT, 'MailWizz/' . MW_VERSION);
if (ini_get('open_basedir') == '' && ini_get('safe_mode') != 'On') {
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
}
$ipAddress123 = array('xxx.xxx',
'yyy.yyy',
'zzz.zzz',
'aaa.aaa',
'bbb.bbb',
'ccc.ccc');
shuffle($ipAddress123);
curl_setopt($ch, CURLOPT_INTERFACE, $ipAddress123[0]);
$body = curl_exec($ch);
$curlCode = curl_errno($ch);
$curlMessage = curl_error($ch);
$httpCode = 200;
if (!$curlCode && defined('CURLINFO_HTTP_CODE')) {
$httpCode = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE);
}
curl_close($ch);
if ($curlCode !== 0) {
$response = array('status' => 'error', 'message' => $curlMessage, 'error_code' => $curlCode, 'http_code' => $httpCode);
}
$response = array('status' => 'success', 'message' => $body, 'error_code' => 0, 'http_code' => $httpCode);
/* STUFF I ADDED END */