Email Error Phpmailer

I am using "via php mail function" but no email is sent when orders are placed or when tried to recall forgotten passwords and I always get this error

Fatal error: Cannot make static method PHPMailer::RFCDate() non static in class Tygh\Mailer in /home/onlineam/public_html/app/Tygh/Mailer.php on line 18

Please help me to fix this.

Have you found a solution?

Note that this posting was from 2011 ( 6 years ago) and the version of PHPMailer has been changed several times since.

Strongly suggest you NOT use :"via php mail function" since this will more than likely get your emails identified as spam unless you have a dedicated server or VPS that is properly setup to deal specifically with your domain. Instead, you should use SMTP services. If you don't manage an SMTP server, then contact your hosting and ask them what you should use for your environment.

What do you mean that this was posted in 2011? Look:

screenshot.PNG

Hmm, could have sworn it had a 2011 date when I posted. Sorry for misleading. But rest of response still applies.

Hmm, could have sworn it had a 2011 date when I posted. Sorry for misleading. But rest of response still applies.

You mean this date?

Join Date: 20-Oct 11 - 178 posts

Hmm, well, Ive just moved our v4.6.1 csc to a VPS and cant get any emails to work.

The email server is actually on a different hosting.

Wont work with PHP mail or SMTP server.

So not using the VPS to send the emails. All the settings for email are correct. and have tried all metho0ds, nothing works.

Im guessing there is something i need to set on the server to allow PHP mailer to work ... but what?

Error when php mailer method selected..

ErrorMessage could not be sent.
Mailer Error: Could not instantiate mail function.

When SMTP method selected, the page just times out and shows error.

ErrorMessage could not be sent.
Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Verify with the SMTP hosting:

1) is SMTP behind a firewall for SENDING? If so, what's the PORT number and what's the AUTHENTICATION method?

2) Do they accept connections from outside their firewall at all for outbound send requests?

If it's truly a timeout (like takes 60 seconds to fail) then my bet would be that SMTP is behind a firewall or operates on a non-standard port.

Most issues are either security or authentication in nature. You might have to have the SMTP hosting company look at the logs relative to requests from your IP to determine the exact cause of the failure.

Ok Thanks tbirnseth,
Yes it turned out to be the VPS firewall blocking SMTP ports... Im new to this VPS thing. but did pay for an expert to set up the VPS specifically optimised for csc v4.
Seems that they overlooked the fact that cscart needs to send emails! They fixed it without charge.