Errors when sending emails
I have some email pages set up so that my client can send emails through the website. This seems to work OK most of the time, however they've started getting error messages on some pages. I duplicated the pages in question and narrowed the recordset down to just a few email addresses and it worked fine with no errors, so I can only think that it's something to do with higher volumes of email - although there are only 561 records in total. Errors as follows:
Notice: Undefined variable: mailContent in /var/www/vhosts/[mywebsiteURL]/httpdocs/webassist/email/mail_php.php on line 113
This line repeats numerous times, ending with:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/[mywebsiteURL]/httpdocs/webassist/email/mail_php.php:113) in /var/www/vhosts/[mywebsiteURL]/httpdocs/jfb/email_all.php on line 137
On a separate page, the client is getting an internal server error after hitting Send. I added error reporting to the page but they don't even get to see the page, just the internal server error message.
In both the above instances, the emails appear to be getting sent successfully (I'm on the mailing list and receive them OK). Both pages are set to display a success message using page.php?sent=true after sending. I also set up email logging on both these pages but the emails aren't being logged in the database so no way of actually checking if they all went!