php-windows Digest 12 Feb 2004 11:16:29 -0000 Issue 2118
Topics (messages 22791 through 22796):
Re: Emailing via mail(), secondary servers
22791 by: Justin Patrin
22792 by: Manuel Lemos
22793 by: Justin Patrin
22794 by: Manuel Lemos
New directory structure in PHP5?
22795 by: Dee Kay \(Dmitry Koteroff\)
mime_content_type() don't work
22796 by: Christos Nikolaou
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 ---
Manuel Lemos wrote:
Hello,
On 02/11/2004 09:13 AM, Paul J. Smith wrote:
At the moment you only seem able to send mail via a specific host
specified in the ini file. I want some resilience so I can send
emails even if the first mail server cannot accept email.
Problem 1
As far as I know mail() returns no result so you cannot tell if your
first attempt to mail something was OK or not.
PHP returns a result yes but that means whether the relay SMTP server
accepted the message for later delivery. It can't tell immediately if
the message could be delivered to the final recepient unless the final
SMTP server is the same.
Still, you need to be aware that some servers are configured to ignore
messages that will never be delivered. Most servers will bounce the
message but often not imediately. Usually the messages go to local queue
before they are attempted to deliver to the final mailbox. This has
been particularly true with servers with anti-virus that can't handle
the flood of infected messages so fast.
The best you can do is to set a return path address so the message gets
bounced soon or later in case there was a problem.
Problem 2
You can't override the relaying server ip in the mail() function.
Not on Windows with normal SMTP servers. On Unix/Linux using sendmail,
the messages are not queued using SMTP. That is too slow and pointless
when the sendmail is installed in the same machine where you are sending
messages from.
Has anyone dealt with this? Any suggestions before I try and botch my
own solution?
I would suggest dumping Windows and use a Unix/Linux solution with
sendmail or compatible program like qmail, postfix, etc...
If you are stuck with Windows, you may want to try this SMTP class that
les you send messages directly to the receipient SMTP server, thus
without relaying in any intermediate SMTP server.
http://www.phpclasses.org/smtpclass
If you do not want to change your scripts much, you may also want to use
this other class that uses the class above to send message via SMTP. It
comes with a wrapper function named smtp_mail() that is compatible with
the mail() function but lets you configure SMTP delivery details like
direct delivery option.
http://www.phpclasses.org/mimemessage
You could also try PEAR's Mail package.
http://pear.php.net/package/Mail
--
--
paperCrane <Justin Patrin>
--- End Message ---
--- Begin Message ---
Hello,
On 02/11/2004 08:57 PM, Justin Patrin wrote:
Has anyone dealt with this? Any suggestions before I try and botch my
own solution?
I would suggest dumping Windows and use a Unix/Linux solution with
sendmail or compatible program like qmail, postfix, etc...
If you are stuck with Windows, you may want to try this SMTP class
that les you send messages directly to the receipient SMTP server,
thus without relaying in any intermediate SMTP server.
http://www.phpclasses.org/smtpclass
If you do not want to change your scripts much, you may also want to
use this other class that uses the class above to send message via
SMTP. It comes with a wrapper function named smtp_mail() that is
compatible with the mail() function but lets you configure SMTP
delivery details like direct delivery option.
http://www.phpclasses.org/mimemessage
You could also try PEAR's Mail package.
http://pear.php.net/package/Mail
AFAIK, PEAR Mail package does not support SMTP direct delivery, only
relaying.
--
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 ---
Manuel Lemos wrote:
Hello,
On 02/11/2004 08:57 PM, Justin Patrin wrote:
Has anyone dealt with this? Any suggestions before I try and botch my
own solution?
I would suggest dumping Windows and use a Unix/Linux solution with
sendmail or compatible program like qmail, postfix, etc...
If you are stuck with Windows, you may want to try this SMTP class
that les you send messages directly to the receipient SMTP server,
thus without relaying in any intermediate SMTP server.
http://www.phpclasses.org/smtpclass
If you do not want to change your scripts much, you may also want to
use this other class that uses the class above to send message via
SMTP. It comes with a wrapper function named smtp_mail() that is
compatible with the mail() function but lets you configure SMTP
delivery details like direct delivery option.
http://www.phpclasses.org/mimemessage
You could also try PEAR's Mail package.
http://pear.php.net/package/Mail
AFAIK, PEAR Mail package does not support SMTP direct delivery, only
relaying.
No, not directly, but that hardly seems to matter as the original post
asked about relaying.
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
your own Mail_SMTP_Direct class which wraps around Mail_SMTP and post it
back to PEAR for others use.
--
paperCrane <Justin Patrin>
--- End Message ---
--- Begin Message ---
Hello,
On 02/11/2004 09:35 PM, Justin Patrin wrote:
Has anyone dealt with this? Any suggestions before I try and botch my
own solution?
I would suggest dumping Windows and use a Unix/Linux solution with
sendmail or compatible program like qmail, postfix, etc...
If you are stuck with Windows, you may want to try this SMTP class
that les you send messages directly to the receipient SMTP server,
thus without relaying in any intermediate SMTP server.
http://www.phpclasses.org/smtpclass
If you do not want to change your scripts much, you may also want to
use this other class that uses the class above to send message via
SMTP. It comes with a wrapper function named smtp_mail() that is
compatible with the mail() function but lets you configure SMTP
delivery details like direct delivery option.
http://www.phpclasses.org/mimemessage
You could also try PEAR's Mail package.
http://pear.php.net/package/Mail
AFAIK, PEAR Mail package does not support SMTP direct delivery, only
relaying.
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.
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! ;-)
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?
Furthermore, this package that I recommended provides a direct
replacement to the mail() function as I mentioned. So the users do not
have to figure how use PEAR packages to solve their problem.
They just replace calls to the original mail() functions calls in their
scripts by calls to smtp_mail() which is the replacement provided by the
package that I suggested.
--
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 ---
Hello.
I see that distributibns at http://snaps.php.net uses completely
new directory structure: extensions/ became ext/, subdir dlls/
completely removed (at least, thanks!).
Would it stay in first PHP5 releases or not? Beta3 still uses old
directory structure.
I am writing the book about PHP5 now, and I need to know that
nowadays.
Thanks before.
--
Best regards,
Dmitry Koteroff ([EMAIL PROTECTED]), chief programmer (http://www.dklab.ru).
--- End Message ---
--- Begin Message ---
Hello,
After relative php.ini configuration on windows 2000 or XP
(mime_magic.magicfile ="$PHP_INSTALL_DIR\magic.mime" and
mime_magic.debug = on ofcourse there is magic.mime file in the appropriate
directory)
I have tried to use the mime_content_type function() but this didn't work or
worked partially. Some times returned the correct mime description other
times returned text/plain and other nothing!
please if someone has such experience and he know anything about this
problem let write me.
--- End Message ---