Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP 5.4 and SMTP

Tags:

php

email

smtp

I'm trying to use the PEAR SMTP library with PHP 5.4 but I'm having the following issues when using it:

> Strict Standards: Non-static method Mail::factory() should not be called statically in C:\xampp\htdocs\forgot.php on line 75

Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Mail\smtp.php on line 365

Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Net\SMTP.php on line 450

Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Net\SMTP.php on line 451

Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Mail\smtp.php on line 369

Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Mail\smtp.php on line 249

As far as I'm aware, there's no fix for this until PEAR or the creators of the PEAR scripts fix them. I'm wondering what alternative SMTP libraries people use, or just what I can do to deliver e-mail from my script via SMTP to gmail. I'm using windows, if that's of any help.

Thank you.

like image 973
Matthew Avatar asked Nov 13 '22 19:11

Matthew


1 Answers

please use php mailer library. this will help you to resolve any email related issue in PHP.

Following is the download link of the phpmail library http://code.google.com/a/apache-extras.org/p/phpmailer/downloads/list

The library is available in the zip format.

Please search for test folder after extracting the zip. this will demonstrate you how to use the library.

You can also refer the link for using gmail for email communication

Thanks!

like image 80
Amit Vikram Avatar answered Nov 15 '22 12:11

Amit Vikram