Jump to content

WireMailSmtp


horst

Recommended Posts

  • 3 weeks later...

I use WireMailSmtp and it works fine with my own code, but I receive no Email from ProcessForgotPassword module. Tested with the admin and my own frontend login without get an email. 

ProcessForgotPassword seems to use WireMail, but maybe not compatible to WireMailSmtp? 

Link to comment
Share on other sites

I use it since it exists and it works as expected. Why should it function with one wiremail call and not with another? There must be something different with those calls.

I use wiremailsmtp v 0.1.9 and processforgottpassword v 1.0.1 and all is fine.

Do you have setup the same emailadress as sender in processforgottpasswords modules config screen like the default sender in wiremailsmtp? DO you have setup a default sender in wiremailsmtp?

Do you have setup a valid emailadress with your useraccount? (without typos?)

(just thinking loud)

Edited by horst
  • Like 1
Link to comment
Share on other sites

I believe your logic is a bit flawed.  A preliminary look at ProcessForgotPassword code didn't seem to show it using the class Wiremail or the function Wiremail().  However, I could be wrong (I'm not a coder).

Edited by cstevensjr
  • Like 1
Link to comment
Share on other sites

Link to comment
Share on other sites

Config was just fine. Tested it once again and it works. Maybe typo with the username ?!

Sender address of ProcessForgotPassword is overwritten by WireMailSmtp if different, but works fine...

Sorry, should be my bad :(

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Hi.

I have moved my site to another VPS and now I get "Error in hnsmtp::send : cannot connect to smtp-server!".

Differences in VPS: php 5.4 -> 5.6 and http->https. Can it be the issue in my case or I must dig in other place?

p.s. I can connect to smtp server in console with

#openssl s_client -crlf -connect smtp.yandex.ru:465

so it is not a firewall I guess.

Link to comment
Share on other sites

I had a similar situation a couple of months ago when I tried to upgrade my domains to PHP 5.6.x on my web host.  I never resolved this issue and ended up reverting to PHP 5.5.x

Note:  The following is what I found out by using Goggle search.  It may apply or not apply to your situation, however I hope that maybe it will cause others to chime in on possible solutions

All encrypted client streams now enable peer verification by default. By default, this will use OpenSSL's default CA bundle to verify the peer certificate. In most cases, no changes will need to be made to communicate with servers with valid SSL certificates, as distributors generally configure OpenSSL to use known good CA bundles. - OpenSSL changes in PHP 5.6.x (PHP Manual)

It appears that in PHP 5.6.0 (at least the version in Debian jessie, with openssl 1.0.1h-3), this function is now validating SSL certificates (in a variety of ways). First, it appears to fail for untrusted certificates (i.e. no matching CA trusted locally), and secondly, it appears to fail for mismatched hostnames in the request and certificate.

"PHP 5.6 now verifies SSL certificates, the "fsockopen" function fails in the "ConnectToHost" method due to mismatched certificate CN (expects host name, but IP is given instead)." -Klemen (PHP 5.6 compatibility)

The problem is that this change is resulting in an error on Email Class SMTP protocol:

fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

When you update to PHP 5.6+ the "CA Root" have to be set, or OpenSSL certificate verify don't work correctly.

Step One: Install CA_Root (In my case, on FreeBSD 10, via Ports)
/usr/ports/security/ca_root_nss

After install, the Pem Cert will be located at:
/usr/local/etc/ssl/cert.pem

Step Two: Add to php.ini the openssl.cafile

openssl.cafile = /usr/local/etc/ssl/cert.pem

Restart your HTTP Server, and verify with phpinfo()

References:     http://stackoverflow.com/questions/27622427/codeigniter-2x-email-class-smtp-ssl-verification-bug-on-php-5-6
                    http://www.phpclasses.org/discuss/package/14/thread/78/
                    http://php.net/manual/en/migration56.openssl.php
  • Like 1
Link to comment
Share on other sites

@cstevensjr thanks for your answer, it point me to the right direction.

The problem is in old version of smtp class: Certificate is issued to hostname, but smtp class sends IP. In the last version it was fixed and works fine for me now on php5.6.

@horst, update smtp class, please.

http://www.phpclasses.org/package/14-PHP-Sends-e-mail-messages-via-SMTP-protocol.html

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

There seems to be something was changed with the newer smtp class that we have changed 2 weeks ago. But anyways, it seems to be fixed now.

@Pete, please can you have a look to it? I haven't changed anything on the behave of To-Recipients, only CC and BCC.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

I can't believe I've not thanked you Horst for this module. I've been using it for about a year, linked to Mandrill, a match made in heaven ^_^ and no false-positive spam rejected emails.

Thank you again, cheers, -Alan.

  • Like 1
Link to comment
Share on other sites

having some trouble with CC, i'm supplying an array, like this:

$mail->cc($array);

and i know my array is good, and CC works for 1 CC (I have $mail->sendSingle(true); )

but it will only CC the last member of the array, no matter which array type i input.

......

OK - forget this, i just updated to the latest version and this was fixed...

Link to comment
Share on other sites

  • 1 month later...

First time using this module and I get this error:

"it is not supported any of the authentication mechanisms required by the server"

The SMTP server is an open relay restricted by sender IP, no authentication required.

I have tested using PHPMailer succesfully.

Any ideas?

Link to comment
Share on other sites

First time using this module and I get this error:

"it is not supported any of the authentication mechanisms required by the server"

The SMTP server is an open relay restricted by sender IP, no authentication required.

I have tested using PHPMailer succesfully.

Any ideas?

Can you please provide some information regarding your setup for this website (versions of PHP/ProcessWire, type of hosting used, the hosting provider/or whether local hosted)?  Have you followed the instructions from your hosting provider regarding SMTP setup details, if not locally hosted?

Link to comment
Share on other sites

  • SebastianP changed the title to Strange PHP error in WireMailSmtp: unexpected fully qualified name "\getmessage"

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...