Adding a validation to just put in pending the emails to send in the creation of a case in gmail cases.
This commit is contained in:
jennydmz
2015-12-18 17:25:34 -04:00
parent 9956974498
commit 35dadba9b7
2 changed files with 8 additions and 7 deletions

View File

@@ -1017,14 +1017,17 @@ class wsBase
);
$oSpool->create( $messageArray );
$oSpool->sendMail();
if ($gmail != 1){
$oSpool->sendMail();
if ($oSpool->status == 'sent') {
$result = new wsResponse( 0, G::loadTranslation( 'ID_MESSAGE_SENT' ) . ": " . $sTo );
if ($oSpool->status == 'sent') {
$result = new wsResponse( 0, G::loadTranslation( 'ID_MESSAGE_SENT' ) . ": " . $sTo );
} else {
$result = new wsResponse( 29, $oSpool->status . ' ' . $oSpool->error . print_r( $aSetup, 1 ) );
}
} else {
$result = new wsResponse( 29, $oSpool->status . ' ' . $oSpool->error . print_r( $aSetup, 1 ) );
$result = "";
}
return $result;
} catch (Exception $e) {
return new wsResponse( 100, $e->getMessage() );

View File

@@ -124,8 +124,6 @@ if ($action == "draft"){
curl_setopt( $curlApp, CURLOPT_RETURNTRANSFER, true);
curl_setopt( $curlApp, CURLOPT_SSL_VERIFYPEER,false);
curl_setopt( $curlApp, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt( $curlApp, CURLOPT_FRESH_CONNECT, true);
curl_setopt( $curlApp, CURLOPT_TIMEOUT_MS, 1);
$curl_response_app = curl_exec( $curlApp );
curl_close( $curlApp );