# Airmail Error when Sending NOTAM

**URL:** <https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671>\
**Category:** Simpilot Group Addons\
**Created:** [September 22, 2014, 12:34pm UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671 "2014-09-22T12:34:33Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![CedGauche](https://forum.phpvms.net/user_avatar/forum.phpvms.net/cedgauche/32/386_2.png) [@CedGauche](https://forum.phpvms.net/u/CedGauche)\
**Post date:** [September 22, 2014, 12:34pm UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/1 "2014-09-22T12:34:33Z")

</div>

Hi,

a pilot of our va reported me an error when sending a notam, it seems that the airmal was sent probably. Thanks for help

**Fatal error** : Uncaught exception ‘Exception’ with message ‘You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘s message inbox on 09/22/2014’, ‘25’, ‘1411389143’)’ at line 2’ in /var/www/web1112/html/va/core/common/MailData.class.php:92 Stack trace: #0 /var/www/web1112/html/va/core/modules/Mail/Mail.php(138): MailData::send\_new\_mail(‘33’, ‘16’, ‘Vorschlag eines…’, ‘You received a …’, 25, 1411389143) #1 /var/www/web1112/html/va/core/modules/Mail/Mail.php(38): Mail-\>send() #2 [internal function]: Mail-\>index() #3 /var/www/web1112/html/va/core/classes/MainController.class.php(218): call\_user\_func\_array(Array, Array) #4 /var/www/web1112/html/va/index.php(60): MainController::RunAllActions() #5 {main} thrown in **/var/www/web1112/html/va/core/common/MailData.class.php** on line **92**

---

<div class="post-metadata">

**Author:** ![simpilot](https://forum.phpvms.net/user_avatar/forum.phpvms.net/simpilot/32/26_2.png) [@simpilot](https://forum.phpvms.net/u/simpilot)\
**Post date:** [September 23, 2014, 1:53pm UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/2 "2014-09-23T13:53:04Z")

</div>

It is an error that is encountered when you have pilot names that have a apostrophe in them. It breaks the sql syntax. If you are using the latest version of airmail from my GitHub account it should be escaping it. If it is not you will have to escape the name field prior to it going in the database.

---

<div class="post-metadata">

**Author:** ![CedGauche](https://forum.phpvms.net/user_avatar/forum.phpvms.net/cedgauche/32/386_2.png) [@CedGauche](https://forum.phpvms.net/u/CedGauche)\
**Post date:** [September 23, 2014, 7:28pm UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/3 "2014-09-23T19:28:56Z")

</div>

I’ll check it, thank you

---

<div class="post-metadata">

**Author:** ![Luka.Niko](https://forum.phpvms.net/user_avatar/forum.phpvms.net/luka.niko/32/150_2.png) [@Luka.Niko](https://forum.phpvms.net/u/Luka.Niko)\
**Post date:** [November 20, 2014, 7:18pm UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/4 "2014-11-20T19:18:49Z")

</div>

Hello!

I have installed right now the fabulous AIRMail 4 and i have the same problem of CedGauche.

Regards, Luka.

---

<div class="post-metadata">

**Author:** ![simpilot](https://forum.phpvms.net/user_avatar/forum.phpvms.net/simpilot/32/26_2.png) [@simpilot](https://forum.phpvms.net/u/simpilot)\
**Post date:** [November 23, 2014, 2:49pm UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/5 "2014-11-23T14:49:49Z")

</div>

> Hello!
> 
> I have installed right now the fabulous AIRMail 4 and i have the same problem of CedGauche.
> 
> Regards, Luka.

Do you have names with apostrophes in them?

---

<div class="post-metadata">

**Author:** ![CedGauche](https://forum.phpvms.net/user_avatar/forum.phpvms.net/cedgauche/32/386_2.png) [@CedGauche](https://forum.phpvms.net/u/CedGauche)\
**Post date:** [April 1, 2015, 7:46am UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/6 "2015-04-01T07:46:19Z")

</div>

Out of the blue this error is there again.

I’ve checked all pilot names, there are no apostrophe in them.

I’ve checked that the script stops at a pilot with the id 22, after this pilot the notam script stops working. The pilot with the id 22 and 23 have no apostrophe or german typo like Ã¤,Ã¶ etc in them.

Error:

**Fatal error** : Uncaught exception ‘Exception’ with message ‘You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘s message inbox on 04/01/2015’, ‘11’, ‘1427875628’)’ at line 2’ in /var/www/web1112/html/va/core/common/MailData.class.php:92 Stack trace: #0 /var/www/web1112/html/va/core/modules/Mail/Mail.php(138): MailData::send\_new\_mail(‘24’, ‘1’, ‘Monatsbericht M…’, ‘You received a …’, 11, 1427875628) #1 /var/www/web1112/html/va/core/modules/Mail/Mail.php(38): Mail-\>send() #2 [internal function]: Mail-\>index() #3 /var/www/web1112/html/va/core/classes/MainController.class.php(218): call\_user\_func\_array(Array, Array) #4 /var/www/web1112/html/va/index.php(60): MainController::RunAllActions() #5 {main} thrown in **/var/www/web1112/html/va/core/common/MailData.class.php** on line **92**

---

<div class="post-metadata">

**Author:** ![t\_bergman](https://forum.phpvms.net/user_avatar/forum.phpvms.net/t_bergman/32/125_2.png) [@t\_bergman](https://forum.phpvms.net/u/t_bergman)\
**Post date:** [April 1, 2015, 10:00pm UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/7 "2015-04-01T22:00:59Z")

</div>

SimPilot will know better but did your hosting environment change? Host update php or something?

---

<div class="post-metadata">

**Author:** ![CedGauche](https://forum.phpvms.net/user_avatar/forum.phpvms.net/cedgauche/32/386_2.png) [@CedGauche](https://forum.phpvms.net/u/CedGauche)\
**Post date:** [April 2, 2015, 11:23am UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/8 "2015-04-02T11:23:36Z")

</div>

No nothing changed there

---

<div class="post-metadata">

**Author:** ![CedGauche](https://forum.phpvms.net/user_avatar/forum.phpvms.net/cedgauche/32/386_2.png) [@CedGauche](https://forum.phpvms.net/u/CedGauche)\
**Post date:** [September 1, 2015, 7:59am UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/9 "2015-09-01T07:59:06Z")

</div>

Again we have this problem, I don’t know what to do:

**Fatal error** : Uncaught exception ‘Exception’ with message ‘You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘s message inbox on 09/01/2015’, ‘23’, ‘1441093324’)’ at line 2’ in /var/www/web1112/html/va/core/common/MailData.class.php:92 Stack trace: #0 /var/www/web1112/html/va/core/modules/Mail/Mail.php(138): MailData::send\_new\_mail(‘94’, ‘1’, ‘Monatsbericht A…’, ‘You received a …’, 23, 1441093324) #1 /var/www/web1112/html/va/core/modules/Mail/Mail.php(38): Mail-\>send() #2 [internal function]: Mail-\>index() #3 /var/www/web1112/html/va/core/classes/MainController.class.php(218): call\_user\_func\_array(Array, Array) #4 /var/www/web1112/html/va/index.php(60): MainController::RunAllActions() #5 {main} thrown in **/var/www/web1112/html/va/core/common/MailData.class.php** on line **92**

---

<div class="post-metadata">

**Author:** ![Cor](https://forum.phpvms.net/user_avatar/forum.phpvms.net/cor/32/96_2.png) [@Cor](https://forum.phpvms.net/u/Cor)\
**Post date:** [September 1, 2015, 5:17pm UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/10 "2015-09-01T17:17:26Z")

</div>

I had a looked at it but when I sent a Notam it only sent 1. to me as I am pilot nr. 1

I am getting a blanc page as soon as I am sending the notam.

Any ideas,

Regards,

Cor

---

<div class="post-metadata">

**Author:** ![simpilot](https://forum.phpvms.net/user_avatar/forum.phpvms.net/simpilot/32/26_2.png) [@simpilot](https://forum.phpvms.net/u/simpilot)\
**Post date:** [September 1, 2015, 6:15pm UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/11 "2015-09-01T18:15:24Z")

</div>

> Again we have this problem, I don’t know what to do:

Something must be changing in the hosting environment if this issue is transient as it seems.

---

<div class="post-metadata">

**Author:** ![Cor](https://forum.phpvms.net/user_avatar/forum.phpvms.net/cor/32/96_2.png) [@Cor](https://forum.phpvms.net/u/Cor)\
**Post date:** [September 1, 2015, 7:21pm UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/12 "2015-09-01T19:21:29Z")

</div>

I solved the problem. Deleted first airmail and installed it again and Notam works.

---

<div class="post-metadata">

**Author:** ![Luka.Niko](https://forum.phpvms.net/user_avatar/forum.phpvms.net/luka.niko/32/150_2.png) [@Luka.Niko](https://forum.phpvms.net/u/Luka.Niko)\
**Post date:** [December 31, 2016, 3:21pm UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/13 "2016-12-31T15:21:03Z")

</div>

> On 23/11/2014 at 3:49 PM, simpilot said:
> 
> Do you have names with apostrophes in them?

Hello dear David!&nbsp;

I don’t have pilots names with&nbsp; apostrophes. I think the problem coming from the SQL table, i try to recreate now.

Sorry for my late, i had some problems with the forum here.

Happy new year!

---

<div class="post-metadata">

**Author:** ![Luka.Niko](https://forum.phpvms.net/user_avatar/forum.phpvms.net/luka.niko/32/150_2.png) [@Luka.Niko](https://forum.phpvms.net/u/Luka.Niko)\
**Post date:** [December 31, 2016, 3:28pm UTC](https://forum.phpvms.net/t/airmail-error-when-sending-notam/9671/14 "2016-12-31T15:28:17Z")

</div>

> 9 minutes ago, Luka.Niko said:
> 
> Hello dear David!&nbsp;
> 
> I don’t have pilots names with&nbsp; apostrophes. I think the problem coming from the SQL table, i try to recreate now.
> 
> Sorry for my late, i had some problems with the forum here.
> 
> Happy new year!

Ok, this is work for me. HAPPY NEW YEAR TO ALL !
