FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18178&edit=1

ID: 18178
Updated by: alec@alec.pl
Reported By: basant_kol at yahoo dot com
Summary: From address in format xxx <xxx@yyy.zzz> is not
getting send
Status: Open
Type: Bug
Package: Mail_Mime
Operating System: Linux
Package Version: 1.8.1
PHP Version: 5.2.0
Roadmap Versions:
New Comment:

Check SMTP server log/response code. Show $headers variable content. If
you have a problem with recipient address, then it could be Mail package
issue.


Previous Comments:
------------------------------------------------------------------------

[2011-01-06 19:46:39] #87a14006af732ac2bf8

Description:
------------
Simple format xxx@yyy.zzz is getting delivered but not the format xxx
<xxx@yyy.zzz> with display name

Test script:
---------------
$sender = "Display Name<from@mydomain.com>";
$recipient = "to@otherdomain.com";
$subject = "Welcome to MyDomain";
$crlf = "\n";
$headers = array(
'From' => $sender,
'To' => $recipient,
'Return-Path' => $sender,
'Subject' => $subject
);

// Creating the Mime message
$mime = new Mail_mime($crlf);

// Setting the body of the email
$mime->setTXTBody($text);
$mime->setHTMLBody($html);
$body = $mime->get();
$headers = $mime->headers($headers);
$mail =& Mail::factory("smtp", $smtp_params);
$result = $mail->send($recipient, $headers, $body);


Expected result:
----------------
Mail shd be send to the recipient

Actual result:
--------------
Mail is being send only in simple address format.

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 7, '11 at 7:47a
activeJan 7, '11 at 7:47a
posts1
users1
websitepear.php.net

1 user in discussion

Alec: 1 post

People

Translate

site design / logo © 2022 Grokbase