Virtual Airlines Manager

FORO EN ESPAÑOL => Soporte para VAM 2.4 - 2.6 => Topic started by: Fernando on December 18, 2017, 02:33:08 PM

Title: Nuevos Pilotos!!! ERROR
Post by: Fernando on December 18, 2017, 02:33:08 PM
Recibo el siguiente error abajo, fo fue recientemente, ¿alguien sabe cómo resolverlo?:( :( :( :(

 Error: An Internal Error Has Occurred.
Stack Trace

    CORE/Cake/Network/Email/MailTransport.php line 52 → MailTransport->_mail(string, string, string, string, null)
    CORE/Cake/Network/Email/CakeEmail.php line 1173 → MailTransport->send(CakeEmail)
    APP/Controller/GvausersController.php line 116 → CakeEmail->send(string)
    [internal function] → GvausersController->edit(string)
    CORE/Cake/Controller/Controller.php line 491 → ReflectionMethod->invokeArgs(GvausersController, array)
    CORE/Cake/Routing/Dispatcher.php line 193 → Controller->invokeAction(CakeRequest)
    CORE/Cake/Routing/Dispatcher.php line 167 → Dispatcher->_invoke(GvausersController, CakeRequest)
    APP/webroot/index.php line 110 → Dispatcher->dispatch(CakeRequest, CakeResponse)
Title: Re: Nuevos Pilotos!!! ERROR
Post by: dohavik on January 04, 2021, 05:04:06 AM
You can ask your host provider to increase the php variables. This worked for me.
Title: Re: Nuevos Pilotos!!! ERROR
Post by: dohavik on September 28, 2021, 12:25:46 AM
Dear Fernando,

I encountered the same problem as you and to resolve it I asked my webhost to increase the amount of php variables.
Now the problem has returned, so I have made some modification and that works like a charm.
1. Find your  /vamcore/app/Controller/GvausersController.php
2. Edit this file by doing the following:
    Around line 111 you need to put the following as comments to add multiline comments use /* and */:
                $email = new CakeEmail('default');
                $email -> emailFormat('html');
                $email -> sender($senderemail, 'VAM system');
                $email -> to($pilotmail);
                $email -> subject('VAM - New Callsign / Pilot Activation');
                $email -> send($emailbody);
    Under it you put the following:
    $to = $pilotmail;
    $subject = "VAM - New Callsign / Pilot Activation";
    $message = "
                <title>New Callsign</title>
                <p>Dear $name,</p>
                <p>Your application is received and accepted. Please read the sections about rules of the airline good.</p>
                <p>Your new callsign is $callsign and your password is the one you have chosen during registration.</p>
                <p>We wish you to have a great time with us.</p>
                <p>Best wishes from your CEO</p>
                <p>Email generated by the Virtual Airlines Manager system</p>
                // Always set content-type when sending HTML email
                $headers = "MIME-Version: 1.0" . "\r\n";
                $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
                // More headers
                $headers .= "From: <$senderemail>\r\n";
                //$headers .= 'Cc:' . "\r\n";

With this the mail is not send as smtp, but at least the error is solved...
I hope this helps you...better later late then never.

Best regards, dohavik