PHP Classes

Universal PHP Mailer

Recommend this page to a friend!

      Universal PHP Mailer  >  All threads  >  Universal PHP Mailer  >  (Un) Subscribe thread alerts  
Subject:Universal PHP Mailer
Summary:Got a very distinct error message on first run
Messages:11
Author:Ken Turnbull
Date:2017-01-10 21:30:32
 
  1 - 10   11 - 11  

  1. Universal PHP Mailer   Reply   Report abuse  
Picture of Ken Turnbull Ken Turnbull - 2017-01-10 21:30:32
Fatal error: Call to undefined function random_bytes() in universalphpmailer.class.php on line 1009

  2. Re: Universal PHP Mailer   Reply   Report abuse  
Picture of Peter Kahl Peter Kahl - 2017-01-10 22:56:29 - In reply to message 1 from Ken Turnbull
The function random_bytes() is available only in PHP >= 7.0.

Therefore, I have created alternative code as workaround to make this class compatible with earlier PHP versions.

It may take 1-2 days before the code is updated on PHPCLASSES.ORG, but meanwhile, you can download the latest version from Github:

github.com/peterkahl/Universal-PHP- ...

I didn't test it, so if you encounter problems, let me know.

  3. Re: Universal PHP Mailer   Reply   Report abuse  
Picture of Ken Turnbull Ken Turnbull - 2017-01-11 00:35:20 - In reply to message 2 from Peter Kahl
Thanks,

I assumed that it was php 7 related and upgraded. But so many other things showed up in other places, I backed out really quickly...nasty stuff.

Log files and directories not found, could not connect to localhost port 25, etc

I look forward to seeing the work around.

Ken T

  4. Re: Universal PHP Mailer   Reply   Report abuse  
Picture of Peter Kahl Peter Kahl - 2017-01-12 00:12:50 - In reply to message 3 from Ken Turnbull
1.) Port 25
For this to work, you need to have your own (local) SMTP server. It appears that you don't and/or your provider blocks your access to port 25.
The solution (for you) may be to use the mailing method "mail".

2.) Log files, directories
Umm. You need to define the location of your cache directory, if you want the logging to work.
How am I supposed to know the location of your cache directory? That's your job.
The quick solution for you might be to disable logging/debugging in this class.

  5. Re: Universal PHP Mailer   Reply   Report abuse  
Picture of Ken Turnbull Ken Turnbull - 2017-01-12 00:26:20 - In reply to message 4 from Peter Kahl
All of the other errors went away when I moved back from 7.1 to 5.6+.
I didn't want you to help me with that.

I would like to get this working so I'm going to look at the SMTP server.
IS it an easy thing in OSX?

  6. Re: Universal PHP Mailer   Reply   Report abuse  
Picture of Peter Kahl Peter Kahl - 2017-01-12 06:58:41 - In reply to message 5 from Ken Turnbull
Ken,
I can't vouch for OSX. I use Mac only as my desktop, my server is Linux.
OSX must a-OK.
Good luck!
Peter

  7. Re: Universal PHP Mailer   Reply   Report abuse  
Picture of Peter Kahl Peter Kahl - 2017-01-12 08:43:25 - In reply to message 5 from Ken Turnbull
So you will be installing Postfix on OSX?

Well, I use Postfix SMTP server on my Linux Ubuntu and I am very happy with it. It may not be simple and easy, but the effort will be worth your time.

  8. Re: Universal PHP Mailer   Reply   Report abuse  
Picture of Ken Turnbull Ken Turnbull - 2017-01-12 15:51:59 - In reply to message 7 from Peter Kahl
I started reading about SMtP servers and Postfix kept coming up. My intention is to look closer at it today.

Thanks

  9. Re: Universal PHP Mailer   Reply   Report abuse  
Picture of Prithviraj Gubbala Prithviraj Gubbala - 2017-01-17 05:37:58 - In reply to message 3 from Ken Turnbull
plz help me... i am getting error that SMPT not found,SMPT connect()failure .can any one hel[p to slove out this issue ,it will be helpful for my project.

  10. Re: Universal PHP Mailer   Reply   Report abuse  
Picture of Peter Kahl Peter Kahl - 2017-01-18 22:21:17 - In reply to message 9 from Prithviraj Gubbala
SMTP not found? - Where exactly are you getting this error?

Are you intending to use the mail method SMTP or 'mail'?

If you really want to use the SMTP method, you need to supply all the correct SMTP parameters, such as the SMTP port number.

SMTP port number is typically 25, but can also be 587 or 465, or anything else. You need to find out the port number from your SMTP server provider.

Are you using your own SMTP server? Or SMTP server provided by your hosting company? Or the Gmail SMTP server?

 
  1 - 10   11 - 11  
For more information send a message to info at phpclasses dot org.