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->post('logout', 'SamlController::slo');
$routes->get('metadata', 'SamlController::metadata'); $routes->get('metadata', 'SamlController::metadata');
$routes->get('auth/msRedirectionHandler', 'AuthController::msRedirectionHandler');
$routes->group('api', ['filter' => 'appSignature'], function ($routes) { $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->post('auth/login', 'AuthController::login');
$routes->get('auth/oauthClient', 'AuthController::oauthClient'); $routes->get('auth/oauthClient', 'AuthController::oauthClient');
$routes->post('auth/oauthlogin', 'AuthController::oauthlogin'); $routes->post('auth/oauthlogin', 'AuthController::oauthlogin');
$routes->get('auth/msRedirectionHandler', 'AuthController::msRedirectionHandler');
// MS OAuth api's // MS OAuth api's
$routes->get('auth/mslogin', 'AuthController::mslogin'); $routes->get('auth/mslogin', 'AuthController::mslogin');

View File

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