Re: Emailing via mail(), secondary servers

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

 



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

--
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