php-windows Digest 13 Feb 2004 17:20:39 -0000 Issue 2120
Topics (messages 22799 through 22801):
Re: Emailing via mail(), secondary servers
22799 by: Manuel Lemos
22800 by: Svensson, B.A.T. (HKG)
22801 by: Manuel Lemos
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
On Fri, 2004-02-13 at 01:55, Manuel Lemos wrote
> Why would you go watching TV in the neighbours house when you have your
> own TV working at home?
Because of the usual reasons: they might have a bigger or better TV,
or they might have a broader selection on the cable TV network.
Besides the tech points, it might also be be because the neighbor is
a good old friend and one just happen to like the neighbors company,
and (s)he even might have a nice supply of cold beers in the fridge to.
//Anders -- which following this flame war with interest. :)
--- End Message ---
--- Begin Message ---
Hello,
On 02/13/2004 08:13 AM, B.A.T. Svensson wrote:
Why would you go watching TV in the neighbours house when you have your
own TV working at home?
Because of the usual reasons: they might have a bigger or better TV,
or they might have a broader selection on the cable TV network.
Besides the tech points, it might also be be because the neighbor is
a good old friend and one just happen to like the neighbors company,
and (s)he even might have a nice supply of cold beers in the fridge to.
heheh, some people do that yes, but I don't. Not that my TV is better
but I would not have the nerve to push myself to neighbour's house and
disturb them just to abuse of their TV and not for a less material reason.
To bring this back to a more on-topic issue, I am perfectly aware that
there is a lot of people that just download my stuff to learn how to do
things and then adopt the code to their own versions and claim they did
it. Those are the "knowledge s*ckers".
This is part of the reason why I, as an author, prefer to upload it to
the PHPClasses.org site and only allow downloading to subscribers that
need to authenticate.
It does not bother that people just go in there to steal some ideas or
code to gain merits from my work. If it bothered me, I would not have
make it available as Open Source with a BSD license in first place.
However, I am more interested in legitimate users that download and try
the code. This helps me test my code more intensively and iron any bugs
or limitations much faster. I do not even wish or expect people to thank
me. As long as they test the code and report any problems, or do not
report anything because it is all right for them, that is fine for me.
Obviously, the "knowledge s*ckers" will not provide any valuable
feedback. Actually some of them even come in public just to b*tch that I
require them to login to download my stuff. Some even threat to download
similar packages from some other repository, as if I care. The world
does not revolve around any individual alone, even less KS.
If that requirement of login detracts some KS from even accessing the
site, that is just perfect for me. That is not the main reason to keep
that requirement for my classes but it is one reason more.
I can justify spending time and effort to retribute the feedback that
legitimate users provide. As for KS, sorry, they are not helping me at
all, so I can't justify even to worry about the usual b*tching or
threatning to use the TV of some other neighbour. ;-)
--
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
--- End Message ---