Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.1.1

Bug #20281 sending mails to recipients with a unticked display name containing a dot
Submitted: 2014-05-26 16:45 UTC
From: lukasp Assigned: lukasp
Status: Assigned Package: Mail2
PHP Version: 5.4.4 OS: Debian GNU Linux (Stable)
Roadmaps: (Not assigned)    
Subscription  


 [2014-05-26 16:45 UTC] lukasp (Lukas Pirl)
Description: ------------ If the email address of a recipient contains a dot and is not enclosed with ticks Mail fails to send the message. Even this format is obsolete, it's generation should be avoided but mails should be delivered anyways¹. If I send the mails w/o Mail (but with the same MTA of course), it works. ¹ http://tools.ietf.org/html/rfc2822#section-3.4 Test script: --------------- <?php include('Mail.php'); $mailer = Mail::factory("smtp"); $hdrs = array( 'From' => 'me@example.com', 'Subject' => 'Test message' ); $mailer->send('"First.Last" <First.Last@example.com>', $hdrs, "ticks: works"); $mailer->send('First.Last <First.Last@example.com>', $hdrs, "not ticks: does not work"); ?> Expected result: ---------------- Both mails get delivered (to the MTA). Actual result: -------------- Only the mail with the ticked custom name gets delivered (to the MTA).

Comments

 [2014-06-04 11:49 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Assigned -Assigned To: +Assigned To: lukasp
Can I get you to check out http://github.com/pear/Mail2/ and update bug20281.phpt to be an executable test case?
 [2014-06-04 11:49 UTC] doconnor (Daniel O'Connor)
-Package: Mail +Package: Mail2
 [2014-06-04 14:30 UTC] lukasp (Lukas Pirl)
Okay, and how do I test then if an emails gets delivered/handed to the local MTA?
 [2014-06-04 14:38 UTC] doconnor (Daniel O'Connor)
Ah see, now that's where I fell over with this! :) Might have to look at mailcatcher or something to programmatically do this.
 [2014-06-04 15:33 UTC] lukasp (Lukas Pirl)
Is calling system binaries an option? python -m smtpd -n -c DebuggingServer localhost:2525 The mails can then be read via stdio.