цветник на могилу цветник на могилу
$mail->isHTML(true); $mail->Subject = $subject; $mail->msgHTML($emailTextHtml); // this will also create a plain-text version of the HTML email, very handy if(!$mail->send()) { throw new \Exception('I could not send the email.' . $mail->ErrorInfo); } $responseArray = array('type' => 'success', 'message' => $okMessage); } catch (\Exception $e) { // $responseArray = array('type' => 'danger', 'message' => $errorMessage); $responseArray = array('type' => 'danger', 'message' => $e->getMessage()); } // if requested by AJAX request return JSON response if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { $encoded = json_encode($responseArray); header('Content-Type: application/json'); echo $encoded; } // else just display the message else { echo $responseArray['message']; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)