SMTP class rehash6th December 2007, 1228 views With the help of a few anonymous people (thanks), I've rehashed the smtp class for PHP5 and made it available. It should be considered beater quality at the moment, so don't go using it for production code unless you like to live dangerously (Ooooh...). Here is some sample code to send an email:
Top 10 referrering pages
Link to meIf you use any of the code on this site (and if you don't I guess) or it makes your life easier, I'd appreciate a link - http://www.phpguru.org. Thanks!
Author: Richard Quadling
Posted: 6th December 2007 16:21 Is this a replacement for the smtp class in htmlmimemail5 ?
Quote
Author: Richard Heyes
Posted: 6th December 2007 16:25 Essentially yes, but there's no need to upgrade for the sake of it. It's an update which simply brings it up to my current coding standards. There isn'y any new features.
Quote
Author: Richard Quadling
Posted: 6th December 2007 16:30 OK.
QuoteOOI, are you aware of the break in the windows mail() function in PHP5.3.0-dev? Return true but does nothing. <?php error_reporting(E_ALL); ini_set('display_errors', 1); ini_set('SMTP', 'gmail-smtp-in.l.google.com'); // Force GMail to be the server. $s_Email = 'RQuadling' . '@' . 'GMail.com'; ini_set('sendmail_from', $s_Email); // Message is from me. var_dump(mail($s_Email, PHP_VERSION, 'Your message', "from:$s_Email")); ?> Running this as ... C:\php[456]\php -n C:\testmail.php Works on ... PHP 4.4.7-dev (cgi-fcgi) (built: Mar 25 2007 21:02:43) PHP 5.2.2RC2-dev (cli) (built: Apr 18 2007 08:03:01) PHP 6.0.0-dev (cli) (built: Sep 13 2007 02:04:41) Doesn't work on ... PHP 5.3.0-dev (cli) (built: Nov 20 2007 08:19:12)
Author: Richard Quadling
Posted: 6th December 2007 16:30 OK.
QuoteOOI, are you aware of the break in the windows mail() function in PHP5.3.0-dev? Return true but does nothing. <?php error_reporting(E_ALL); ini_set('display_errors', 1); ini_set('SMTP', 'gmail-smtp-in.l.google.com'); // Force GMail to be the server. $s_Email = 'RQuadling' . '@' . 'GMail.com'; ini_set('sendmail_from', $s_Email); // Message is from me. var_dump(mail($s_Email, PHP_VERSION, 'Your message', "from:$s_Email")); ?> Running this as ... C:\php[456]\php -n C:\testmail.php Works on ... PHP 4.4.7-dev (cgi-fcgi) (built: Mar 25 2007 21:02:43) PHP 5.2.2RC2-dev (cli) (built: Apr 18 2007 08:03:01) PHP 6.0.0-dev (cli) (built: Sep 13 2007 02:04:41) Doesn't work on ... PHP 5.3.0-dev (cli) (built: Nov 20 2007 08:19:12)
Author: Richard Heyes
Posted: 6th December 2007 16:36 Ummm... so? As long as it works when 5.3.x is released to the public...
Quote
Author: Rafael
Posted: 11th December 2007 18:31 Hi, I need to use this with attachment how can I do that??? there is no method for that case on your class
Quote
Author: Richard Heyes
Posted: 11th December 2007 18:59 Rafael:
Quote> Hi, I need to use this with attachment how can I > do that??? there is no method for that case on > your class You should look at the mime class, |

Comments
Posted: 6th December 2007 15:22