Re: PEAR::MAIL Problem
| From: | Alan Knowles | Date: | Sun, 22 Feb 2004 01:45:29 +0000 |
| Subject: | Re: PEAR::MAIL Problem | ||
| References: | 1 2 | Groups: | php.pear.general php.pear.general |
| Request: | Send a blank email to pear-general+get-10846@lists.php.net to get a copy of this message | ||
Check your mail server logs.. - this looks like a mail server config
error..
try telnet localhost 25
<enter>
mail from: <your@email.address>
<enter>
rcpt to: <who@ever.gets.it>
<enter>
data
<enter>
Subject: Test
<enter>
<enter>
the body
<enter>
.
You should see what happens internally when sending an email.
Works perfectly here.. (when I have the mail server set up ok..)
Regards
Alan
Stanley chan wrote:
> Hi Manuel,
>
> In your opinion, the class provided PEAR does not
> work, right? Oh... What class do you do with SMTP
> most?
>
> -stan
>
>
> --- Manuel Lemos <mlemos@acm.org> 的郵件內容:>
> Hello,
>
>>On 02/20/2004 04:49 AM, Stanley chan wrote:
>>
>>>Dear Listmates,
>>>
>>>I am using PEAR::MAIL and my code includes the
>>
>>below;
>>
>>>// Send Email Out
>>>$mailCfg = array(
>>> "host" => "127.0.0.1",
>>> "port" => "25",
>>> "auth" => false
>>> );
>>>$mailRecipient = $hashValue["emailaddress"];
>>>$mailHeader = array(
>>> "From" => "info@sm.hk",
>>> "To" => $mailRecipient,
>>> "Subject" => "Test Message"
>>> );
>>>$mailBody = $myContent;
>>>$mailMgr =& Mail::factory("smtp", $mailCfg);
>>>$mailResult = $mailMgr->send($mailRecipient,
>>>$mailHeader, $mailBody);
>>>
>>>It is found that the variable $mailResult is
>>
>>always
>>
>>>true but the email cannot be received whenever.
>>>
>>>On the other hand, in the same machine, I can use
>>
>>the
>>
>>>native function mail() very well. It works well.
>>>
>>>So I doubt the problem of PEAR::MAIL. Should I
>>>consider anything?
>>>
>>>My server is using Qmail and sendmail command is a
>>>shortcut of Qmail executes (standard way).
>>
>>I think this is a bug in PEAR::Mail.
>>
>>You may want to try this other class that comes with
>>sub-classes
>>specialized in delivery via qmail and smtp. Although
>>there is no reason
>>to fail deliverying via SMTP, you would better
>>deliver via qmail
>>specialized sub-class.
>>
>>http://www.phpclasses.org/mimemessage
>>
>>
>>
>>--
>>
>>Regards,
>>Manuel Lemos
>>
>>PHP Classes - Free ready to use OOP components
>>written in PHP
>>http://www.phpclasses.org/
>>
>>PHP Reviews - Reviews of PHP books and other
>>products
>>http://www.phpclasses.org/reviews/
>>
>>Metastorage - Data object relational mapping layer
>>generator
>>http://www.meta-language.net/metastorage.html
>
>
> _________________________________________________________
> 必殺技、飲歌、小星星...
> 浪漫鈴聲 情心連繫
> http://us.rd.yahoo.com/evt=22281/*http://ringtone.yahoo.com.hk/