Re: [PEPr] Proposal for Mail::Mail_smtp_direct
| From: | Justin Patrin | Date: | Fri, 13 Feb 2004 00:03:39 +0000 |
| Subject: | Re: [PEPr] Proposal for Mail::Mail_smtp_direct | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25632@lists.php.net to get a copy of this message | ||
George Schlossnagle wrote:
On Feb 12, 2004, at 4:48 PM, Luca Mariano wrote:True. If it can be easily implemented, I could add a bit of it here.I don't think so. I extended the phpmailer class in order to do this work, this was for a customer who needs exactly to know all details about mail sent. If you contact directly recipient SMTP you get an exact feedback about the failure reason (if any) or a definitive ok...You do, but: a) your code doesn't handle retries for transient errors, like all major MTAs do.
b) your code doesn't fall back onto A records in the event of non-existent MX records, which while not RFC-compliant is implemented in all major MTAs.Very easy to add. I simply didn't get around to it.
c) You can get that sort of information back from your MTA. Email is designed to be asynchronous, so it's not uncommon to take 15, 30 or 120 minutes to deliver a message. An MTA accounts for that, your class does not (nor can it reasonably be expected to, in all fairness).Very true. Let me clarify a bit. I don't mean for this class to be a replacement for smtp.php or using normal mailing methods. This is only for use by people who are SURE that they want it. This could easily fail if, like me, you're on a cable modem and your IP isn't allowed to send messages to the end server. This case is easily handled by the last bit which uses the default parameters passed in as a fallback. You could easily add your relay server as a fallback in this case. (I realize that if the fallback is used, the port and such will need to be reset for using MX records again. It's a known bug.) -- paperCrane <Justin Patrin>