Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message was not sent.Mailer error: You must provide at least one recipient email address. #21

Closed
wiresfj opened this issue Jan 23, 2013 · 6 comments

Comments

@wiresfj
Copy link

wiresfj commented Jan 23, 2013

Hi,

I've been using phpMailer for sometime and its been great.

I have just moved over to a new web hosting company and now it will not work. Even the most basic example.

I have PHP 5.3.3 running on the server
its a Linux server

the error back from php mailer is,
Message was not sent.Mailer error: You must provide at least one recipient email address.

I know its a valid email address.

The error message in the web hosting log is this,

[Wed Jan 23 18:47:49 2013] [warn] [client 82.68.41.46] mod_fcgid: stderr: PHP Warning: preg_match() [function.preg-match]: Compilation failed: reference to non-existent subpattern at offset 10 in /var/www/vhosts/vision-link.co.uk/site1/VL_Mail/class.phpmailer.php on line 667

any ideas? I'm a bit stuck really..

many thanks,
Patrick

@Synchro
Copy link
Member

Synchro commented Jan 23, 2013

You sure it's 5.3.3? That error happens under PHP 5.2. I can see that you're running via fcgi, so it may not be the same version as the cli - run a phpinfo() to be sure.

@wiresfj
Copy link
Author

wiresfj commented Jan 24, 2013

Thank you for the quick reply.

I've run phpinfo and yes it is saying 5.3.3

To be honest I'm a bit stuck, not sure what fcgi (I have just googled it) and cli are.

Sorry if I'm being stupid, spent days on it myself trying to resole it.

Thank you for the support.
Patrick

@wiresfj
Copy link
Author

wiresfj commented Jan 25, 2013

Well its fixed now. Had some great support from the guys at HostingUK.net

This was the issue.. (so had no hope of getting it working myself)

The server is running CentOS 5, but with the php53 packages.

Unfortunately, these php53 packages are built linked against the system-installed version of PCRE, which on Centos 5 is 6.06 (Where as php5.3 normally links against PCRE 8.

I manually installed a newer version of PCRE onto the server to replace 6.06 and bring it in line with what php5.3 expected.

@Synchro
Copy link
Member

Synchro commented Jan 25, 2013

I'm not sure what it is in the older PCRE that the validation regex doesn't like - it maybe something like a limit of 9 capture groups. I've asked the author of the regex if he can come up with a simpler one.

@Synchro Synchro closed this as completed Jan 25, 2013
@DavidWiesner
Copy link

Hi Marcus,
please fix this Issue. I've saw you got an answer from the author of the regex to use another expression for the older php/pcre-version. Why you don't use that regex to fix this issue. On http:https://sandbox.onlinephpfunctions.com/code/498f2c6fce9491292f3d0bf778922186dab7c8ab you can see the current regex failed below PHP 5.3.2 so (like http:https://www.php.net/manual/en/pcre.installation.php says) on PCRE below 8.00.

I have used a simple if case statement to use the alternative regex on an older php version.

if(version_compare(PHP_VERSION, '5.3.2', '<')){
      return (boolean) preg_match('/^...$/isD', $address);
} else {
      return (boolean) preg_match('/^$/isD', $address);
}

Thanks,
David

Synchro added a commit that referenced this issue Jan 31, 2013
@Synchro
Copy link
Member

Synchro commented Jan 31, 2013

Thanks for the heads-up - I hadn't noticed Michael had posted a reply. That's fixed now. I'm checking PCRE version rather than PHP version so that it deals with situations like @wiresfj encountered. I also added a simple fallback for PCRE being missing altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants