GWM : email error

This commit is contained in:
Gowtham M 2025-08-20 18:14:11 +05:30
parent e10d56a717
commit 76dc03a9f7
2 changed files with 11 additions and 9 deletions

View File

@ -16,7 +16,7 @@ $routes->post('acs', 'SamlController::acs');
$routes->post('logout', 'SamlController::slo');
$routes->get('metadata', 'SamlController::metadata');
$routes->get('auth/msRedirectionHandler', 'AuthController::msRedirectionHandler');
$routes->group('api', ['filter' => 'appSignature'], function ($routes) {
@ -24,7 +24,7 @@ $routes->group('api', ['filter' => 'appSignature'], function ($routes) {
$routes->post('auth/login', 'AuthController::login');
$routes->get('auth/oauthClient', 'AuthController::oauthClient');
$routes->post('auth/oauthlogin', 'AuthController::oauthlogin');
$routes->get('auth/msRedirectionHandler', 'AuthController::msRedirectionHandler');
// MS OAuth api's
$routes->get('auth/mslogin', 'AuthController::mslogin');

View File

@ -659,13 +659,15 @@ if (!function_exists('send_email')) {
$attachments = [];
$filePath = WRITEPATH . 'pdf/trips/trip_' . $planData['plan_id'] . '.pdf';
if (!empty($filePath) && file_exists($filePath) && is_readable($filePath)) {
$attachments[] = [
"content" => base64_encode(file_get_contents($filePath)),
"mime_type" => "application/pdf",
"name" => basename($filePath)
];
if (!empty($planData)) {
$filePath = WRITEPATH . 'pdf/trips/trip_' . $planData['plan_id'] . '.pdf';
if (!empty($filePath) && file_exists($filePath) && is_readable($filePath)) {
$attachments[] = [
"content" => base64_encode(file_get_contents($filePath)),
"mime_type" => "application/pdf",
"name" => basename($filePath)
];
}
}
$payload = [