Author Topic: Nuevos Pilotos!!! ERROR  (Read 819 times)

Fernando

  • Newbie
  • *
  • Posts: 22
  • Here we give you wings to fly you
    • View Profile
    • WebJet Virtual
Nuevos Pilotos!!! ERROR
« 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)
« Last Edit: December 20, 2017, 10:49:19 AM by Fernando »

dohavik

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Nuevos Pilotos!!! ERROR
« Reply #1 on: January 04, 2021, 05:04:06 AM »
You can ask your host provider to increase the php variables. This worked for me.

dohavik

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Nuevos Pilotos!!! ERROR
« Reply #2 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 = "
                <html>
                <head>
                <title>New Callsign</title>
                </head>
                <body>
                <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>
                </body>
                </html>";
                // 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: myboss@example.com' . "\r\n";
                mail($to,$subject,$message,$headers);

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