php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49758 Cannot send e-mails using SMTP in Mail PEAR package.
Submitted: 2009-10-03 00:16 UTC Modified: 2009-10-04 21:08 UTC
From: navossoc at gmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.11 OS: Windows Server 2003 R2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: navossoc at gmail dot com
New email:
PHP Version: OS:

 

 [2009-10-03 00:16 UTC] navossoc at gmail dot com
Description:
------------
Cannot send e-mails using SMTP in PEAR Mail package.

Reproduce code:
---------------
PEAR Mail Package:
http://pear.php.net/package/Mail

<?php
require_once("Mail.php");

// PEAR Mail
$smtp = Mail::factory
(
	"smtp",
	array
	(
		"localhost" => "localhost",
		"host" => "localhost",
		"auth" => false
	)
);

$headers = array
(
	"From" => "tesing@testing.com <testing>",
	"Subject" => "some subject",
	"To" => "someone@something.com",
	"Content-Type" => "text/html; charset=iso-8859-1",
	"MIME-Version" => "1.0"
);

$smtp->send($to, $headers, "message");
?>

Expected result:
----------------
Send the e-mail using the class without problems.

IIS 6 with PHP 5.2.11 no additional extensions.
STMP is provided by MailEnable 3.61

Actual result:
--------------
Don't show any error on php, between the e-mail is not send.
I can send it using mail() function without problems.

Downgrading to 5.2.10, works fine again, no code changes.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-04 19:40 UTC] Sjoerd@php.net
Thank you for your bug report.

If there is a bug here, it is in a PEAR package and should be filed there:
http://pear.php.net/package/Mail

Also, note that the $to variable in your example is not set.
 [2009-10-04 21:08 UTC] navossoc at gmail dot com
A typing error into the example.
Anyway, why downgrading without code changes works fine again?

The release log of php has a STMP bug fixed, maybe any relevance?

[]'s
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC