Sendmail, imap_mail() and SMTP on Unix
| From: | Olivier Cahagne | Date: | Thu, 28 Sep 2000 11:39:51 +0000 |
| Subject: | Sendmail, imap_mail() and SMTP on Unix | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-33807@lists.php.net to get a copy of this message | ||
(This is also a resent as the mailing-list went down lately.)
Well, imap_mail() uses sendmail internally on Unix systems and uses smtp functions on WIN32 (via the sendmail/smtp functions in win32/sendmail.c I guess). I only have SMTP here to send mail as the mail-wrapper running on my system is not compatible with the standard sendmail arguments (cc and bcc headers for e.g.). There's no smtp code on Unix in ext/imap. Charles Hagenbuch (IMAP and mcal contributor) said one year ago he might have a look at it: http://www.geocrawler.com/archives/3/5/1999/8/0/2539790/ The c-client library has 3 main functions described in docs/internal.txt (mine is from v.2000 release candidate 6): - smtp_open() - smtp_close() - smtp_mail() So, I don't know if: - the existing imap_mail() should have a smtp flag with optional parameters and the smtp would be managed internally in PHP or, - imap_smtp_open()-style functions should be created. I wanted to work on that but am waiting for Zend API doc. [:)] There's a bug report/feature request for this: #6574Feature wanted: - SMTP function through imap c-client libHow about imap_mail()?
That would be nice, especially considering the win32/sendmail.* code already handles the job correctly. -- Olivier.Cahagne@epita.fr- would it be possible to use the integrated sendmail-for-Windows on Unix systems when there're no sendmail-like mailer on the system (and though mail() won't work) ?I think that's easy enough. mail() could try sendmail first and then fallback to the integrated one.