Re: Emailing via mail(), secondary servers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On 02/12/2004 07:18 PM, Justin Patrin wrote:
 >> No, not directly, but that hardly seems to matter as the original post
 >> asked about relaying.
 >
 >
 > You do not seem to be paying attention. The original post asked
 > explicitly about overriding relaying. Read again.
 >
 >
 >> Problem 2
 >> You can't override the relaying server ip in the mail() function.
 >
 >

I read that as "I want to put in a specific relaying mail server IP but I can't."

I am not a native english speaker but I have the impression that your interpretation is wrong.


If he says that problem 2 is that you can override the relaying, I understand that to solve the problem he wants to override.



IMHO, the original post wanted to try one relaying server, then if it failed, try another (or possibly directly send the message). Which would mean changing the 'relaying server'. Technically, all SMTP servers you connect to are the same no matter whether it relays or accepts for 'local' delivery. You still just hand off the message and let the remote SMTP server deal with delivery.

AFAIK you are wrong there too. Many SMTP servers will require authentication if you want to relay but they will not require it if you are deliverying to the local user. Therefore, technically it is not the same thing.



> When you use sendmail, it does not relay messages in any intermediate
> SMTP server. This is what the Paul Smith seems to want, but the mail
> function does not does that for him.
>
>
>> You could always set up direct delivery by looking up the MX server
>> for the e-mail address and using the 'smtp' Mail type. Or you could make
>
>
> It is not that easy. I will let you figure why as your homework! ;-)
>


Actually, that's exactly what an SMTP sending program does. Look up the MX record in DSN and send to that server directly. If it fails, it tries the next MX server.

Don't be stubborn, trust somebody that has being doing that for years and is telling you that it is not that easy. If you try it enough times and see your messages being rejected, you will open your eyes and realize that I am right when I tell you that it is not that easy.


Anyway, since you jumped here assuming you know everything, I will let you figure what are the problems and why sometimes it is better to rely on some existing and well tested component than do it yourself and break your face enough times until you believe that reinventing the wheel is harder than you could imagine.

Just note down this though: In practice the theory is different.


 >> your own Mail_SMTP_Direct class which wraps around Mail_SMTP and post
 >> it back to PEAR for others use.
 >
 >
 > Are you kidding me? Why would I bother to develop something to work with
 > a PEAR package that I do not use, when I already have a package that
 > does that for me since several years ago?
 >

This is mostly just preference. I don't know why everyone who uses phpclasses gets so defensive when I suggest a PEAR class. I'm just
> suggesting alternatives that I use myself and that I know work well.

Duh? The only reference to phpclasses is because the classes that I suggested and solve the user problems were made available there.

I never said, use this because it is in the PHP Classes.

You seem to be the one that seems to jump frequently with a PEAR alternative, even some that do not solve the problem as in this case, whenever I suggest a class available in PHP Classes as if there is some kind of competition between both sites.



I use PEAR because it has a centralized and robust error reporting mechanism, adheres to high coding standards, is actively tested and maintained by many people, is highly re-usable and tries not to duplicate code, and many other reasons.


Good for you, but this thread was not about PEAR or PHPClasses, it was about solving a problem that the user posted.


Before you get your back up, I'm not saying that the stuff on phpclasses doesn't have these features, I'm just saying that's why I use PEAR. If you don't agree, fine.

PEAR is irrelevant in this thread. What I told you is that it does not make sense to develop something to work with PEAR when I have already a solution that is heavily used and so it is well tested that addresses the original problem of the user.


Why would you go watching TV in the neighbours house when you have your own TV working at home?

Furthermore, unlike you that is focused in making some forced propaganda of PEAR, I was focused on solving the user's problem.

What I proposed just implied adding one include line and replacing his mail() function calls to my smtp_mail() function wrapper. No argument change was necessary.

If he preferred to use the normal object oriented API of the classes I proposed, fine, but he would not have to go through all that trouble if he would not want it. But with your PEAR-maniac solution he would have to learn all about it.


--


Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux