1
Soporte para VAM 2.4 - 2.6 / Re: Nuevos Pilotos!!! ERROR
« 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
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