1
Guys, this could be a simple or complicated problem, I just know I can’t fix it.
I’ve done thousands of research on hosting topics, here at Stack, but it still doesn’t work, so I don’t know if the problem is in the phpmailer files, or the server settings
On my local server (xampp) things work normally, php Mailer sends emails straight to gmail. Already on the host server nothing works. What appears from error message is the following:
Parse error: syntax error, unexpected '--' (T_DEC) in /home3/centroed/public_html/site/phpmailer/class.phpmailer.php on line 4046
this error is only shown on the "real" server and the file did not even touch, as it came directly from Github
Not php version (7.2)
Google’s less secure apps settings are already enabled
the email and password information phpmailer
are correct
openssl
is already enabled
and the only detail is php.ini
that does not exist on the server and I needed to create one myself. I don’t know if the problem is in the php.ini
or somewhere else, I just know that I’ve tried a lot of things and most of them don’t work... Any idea what it might be?
Changed the PHP version to a lower one to see if the error persists?
– ElvisP
I changed it to 5.5 and go on :/
– Enrico Pre
was 7.0 and already appeared
– Enrico Pre
Hmmmm, do you use CPANEL on the server? Checks if the problem is not in the ID Priority mail, where you need to give permission for external use of the mail service (smtp). And which version of phpmailer do you use? I have a version that works great, maybe changing the version of phpmailer solves the problem.
– ElvisP
use Cpanel yes. Where exactly is the Priority ID? phpmailer is the 5.2 pq according to github is a stable version, so I chose this one. Changing the version to a later one (the last one is 6.0) will imply changing the one?
– Enrico Pre
So, the one I have here works in any environment, and is stable for any PHP version above 5.X if you want to send it to you so you can test it. But how do I send you?
– ElvisP
just explain to me exactly what needs to be done
– Enrico Pre
Give me about 10 min I send you, I’m finalizing a CODE.
– ElvisP
haha ok, do not squash put the semicolon ; and close the keys } (rs)
– Enrico Pre
Soft rsrs, stay quiet, this version has no error.
– ElvisP