473,320 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

mail function and sendmail

Hi all,

The PHP manual states that: "The Windows implementation of mail()
differs in many ways from the Unix implementation. First, it doesn't
use a local binary for composing messages but only operates on direct
sockets which means a MTA is needed listening on a network socket
(which can either on the localhost or a remote machine). "

Does this mean that the sendmail binary is NOT needed on windows?

Also, the manual used to state that:

"For the Mail functions to be available, PHP must have access to the
sendmail binary on your system during compile time. If you use another
mail program, such as qmail or postfix, be sure to use the appropriate
sendmail wrappers that come with them. PHP will first look for
sendmail in your PATH, and then in the following: /usr/bin:/usr/sbin:/
usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have
sendmail available from your PATH. Also, the user that compiled PHP
must have permission to access the sendmail binary."

I couldn't find this in the manual anymore, is it still applicable?
What if you are downloading the PHP binaries, do you need to worry
about this?

Thanks

Taras
Jul 9 '08 #1
11 1932
Taras_96 wrote:
Hi all,

The PHP manual states that: "The Windows implementation of mail()
differs in many ways from the Unix implementation. First, it doesn't
use a local binary for composing messages but only operates on direct
sockets which means a MTA is needed listening on a network socket
(which can either on the localhost or a remote machine). "

Does this mean that the sendmail binary is NOT needed on windows?

Also, the manual used to state that:

"For the Mail functions to be available, PHP must have access to the
sendmail binary on your system during compile time. If you use another
mail program, such as qmail or postfix, be sure to use the appropriate
sendmail wrappers that come with them. PHP will first look for
sendmail in your PATH, and then in the following: /usr/bin:/usr/sbin:/
usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have
sendmail available from your PATH. Also, the user that compiled PHP
must have permission to access the sendmail binary."

I couldn't find this in the manual anymore, is it still applicable?
What if you are downloading the PHP binaries, do you need to worry
about this?

Thanks

Taras
No, you don't need a sendmail binary on Windows - and never have, AFAIK.
You do need access to an MTA, which can be running on your system or
another (such as your ISP). You set the host in your php.ini file.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jul 9 '08 #2
Greetings, Taras_96.
In reply to message from Jerry Stuckle dated Wednesday, July 9, 2008, 16:25:01,
>The PHP manual states that: "The Windows implementation of mail()
differs in many ways from the Unix implementation. First, it doesn't
use a local binary for composing messages but only operates on direct
sockets which means a MTA is needed listening on a network socket
(which can either on the localhost or a remote machine). "

Does this mean that the sendmail binary is NOT needed on windows?

Also, the manual used to state that:

"For the Mail functions to be available, PHP must have access to the
sendmail binary on your system during compile time. If you use another
mail program, such as qmail or postfix, be sure to use the appropriate
sendmail wrappers that come with them. PHP will first look for
sendmail in your PATH, and then in the following: /usr/bin:/usr/sbin:/
usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have
sendmail available from your PATH. Also, the user that compiled PHP
must have permission to access the sendmail binary."

I couldn't find this in the manual anymore, is it still applicable?
What if you are downloading the PHP binaries, do you need to worry
about this?
No, you don't need a sendmail binary on Windows - and never have, AFAIK.
You do need access to an MTA, which can be running on your system or
another (such as your ISP). You set the host in your php.ini file.
Strictly speaking, it is possible to have sendmail (or at least ssmtp) on
windows system... but that's a waste of mind. PHP can interact directly with
SMTP server and it is adwised to do it that way in php.ini.
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Jul 10 '08 #3
AnrDaemon wrote:
Greetings, Taras_96.
In reply to message from Jerry Stuckle dated Wednesday, July 9, 2008, 16:25:01,
>>The PHP manual states that: "The Windows implementation of mail()
differs in many ways from the Unix implementation. First, it doesn't
use a local binary for composing messages but only operates on direct
sockets which means a MTA is needed listening on a network socket
(which can either on the localhost or a remote machine). "

Does this mean that the sendmail binary is NOT needed on windows?

Also, the manual used to state that:

"For the Mail functions to be available, PHP must have access to the
sendmail binary on your system during compile time. If you use another
mail program, such as qmail or postfix, be sure to use the appropriate
sendmail wrappers that come with them. PHP will first look for
sendmail in your PATH, and then in the following: /usr/bin:/usr/sbin:/
usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have
sendmail available from your PATH. Also, the user that compiled PHP
must have permission to access the sendmail binary."

I couldn't find this in the manual anymore, is it still applicable?
What if you are downloading the PHP binaries, do you need to worry
about this?
>No, you don't need a sendmail binary on Windows - and never have, AFAIK.
You do need access to an MTA, which can be running on your system or
another (such as your ISP). You set the host in your php.ini file.

Strictly speaking, it is possible to have sendmail (or at least ssmtp) on
windows system... but that's a waste of mind. PHP can interact directly with
SMTP server and it is adwised to do it that way in php.ini.
Gotta stick your nose in again with another worthless comment, huh?
>[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jul 10 '08 #4
Greetings, Jerry Stuckle.
In reply to Your message dated Friday, July 11, 2008, 1:17:35,
Gotta stick your nose in again with another worthless comment, huh?
Not as worthless as your answer to my post.
(TBH, I've found ssmtp/W32 very useful, but that's not PHP related issue)
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Jul 11 '08 #5
On Fri, 11 Jul 2008 00:13:03 +0400, AnrDaemon wrote:
Greetings, Taras_96. In reply to message from Jerry Stuckle dated
Wednesday, July 9, 2008, 16:25:01,
>No, you don't need a sendmail binary on Windows - and never have,
AFAIK. You do need access to an MTA, which can be running on your
system or another (such as your ISP). You set the host in your
php.ini file.

Strictly speaking, it is possible to have sendmail (or at least ssmtp)
on windows system... but that's a waste of mind. PHP can interact
directly with SMTP server and it is adwised to do it that way in
php.ini.
What happens to the script it the remote SMTP server is temporarily
unavailable? You needn't actually answer, but it's something that *does*
need to be accounted for without a local MTA daemon. sendmail and it's
work-alike wrapped replacements are at least guaranteed to accept and
hold mails for the SMTP service to come back, but sSTMP and the build-in
Windows PHP mailer are not.

--
11. I will be secure in my superiority. Therefore, I will feel no need to prove
it by leaving clues in the form of riddles or leaving my weaker enemies
alive to show they pose no threat.
--Peter Anspach's list of things to do as an Evil Overlord
Jul 11 '08 #6
Peter H. Coffin wrote:
On Fri, 11 Jul 2008 00:13:03 +0400, AnrDaemon wrote:
>Greetings, Taras_96. In reply to message from Jerry Stuckle dated
Wednesday, July 9, 2008, 16:25:01,
>>No, you don't need a sendmail binary on Windows - and never have,
AFAIK. You do need access to an MTA, which can be running on your
system or another (such as your ISP). You set the host in your
php.ini file.
Strictly speaking, it is possible to have sendmail (or at least ssmtp)
on windows system... but that's a waste of mind. PHP can interact
directly with SMTP server and it is adwised to do it that way in
php.ini.

What happens to the script it the remote SMTP server is temporarily
unavailable? You needn't actually answer, but it's something that *does*
need to be accounted for without a local MTA daemon. sendmail and it's
work-alike wrapped replacements are at least guaranteed to accept and
hold mails for the SMTP service to come back, but sSTMP and the build-in
Windows PHP mailer are not.
The same thing that happens when the local MTA isn't available. The
function call fails.

But considering how many ISP's are now blocking port 25 for outgoing
email, it doesn't make much sense to run your own email server.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jul 11 '08 #7
Peter H. Coffin wrote:
On Thu, 10 Jul 2008 21:02:52 -0400, Jerry Stuckle wrote:
>Peter H. Coffin wrote:
>>On Fri, 11 Jul 2008 00:13:03 +0400, AnrDaemon wrote:

Greetings, Taras_96. In reply to message from Jerry Stuckle dated
Wednesday, July 9, 2008, 16:25:01,

No, you don't need a sendmail binary on Windows - and never have,
AFAIK. You do need access to an MTA, which can be running on your
system or another (such as your ISP). You set the host in your
php.ini file.
Strictly speaking, it is possible to have sendmail (or at least ssmtp)
on windows system... but that's a waste of mind. PHP can interact
directly with SMTP server and it is adwised to do it that way in
php.ini.
What happens to the script it the remote SMTP server is temporarily
unavailable? You needn't actually answer, but it's something that *does*
need to be accounted for without a local MTA daemon. sendmail and it's
work-alike wrapped replacements are at least guaranteed to accept and
hold mails for the SMTP service to come back, but sSTMP and the build-in
Windows PHP mailer are not.
The same thing that happens when the local MTA isn't available. The
function call fails.

Ah, but if a local MTA isn't available, that's *your* fault, not someone
else's.
>But considering how many ISP's are now blocking port 25 for outgoing
email, it doesn't make much sense to run your own email server.

Ain't that big a deal. Have the local MTA rigged to deliver to the
remote MTA the same way as whatever the sSMTP or built-in mailer would
do. All the good MTAs can play nicely with smarthosts at least as well
as all good mail clients.
If you have a smarthost on the other end which accepts relays for other
domains. There aren't many of those out there unless you have a VPS or
dedicated server.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jul 18 '08 #8
On Fri, 18 Jul 2008 16:29:09 -0400, Jerry Stuckle wrote:
Peter H. Coffin wrote:
>On Thu, 10 Jul 2008 21:02:52 -0400, Jerry Stuckle wrote:
>>The same thing that happens when the local MTA isn't available. The
function call fails.

Ah, but if a local MTA isn't available, that's *your* fault, not
someone else's.
>>But considering how many ISP's are now blocking port 25 for outgoing
email, it doesn't make much sense to run your own email server.

Ain't that big a deal. Have the local MTA rigged to deliver to the
remote MTA the same way as whatever the sSMTP or built-in mailer
would do. All the good MTAs can play nicely with smarthosts at least
as well as all good mail clients.


If you have a smarthost on the other end which accepts relays for
other domains. There aren't many of those out there unless you have a
VPS or dedicated server.
If you can't get mail out with an MTA, you can't get mail out with
sSMTP. And there are transitory circumstances under which you CAN get
mail out with a real MTA that would fail with sSMTP. That's the whole
of my point.

--
65. If I must have computer systems with publically available terminals, the
maps they display of my complex will have a room clearly marked as the Main
Control Room. That room will be the Execution Chamber. The actual main
control room will be marked as Sewage Overflow Containment. --Overlord
Jul 21 '08 #9
Peter H. Coffin wrote:
On Fri, 18 Jul 2008 16:29:09 -0400, Jerry Stuckle wrote:
>Peter H. Coffin wrote:
>>On Thu, 10 Jul 2008 21:02:52 -0400, Jerry Stuckle wrote:

The same thing that happens when the local MTA isn't available. The
function call fails.
Ah, but if a local MTA isn't available, that's *your* fault, not
someone else's.

But considering how many ISP's are now blocking port 25 for outgoing
email, it doesn't make much sense to run your own email server.
Ain't that big a deal. Have the local MTA rigged to deliver to the
remote MTA the same way as whatever the sSMTP or built-in mailer
would do. All the good MTAs can play nicely with smarthosts at least
as well as all good mail clients.

If you have a smarthost on the other end which accepts relays for
other domains. There aren't many of those out there unless you have a
VPS or dedicated server.

If you can't get mail out with an MTA, you can't get mail out with
sSMTP. And there are transitory circumstances under which you CAN get
mail out with a real MTA that would fail with sSMTP. That's the whole
of my point.
Not really true. As I indciated, MTA's use port 25 for communications
between systems. Those are now being blocked by more and more ISPs.
However, port 587 is supposed to be used for users to connect to their
MTA and still open. However, if set up properly, port 587 requires
authorization - something a spammer wouldn't have.

So running an MTA on your machine won't help if port 25 outgoing is
blocked. And very few people have access to smarthosts. Those who do
are mainly employees of large companies.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jul 21 '08 #10

"Jerry Stuckle" <js*******@attglobal.netwrote in message
news:g6**********@registered.motzarella.org...
Peter H. Coffin wrote:
>On Fri, 18 Jul 2008 16:29:09 -0400, Jerry Stuckle wrote:
>>Peter H. Coffin wrote:

On Thu, 10 Jul 2008 21:02:52 -0400, Jerry Stuckle wrote:

The same thing that happens when the local MTA isn't available. The
function call fails.
Ah, but if a local MTA isn't available, that's *your* fault, not
someone else's.

But considering how many ISP's are now blocking port 25 for outgoing
email, it doesn't make much sense to run your own email server.
Ain't that big a deal. Have the local MTA rigged to deliver to the
remote MTA the same way as whatever the sSMTP or built-in mailer
would do. All the good MTAs can play nicely with smarthosts at least
as well as all good mail clients.

If you have a smarthost on the other end which accepts relays for
other domains. There aren't many of those out there unless you have a
VPS or dedicated server.

If you can't get mail out with an MTA, you can't get mail out with
sSMTP. And there are transitory circumstances under which you CAN get
mail out with a real MTA that would fail with sSMTP. That's the whole
of my point.

Not really true. As I indciated, MTA's use port 25 for communications
between systems. Those are now being blocked by more and more ISPs.
However, port 587 is supposed to be used for users to connect to their MTA
and still open. However, if set up properly, port 587 requires
authorization - something a spammer wouldn't have.
wow, jerry! kinda, but not really? an explanation would really be amusing
here!

if set up properly, any port (25 inclusive) can be made to require
authorization...but that's not even a direct counter to 'all the good mtas
can play nicely with smarthosts...'. it's not even a side-ways counter. it's
nothing to do with the point.
So running an MTA on your machine won't help if port 25 outgoing is
blocked. And very few people have access to smarthosts. Those who do are
mainly employees of large companies.
you keep using terms like 'very few people' and 'those are now being blocked
by more and more isps'. it begs the question jerry. care to quantify that
with cited materials? that would certainly help you make a case that
'playing nicely' is play that is hard to come by these days.

why do you go soooo far off tangent from what the OP actually asks? usually
it shows you making unsubstantiated claims...and shows your lack of
knowledge in anything not directly php code language specific, i.e. how
email works.

hmmmm...here's a test. tell us, oh knowledgable one, what 'transitory
circumstances' would they be that would allow mail out with a real MTA but
where a binary such as sstmp would fail? i can think of a couple off the top
of my head. if any had come to your mind, i'm sure you wouldn't have strayed
so far from the point, and as readily!

and btw, nice display of christianly love with the response to arn! at least
my 'lying' involves keeping my mouth shut...yours careens out of your pie
hole with the unrelently onslaught of your typing fingers! we'd all much
appreciate you lying in the manner i espouse. :)

keep your yap shut, jer.
Jul 21 '08 #11

"Jerry Stuckle" <js*******@attglobal.netwrote in message
news:g6**********@registered.motzarella.org...
Peter H. Coffin wrote:
>On Fri, 18 Jul 2008 16:29:09 -0400, Jerry Stuckle wrote:
>>Peter H. Coffin wrote:

On Thu, 10 Jul 2008 21:02:52 -0400, Jerry Stuckle wrote:

The same thing that happens when the local MTA isn't available. The
function call fails.
Ah, but if a local MTA isn't available, that's *your* fault, not
someone else's.

But considering how many ISP's are now blocking port 25 for outgoing
email, it doesn't make much sense to run your own email server.
Ain't that big a deal. Have the local MTA rigged to deliver to the
remote MTA the same way as whatever the sSMTP or built-in mailer
would do. All the good MTAs can play nicely with smarthosts at least
as well as all good mail clients.

If you have a smarthost on the other end which accepts relays for
other domains. There aren't many of those out there unless you have a
VPS or dedicated server.

If you can't get mail out with an MTA, you can't get mail out with
sSMTP. And there are transitory circumstances under which you CAN get
mail out with a real MTA that would fail with sSMTP. That's the whole
of my point.

Not really true. As I indciated, MTA's use port 25 for communications
between systems. Those are now being blocked by more and more ISPs.
However, port 587 is supposed to be used for users to connect to their MTA
and still open. However, if set up properly, port 587 requires
authorization - something a spammer wouldn't have.
wow, jerry! kinda, but not really? an explanation would really be amusing
here!

if set up properly, any port (25 inclusive) can be made to require
authorization...but that's not even a direct counter to 'all the good mtas
can play nicely with smarthosts...'. it's not even a side-ways counter. it's
nothing to do with the point.
So running an MTA on your machine won't help if port 25 outgoing is
blocked. And very few people have access to smarthosts. Those who do are
mainly employees of large companies.
you keep using terms like 'very few people' and 'those are now being blocked
by more and more isps'. it begs the question jerry. care to quantify that
with cited materials? that would certainly help you make a case that
'playing nicely' is play that is hard to come by these days.

why do you go soooo far off tangent from what the OP actually asks? usually
it shows you making unsubstantiated claims...and shows your lack of
knowledge in anything not directly php code language specific, i.e. how
email works.

hmmmm...here's a test. tell us, oh knowledgable one, what 'transitory
circumstances' would they be that would allow mail out with a real MTA but
where a binary such as sstmp would fail? i can think of a couple off the top
of my head. if any had come to your mind, i'm sure you wouldn't have strayed
so far from the point, and as readily!

and btw, nice display of christianly love with the response to arn! at least
my 'lying' involves keeping my mouth shut...yours careens out of your pie
hole with the unrelently onslaught of your typing fingers! we'd all much
appreciate you lying in the manner i espouse. :)

keep your yap shut, jer.
Jul 21 '08 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: bonfils | last post by:
I believe this question has been asked before, but I haven't found the solution to it. I've given up on the php mail() function (doesn't work fast enough for sending large amounts of HTML...
4
by: CoralineSage | last post by:
Hi All, I'm running a bulleting board in PHP and everytime a new user registers s/he is supposed to receive an email confirmation. After filling out the registration form and clicking on submit...
4
by: Data Goob | last post by:
This one has me stumped. How did SuSE disable the mail() function in their RPM'd version of PHP? ( This is their install-version of PHP with RPMs not what you download from PHP.net ) I have...
1
by: tencip | last post by:
Hey everyone, We've got FreeBSD 5.3, with Sendmail running. All we want to do is to get sendmail to send emails to another server for actual outbound email. We've got a very basic php script...
2
by: MLH | last post by:
I cut a mail function off the m'soft site. Has always worked. However, I would like to include error codes returned by the sendmail Fn and be able to understand what they mean. I had my first...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
6
by: cover | last post by:
I'm using PHP 5 at home w/Apache & MySQL on a test system where I write through a form to a database and also send an email to people on a drop down list. Purpose for this is an electronic log at...
7
by: r0g | last post by:
I'd like PHP to send mail to a local mailserver running at localhost:25 like I used to on windows. This mailserver is a dummy server which just writes the mail to disk for unit testing and works...
6
by: phpmagesh | last post by:
Hi, I am using mail function in my php page, As soon i update the details, i have to send mail to the customer with the updated details, problem is when i send mail it simple through waring msg...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.