Re: [PHP] Re: SMTP vs mail()

2008-01-15 Thread Richard Lynch
On Tue, January 15, 2008 4:54 am, Stut wrote:
 Manuel Lemos wrote:
 Hello,

 on 01/14/2008 04:15 PM Richard Lynch said the following:
 If you have your sendmail equivalent program properly
 configured,
 no
 SMTP connection is used when queueing messages using the
 sendmail
 program.
 What about when you take into consideration this program could be
 sending 1000's of emails, say, 100 per SMTP connection?
 That is even worse. Keep in mind that the SMTP server of sendmail
 or
 equivalent MTA, ends up calling the sendmail program for each
 individual
 message that it receives.
 That would be the most brain-dead SMTP server on the planet...

 Are you talking Windows or something? :-)

 On the contrary, you may be surprised, but this is precisely inline
 with
 Unix/Linux spirit. Small programs communicating through pipes that
 execute individual tasks each and then exit. Unlike Windows, forking
 new
 programs is not so expensive.

 Anyway, you may want to check these diagrams to learn the
 architecture
 or sendmail and qmail and verify what I am saying:

 http://www.sendmail.org/~ca/email/sm-X/design-2005-05-05/main/node3.html#SECTION0031

 http://www.nrg4u.com/qmail/the-big-qmail-picture-103-p1.gif

 I can't see anywhere in that where it says a new process is spawned
 for
 each message. Sendmail is a beast but it's not that bad. I'm sure you
 *could* configure it to do that, but you'd need to explicitly make
 that
 decision yourself.

 Where do you think it says that?

I suspect Manuel is confusing PHP's built-in mail() function which
does spawn a new sendmail process for email function call with
sendmail itself, which does not -- at least not unless you really work
hard at it.

As to not configuring sendmail to queue/store/send-later, I guess that
might still be the default, but it's a pretty stupid setup for mass
email.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP vs mail()

2008-01-15 Thread Manuel Lemos
Hello,

on 01/15/2008 08:54 AM Stut said the following:
 If you have your sendmail equivalent program properly configured,
 no
 SMTP connection is used when queueing messages using the sendmail
 program.
 What about when you take into consideration this program could be
 sending 1000's of emails, say, 100 per SMTP connection?
 That is even worse. Keep in mind that the SMTP server of sendmail or
 equivalent MTA, ends up calling the sendmail program for each
 individual
 message that it receives.
 That would be the most brain-dead SMTP server on the planet...

 Are you talking Windows or something? :-)

 On the contrary, you may be surprised, but this is precisely inline with
 Unix/Linux spirit. Small programs communicating through pipes that
 execute individual tasks each and then exit. Unlike Windows, forking new
 programs is not so expensive.

 Anyway, you may want to check these diagrams to learn the architecture
 or sendmail and qmail and verify what I am saying:

 http://www.sendmail.org/~ca/email/sm-X/design-2005-05-05/main/node3.html#SECTION0031


 http://www.nrg4u.com/qmail/the-big-qmail-picture-103-p1.gif
 
 I can't see anywhere in that where it says a new process is spawned for



 each message. Sendmail is a beast but it's not that bad. I'm sure you
 *could* configure it to do that, but you'd need to explicitly make that
 decision yourself.
 
 Where do you think it says that?

Check the source Luke! ;-)

Well the diagram shows that the the SMTP server calls the queue manager.
Admitedly it is not clear that it forks a new process to inject the
message in the queue, but you can analyze the source to check it out.

I have checked the sendmail SMTP server source once in the past. I
suppose it hasn't changed that much. Last time I analyzed it I could see
it reads each message from the TCP socket into a file passing it through
eventual mail filters (miltering) and in the end of each message it
forks the queue manager process to inject the message in the queue.


-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP vs mail()

2008-01-15 Thread Manuel Lemos
Hello,

on 01/15/2008 01:41 PM Richard Lynch said the following:
 If you have your sendmail equivalent program properly
 configured,
 no
 SMTP connection is used when queueing messages using the
 sendmail
 program.
 What about when you take into consideration this program could be
 sending 1000's of emails, say, 100 per SMTP connection?
 That is even worse. Keep in mind that the SMTP server of sendmail
 or
 equivalent MTA, ends up calling the sendmail program for each
 individual
 message that it receives.
 That would be the most brain-dead SMTP server on the planet...

 Are you talking Windows or something? :-)
 On the contrary, you may be surprised, but this is precisely inline
 with
 Unix/Linux spirit. Small programs communicating through pipes that
 execute individual tasks each and then exit. Unlike Windows, forking
 new
 programs is not so expensive.

 Anyway, you may want to check these diagrams to learn the
 architecture
 or sendmail and qmail and verify what I am saying:

 http://www.sendmail.org/~ca/email/sm-X/design-2005-05-05/main/node3.html#SECTION0031

 http://www.nrg4u.com/qmail/the-big-qmail-picture-103-p1.gif
 I can't see anywhere in that where it says a new process is spawned
 for
 each message. Sendmail is a beast but it's not that bad. I'm sure you
 *could* configure it to do that, but you'd need to explicitly make
 that
 decision yourself.

 Where do you think it says that?
 
 I suspect Manuel is confusing PHP's built-in mail() function which
 does spawn a new sendmail process for email function call with
 sendmail itself, which does not -- at least not unless you really work
 hard at it.

No, I am not confusing anything, I checked sendmail source, so I know
how it works.


 As to not configuring sendmail to queue/store/send-later, I guess that
 might still be the default, but it's a pretty stupid setup for mass
 email.

Right, AFAIK, only sendmail does that by default. Actually that is the
reason why it may seem slower to call the sendmail program from the
mail() function.

If you configure sendmail to not attempt to deliver the message when the
sendmail program is called, PHP does not have to wait and it is much faster.

Sendmail compatible programs like qmail and postfix do not even have
such options as they always inject the message in the queue and return
right away without having to wait for the delivery attempt.

Unfortunately, many Linux setups come with sendmail by default and it is
not configured to defer message delivery attempts by default. That is
why there is this misconception that using SMTP is faster than using
sendmail program directly to send messages to many recipients.

This is why in my MIME message class I have a function named
SetBulkMail() to tell the message delivery driver to optimize itself for
bulk mailing. In the case of the sendmail driver, it sets up several
options to avoid waiting for delivery attempts.

For SMTP relay deliveries, in case you have no choice, in bulk mail
mode, it avoids disconnections, despite we know this may work upto a
limit of recipients.

For Windows machines with Microsoft Exchange, in bulk mail mode it does
not use SMTP, but rather injects the message in the queue directly if
you have the necessary permissions.

As you may realize now this is a very mature class package that has been
optimized throughout the years to adapt to specific circumstances. For
that, I had to study each MTA and mail server to seek optimization
opportunities.

http://www.phpclasses.org/mimemessage

-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP vs mail()

2008-01-14 Thread Richard Lynch
On Fri, January 11, 2008 2:18 pm, Manuel Lemos wrote:
 on 01/11/2008 06:03 PM Richard Heyes said the following:
 If you have your sendmail equivalent program properly configured,
 no
 SMTP connection is used when queueing messages using the sendmail
 program.

 What about when you take into consideration this program could be
 sending 1000's of emails, say, 100 per SMTP connection?

 That is even worse. Keep in mind that the SMTP server of sendmail or
 equivalent MTA, ends up calling the sendmail program for each
 individual
 message that it receives.

That would be the most brain-dead SMTP server on the planet...

Are you talking Windows or something? :-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP vs mail()

2008-01-14 Thread Manuel Lemos
Hello,

on 01/14/2008 04:15 PM Richard Lynch said the following:
 If you have your sendmail equivalent program properly configured,
 no
 SMTP connection is used when queueing messages using the sendmail
 program.
 What about when you take into consideration this program could be
 sending 1000's of emails, say, 100 per SMTP connection?
 That is even worse. Keep in mind that the SMTP server of sendmail or
 equivalent MTA, ends up calling the sendmail program for each
 individual
 message that it receives.
 
 That would be the most brain-dead SMTP server on the planet...
 
 Are you talking Windows or something? :-)

On the contrary, you may be surprised, but this is precisely inline with
Unix/Linux spirit. Small programs communicating through pipes that
execute individual tasks each and then exit. Unlike Windows, forking new
programs is not so expensive.

Anyway, you may want to check these diagrams to learn the architecture
or sendmail and qmail and verify what I am saying:

http://www.sendmail.org/~ca/email/sm-X/design-2005-05-05/main/node3.html#SECTION0031

http://www.nrg4u.com/qmail/the-big-qmail-picture-103-p1.gif

-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP vs mail()

2008-01-12 Thread Per Jessen
Manuel Lemos wrote:

 Still if you want the fastest delivery in the world, you can skip
 queueing and talk directly to the final SMTP server. That is what the
 direct_delivery mode of this SMTP class does. I use it for deliverying
 really urgent messages. It uses PHP only, there is no sendmail or any
 MTA in the middle. That is why it is the fastest solution. 

Unless you're running on the mail-server or being NAT'ed through the
same, this is not advisable.  You run a significant risk of getting
your emails caught as spam. 

 TCP connections are not a good idea for local connections. That is why
 under Linux/Unix there are Unix domain sockets which are basically
 pipes for inter-program communication.

TCP connections are just fine for local connections.  And on some
platforms/setups they're even faster than Unix domain sockets. 


/Per Jessen, Zürich

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP vs mail()

2008-01-12 Thread Manuel Lemos
Hello,

on 01/12/2008 07:28 AM Per Jessen said the following:
 Still if you want the fastest delivery in the world, you can skip
 queueing and talk directly to the final SMTP server. That is what the
 direct_delivery mode of this SMTP class does. I use it for deliverying
 really urgent messages. It uses PHP only, there is no sendmail or any
 MTA in the middle. That is why it is the fastest solution. 
 
 Unless you're running on the mail-server or being NAT'ed through the
 same, this is not advisable.  You run a significant risk of getting
 your emails caught as spam.

Of course PHP is running on the same machine as the MTA.



 TCP connections are not a good idea for local connections. That is why
 under Linux/Unix there are Unix domain sockets which are basically
 pipes for inter-program communication.
 
 TCP connections are just fine for local connections.  And on some
 platforms/setups they're even faster than Unix domain sockets. 

!?!!? That is something odd to say. I would understand if you would say
that UDP sockets could be almost as fast as Unix domain sockets. But I
never heard of TCP sockets being faster than Unix domain sockets.

Every time I install MySQL on the same machine as the Web server, I
disable networking to make it use Unix domain sockets, for either
greater speed and security.

-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP vs mail()

2008-01-11 Thread Richard Heyes

If you have your sendmail equivalent program properly configured, no
SMTP connection is used when queueing messages using the sendmail program.


What about when you take into consideration this program could be 
sending 1000's of emails, say, 100 per SMTP connection?


--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

** NOW OFFERING FREE ACCOUNTS TO CHARITIES AND NON-PROFITS **

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP vs mail()

2008-01-11 Thread Manuel Lemos
Hello,

on 01/11/2008 06:03 PM Richard Heyes said the following:
 If you have your sendmail equivalent program properly configured, no
 SMTP connection is used when queueing messages using the sendmail
 program.
 
 What about when you take into consideration this program could be
 sending 1000's of emails, say, 100 per SMTP connection?

That is even worse. Keep in mind that the SMTP server of sendmail or
equivalent MTA, ends up calling the sendmail program for each individual
message that it receives.

It is the same operation, except that you are communication directly
with the sendmail program with pipes when you use mail(), and when you
use SMTP it uses SMTP connection that triggers sendmail program calls to
actually queue the message instead of attempting to to deliver it.

The bottom line, if you use qmail, postfix, or sendmail configured to
queue the messages (instead of attempting to deliver them) you will
always be much faster queueing messages.

Just watch out your server disk space and CPU when you are attempting to
deliver too many messages.

-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP vs mail()

2008-01-11 Thread Jim Lucas

Richard Heyes wrote:

If you have your sendmail equivalent program properly configured, no
SMTP connection is used when queueing messages using the sendmail 
program.


What about when you take into consideration this program could be 
sending 1000's of emails, say, 100 per SMTP connection?




In my head, I almost always envision an SMTP server being a separate box from the web server.  If 
this is the case, properly configured local sendmail usage is going to be way faster then a remote 
SMTP connection.


--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP vs mail()

2008-01-11 Thread Per Jessen
Manuel Lemos wrote:

 On Linux/Unix, mail() uses sendmail or equivalent programs. These
 programs use pipes to communicate, which are much faster than using
 SMTP TCP sockets.

Uh, sendmail on unix typically just drops the email file into a
directory for the mailer daemon to pick up from. 


/Per Jessen, Zürich

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: SMTP vs mail()

2008-01-11 Thread Manuel Lemos
Hello,

on 01/11/2008 02:29 PM Richard Heyes said the following:
 Hi,
 
 Bearing in mind I haven't yet done any benchmarks, which do you think is
 faster - SMTP with multiple RCPT commands or the PHP mail() function
 (with it launching a separate sendmail process for each mail() function
 call)?

It depends on the platform you are running PHP.

There is a myth by which people believe that using mail() is slower than
using SMTP connections.

Some of those people using PHP on Windows (especially for development).
On Windows, mail() uses SMTP connections.

On Linux/Unix, mail() uses sendmail or equivalent programs. These
programs use pipes to communicate, which are much faster than using SMTP
TCP sockets.

If you have your sendmail equivalent program properly configured, no
SMTP connection is used when queueing messages using the sendmail program.


-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP vs mail()

2008-01-11 Thread Richard Lynch


On Fri, January 11, 2008 1:51 pm, Manuel Lemos wrote:
 Hello,

 on 01/11/2008 02:29 PM Richard Heyes said the following:
 Hi,

 Bearing in mind I haven't yet done any benchmarks, which do you
 think is
 faster - SMTP with multiple RCPT commands or the PHP mail() function
 (with it launching a separate sendmail process for each mail()
 function
 call)?

 It depends on the platform you are running PHP.

 There is a myth by which people believe that using mail() is slower
 than
 using SMTP connections.

 Some of those people using PHP on Windows (especially for
 development).
 On Windows, mail() uses SMTP connections.

 On Linux/Unix, mail() uses sendmail or equivalent programs. These
 programs use pipes to communicate, which are much faster than using
 SMTP
 TCP sockets.

 If you have your sendmail equivalent program properly configured, no
 SMTP connection is used when queueing messages using the sendmail
 program.

It may be possible to get sendmail to queue up the emails quickly, but
they won't actually go out until much later, when the queue is run...

And I'd be interested to hear of an actual side-by-side comparison on
comparable hardware where sendmail using pipes beats SMTP on a LAN.

If your SMTP server is halfway across the planet, well, yeah, then you
got a problem right there...

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP vs mail()

2008-01-11 Thread Manuel Lemos
Hello,

on 01/11/2008 08:26 PM Richard Lynch said the following:
 Bearing in mind I haven't yet done any benchmarks, which do you
 think is
 faster - SMTP with multiple RCPT commands or the PHP mail() function
 (with it launching a separate sendmail process for each mail()
 function
 call)?
 It depends on the platform you are running PHP.

 There is a myth by which people believe that using mail() is slower
 than
 using SMTP connections.

 Some of those people using PHP on Windows (especially for
 development).
 On Windows, mail() uses SMTP connections.

 On Linux/Unix, mail() uses sendmail or equivalent programs. These
 programs use pipes to communicate, which are much faster than using
 SMTP
 TCP sockets.

 If you have your sendmail equivalent program properly configured, no
 SMTP connection is used when queueing messages using the sendmail
 program.
 
 It may be possible to get sendmail to queue up the emails quickly, but
 they won't actually go out until much later, when the queue is run...

That is exactly how it works when you send a message via sendmail SMTP
server. The message is not delivered right away. If it was there is no
way for the SMTP server to return so fast.

If the SMTP server would wait to have the message delivered, it would
take a long time. Which is exactly what happens when you call the
sendmail program directly because its default delivery mode is to
attempt to deliver the message right away.

Anyway, that is irrelevant. What matters is that PHP is freed to send a
message to the next recipient or to do other stuff.

That is why configuring it to defer the delivery is a much better idea,
than waiting for the message to be processed.

Anyway, the actual delivery may take days to happen because often MTA
needs to retry many times, especially now that many SMTP servers are
using grey listing. It does not make much sense to wait for any delivery.

Still, if you are concerned with waiting for the queue manage to process
the messages, the delay between queue runs is configurable. If you are
still not happy you can configure sendmail queue manager to keep running
persistently.

Still if you want the fastest delivery in the world, you can skip
queueing and talk directly to the final SMTP server. That is what the
direct_delivery mode of this SMTP class does. I use it for deliverying
really urgent messages. It uses PHP only, there is no sendmail or any
MTA in the middle. That is why it is the fastest solution. The class is
the MTA itself.

http://www.phpclasses.org/smtpclass

Actually I use it with the wrapper of the MIME message class for SMTP
because I still need to compose the messages conforming to the e-mail
standards, and that is something hard to do by hand.

http://www.phpclasses.org/mimemessage

This class comes with mail() function replacement named urgent_mail()
that uses the direct delivery mode. If the message is delivered to the
final SMTP server for some reason, it drops it in the local MTA using
the mail() function.

For deliverying non-urgent messages, I use the default delivery method
that uses the mail() function, which pipes messages to the MTA via the
sendmail program or equivalent.

Actually, I do not use sendmail. I use qmail which has its queue manager
running all the time by default. Actually, I don't know if you can make
the qmail queue manager run only once in a while like with sendmail.

The class above also has a driver class to send message via sendmail.
That driver provides options to tell sendmail to queue the messages,
instead of waiting for the message delivery. Since I use qmail, it does
not matter because it always queue the messages.


 And I'd be interested to hear of an actual side-by-side comparison on
 comparable hardware where sendmail using pipes beats SMTP on a LAN.

I am not sure what you mean.

You see, when a message is received by a SMTP server, it is passed also
via pipes to the queue manager. The queue manager decides to send the
message to the final SMTP server via the SMTP client or just drop it in
a queue.

So, the message goes to the same destination, except that using SMTP is
the slow path, because the TCP overhead (think of DNS resolution, TCP
opening sockets, waiting for connections, TCP packet information stuff,
TCP error handling, TCP closing sockets, etc..).

TCP connections are not a good idea for local connections. That is why
under Linux/Unix there are Unix domain sockets which are basically pipes
for inter-program communication.


 If your SMTP server is halfway across the planet, well, yeah, then you
 got a problem right there...

What SMTP server? The final SMTP server associated to the domain of the
recipient?

You know you do not need a SMTP server to send messages. You just need
an MTA (Mail Transfer Agent). Once you queue the message in the MTA
queue, it will take care of the delivery.

-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to 

Re: [PHP] Re: SMTP vs mail()

2008-01-11 Thread Chris



And I'd be interested to hear of an actual side-by-side comparison on
comparable hardware where sendmail using pipes beats SMTP on a LAN.


I don't have that but a comparison between the main open-source mta's 
(all out of the box, no optimizations for any of them) revealed sendmail 
sucks the most - it took almost 3x as long as postfix  exim to send the 
same email to the same number of recipients (of course using the same 
script). qmail was in the middle.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: SMTP

2007-10-25 Thread Jens Kleikamp

Diana schrieb:
I dont know what I did but now I get this message Failed to connect to 
mailserver at localhost port 25, verify your SMTP



Do you have a smtp server running on localhost?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP

2007-10-25 Thread Daniel Brown
On 10/25/07, Jens Kleikamp [EMAIL PROTECTED] wrote:
 Diana schrieb:
  I dont know what I did but now I get this message Failed to connect to
  mailserver at localhost port 25, verify your SMTP
 
 Do you have a smtp server running on localhost?

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



Diana,

Try to keep all of the messages in a single thread so that people
searching the archives can benefit from your solution as well.

Check into the following:

1.) Is there an SMTP server running on port 25 on the local machine?
2.) Is there a firewall blocking incoming or outgoing connections
on that port?
3.) Is PHP able to connect to any remote SMTP servers, or by domain name?

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he'll eat for a day.  Then you'll find out he was
allergic and is hospitalized.  See?  No good deed goes unpunished

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP

2007-10-25 Thread Wolf
As previously posted, you need to work with your mail server admin.

sendmail is not normally on WinDoze boxes, so do some googling for the
setup you have, and talk with your admins to see what you need to do to
get it set up to work correctly.

Wolf

Daniel Brown wrote:
 On 10/25/07, Jens Kleikamp [EMAIL PROTECTED] wrote:
 Diana schrieb:
 I dont know what I did but now I get this message Failed to connect to
 mailserver at localhost port 25, verify your SMTP

 Do you have a smtp server running on localhost?

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 
 Diana,
 
 Try to keep all of the messages in a single thread so that people
 searching the archives can benefit from your solution as well.
 
 Check into the following:
 
 1.) Is there an SMTP server running on port 25 on the local machine?
 2.) Is there a firewall blocking incoming or outgoing connections
 on that port?
 3.) Is PHP able to connect to any remote SMTP servers, or by domain name?
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: SMTP Server

2005-01-16 Thread eriksson

Protected message is attached.


+++ Attachment: No Virus found
+++ Kaspersky AntiVirus - www.kaspersky.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: SMTP Authentication with PHP

2004-04-15 Thread Manuel Lemos
Hello,

On 04/15/2004 02:24 PM, Mike Knittel wrote:
My SMTP server requires authentication when sending mail.  How do I send
SMTP authentication information when using the PHP mail() function?
The mail() function does not support authentication.

You may want to try this class that comes with a wrapper function named 
smtp_mail(). It emulates the mail() function completely but lets you 
configure details like authentication and such. Just edit the 
smtp_mail.php script.

http://www.phpclasses.org/mimemessage

You also need this:

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Re: SMTP Authentication

2004-03-13 Thread Beauford
Thanks, I'll check them out. 

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
Sent: March 12, 2004 11:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: SMTP Authentication

Hello,

On 03/13/2004 12:54 AM, Beauford wrote:
 How would I set up PHP to use SMTP authentication when I send an 
 email. For example, in MS Outlook I have authentication set to use the 
 same settings as my incoming mail. I have searched around but haven't 
 found anything that deals with this.

The mail function does not support authentication. You may want to try this
class that comes with a wrapper function named smtp_mail(). It emulates the
mail() function but lets you specify the authentication
credentials:

http://www.phpclasses.org/mimemessage

You also need this:

http://www.phpclasses.org/smtpclass

-- 

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP Authentication

2004-03-13 Thread Elliot J. Balanza
I still wonder, how your smtp server requires authentification even when
using the function internally. For my education please... does that means
that you are using a third party SMTP, meaning some SMTP outside your
server?

vamp

Beauford [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
 Thanks, I'll check them out.

 -Original Message-
 From: Manuel Lemos [mailto:[EMAIL PROTECTED]
 Sent: March 12, 2004 11:31 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: SMTP Authentication

 Hello,

 On 03/13/2004 12:54 AM, Beauford wrote:
  How would I set up PHP to use SMTP authentication when I send an
  email. For example, in MS Outlook I have authentication set to use the
  same settings as my incoming mail. I have searched around but haven't
  found anything that deals with this.

 The mail function does not support authentication. You may want to try
this
 class that comes with a wrapper function named smtp_mail(). It emulates
the
 mail() function but lets you specify the authentication
 credentials:

 http://www.phpclasses.org/mimemessage

 You also need this:

 http://www.phpclasses.org/smtpclass

 -- 

 Regards,
 Manuel Lemos

 PHP Classes - Free ready to use OOP components written in PHP
 http://www.phpclasses.org/

 PHP Reviews - Reviews of PHP books and other products
 http://www.phpclasses.org/reviews/

 Metastorage - Data object relational mapping layer generator
 http://www.meta-language.net/metastorage.html

 --
 PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
 http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SMTP Authentication

2004-03-13 Thread Norbert Pfeiffer
Hi Richard,

unfortunately you err.
I use already XnView.
This program does not support the looked for formats.


m. b. G. Norbert
_
normal:  02686-987103
Notruf:  0177-2363368
-
e.o.m.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: SMTP Authentication

2004-03-12 Thread Elliot J. Balanza
The thing is... if you are sending the mail from within your server why do
you need to authentificate you are yourself?

Vamp.

Beauford [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
 Hi,

 How would I set up PHP to use SMTP authentication when I send an email.
For
 example, in MS Outlook I have authentication set to use the same settings
as
 my incoming mail. I have searched around but haven't found anything that
 deals with this.

 Thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: SMTP Authentication

2004-03-12 Thread Manuel Lemos
Hello,

On 03/13/2004 12:54 AM, Beauford wrote:
How would I set up PHP to use SMTP authentication when I send an email. For
example, in MS Outlook I have authentication set to use the same settings as
my incoming mail. I have searched around but haven't found anything that
deals with this.
The mail function does not support authentication. You may want to try 
this class that comes with a wrapper function named smtp_mail(). It 
emulates the mail() function but lets you specify the authentication 
credentials:

http://www.phpclasses.org/mimemessage

You also need this:

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: SMTP ERROR

2004-03-03 Thread Manuel Lemos
Hello,

On 03/03/2004 06:03 PM, Carlos Castillo wrote:
When i try to send a mail i receive the followin error

Warning: mail() [function.mail]: SMTP server response: 503 Comando o
secuencia de comandos inesperados in
E:\wwwroot\helpdesk_imagine\classes\helpdesk.class.php on line 1054
But the mail is sent, it occurs sometimes not always.
This is probably a bug of the mail() function under Windows.

You may want to try this class that comes with a wrapper function named 
smtp_mail(). It emulates the mail() using a direct SMTP connection to 
the SMTP server that you choose. You can enabled debugging in the 
smtp_mail.php wrapper script so you can see what is the problem in case 
any error occurs. If no error occurs, the problem is in the mail() 
function are you are safe by using this replacement function.

http://www.phpclasses.org/mimemessage

You also need this for the actual SMTP delivery.

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: SMTP vs POP3

2003-12-05 Thread Manuel Lemos
Hello,

On 12/05/2003 12:26 AM, [EMAIL PROTECTED] wrote:
I have this code to send email via STMP server

$msg = this is a test - ojpp - mail function;
$senderFrom = [EMAIL PROTECTED];
$receiverTo = [EMAIL PROTECTED];
$subject = test of the mail function;
$mailHeaders = From: $senderFrom\n;
$mailHeaders .= Reply-to: $senderFrom\n;
$mailHeaders .= Message-Id: 16295644\n;
mail($receiverTo, $subject, $msg, $mailHeaders);
What is the function to receive email via POP server?, anyone could give me a simple example, thanks for any help, bye.

Is it possible to retrieve via POP server, only part of the email information?, thanks for any help, bye.
Sure, try this class:

http://www.phpclasses.org/pop3class

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: SMTP server response: 550 5.7.1 Unable to relay for

2003-08-28 Thread Manuel Lemos
Hello,

On 08/27/2003 04:04 PM, ÀLex Camps wrote:
i have windows xp with apache,php and argomail
but i cant send emails from php why?
It seems you need to authenticate with the SMTP server. You can't do 
that with the mail() function. Try these classes in conjunction. They 
come with a function named smtp_mail() that you can use as replacement 
to the mail() function but you can also specify the user and password to 
authenticat with the SMTP server:

http://www.phpclasses.org/mimemessage

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: SMTP server response: 550 5.7.1 Unable to relay for

2003-08-27 Thread DvDmanDT
Maybe that feature is disabled or you didn't enter your DNS servers... If
you add me to MSN, I can help you set that up... I had some problems myself
you see (Xp, Apache, PHP, Argomail)..

-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
ÀLex Camps [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 i have windows xp with apache,php and argomail
 but i cant send emails from php why?
 thaks.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: SMTP Authenticate

2003-03-15 Thread Manuel Lemos
Hello,

On 03/15/2003 01:43 PM, Aitor Cabrera wrote:
Hi, I'm trying to use the mail() funtion but I can only use this funtion the email myself (the same email that I put in the php.ini file). I f I try to email someone else I get an error 

530 delivery not allowed to non-local recipient, try authenticating -7

How can I authenticate myselft? Which is the SMTP comand to do it and how do I use it? Thanks!!
mail() does not support authentication. You may want to try this class 
that lets you specify the authentication credentials and comes with a 
wrapper function named smtp_mail() that sends the message to a SMTP 
server that you specify:

http://www.phpclasses.org/mimemessage

You also need this class to do the actual SMTP delivery:

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: SMTP Authenticate

2003-03-15 Thread Bobby Patel
There is another php mailer class which  is really good (and includes
authentication among alot of other things).
http://phpmailer.sourceforge.net

Aitor Cabrera [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi, I'm trying to use the mail() funtion but I can only use this funtion the
email myself (the same email that I put in the php.ini file). I f I try to
email someone else I get an error

530 delivery not allowed to non-local recipient, try authenticating -7

How can I authenticate myselft? Which is the SMTP comand to do it and how do
I use it? Thanks!!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: SMTP, mail() and piping directly into Sendmail, which is better?

2003-01-22 Thread Jonathan Chum
Ignore this post, I got my answers from the archives :)
Jonathan Chum [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm working on mass mailing list application and doing my research on the
 part with the actual delivery of the message. I've been using a Perl
script
 called MojoMail which sends out blasts just fine and boasts that SMTP is
the
 fastest way for delivery than with Sendmail using a module called
BulkMail.
 I always understood that SMTP adds an additional layer around the MTA
which
 really slows things down, however only useful if you plan to blast emails
 across several SMTP servers for a load balancing purposes.

 So that's a 'pro' for using SMTP. The 'con' is that delivery is not quite
as
 fast.

 Then with PHP's mail(), folks have been saying that because it
opens/closes
 a connection, looping through mail() adds additional overhead and that the
 best way would be to pipe into the MTA with popen()/pclose()

 Now I'm curious which method is really better...Piping into the MTA will
 still open/close the connection and adds the same amount of overhead as
 mail() do right? What are your thoughts on SMTP?





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: SMTP, mail() and piping directly into Sendmail, which is better?

2003-01-22 Thread Manuel Lemos
Hello,

On 01/23/2003 01:48 AM, Jonathan Chum wrote:

Then with PHP's mail(), folks have been saying that because it opens/closes
a connection, looping through mail() adds additional overhead and that the
best way would be to pipe into the MTA with popen()/pclose()


People that say that are either Windows users or have no idea how mail 
works. Only on Windows the mail() function relays messages to a SMTP 
server. Under Unix/Linux mail just calls the sendmail program piping the 
  message data to the standard input like with popen and pclose.



Now I'm curious which method is really better...Piping into the MTA will
still open/close the connection and adds the same amount of overhead as
mail() do right? What are your thoughts on SMTP?


Forget relaying on a SMTP server even when it is the local server. 
Relaying via SMTP just does the same thing as piping data to sendmail 
except that it takes a longer trip by establishing a TCP connection to 
the SMTP server.

To make relaying faster, it is better to call sendmail directly passing 
the necessary switches to make it just accept the message without any 
delay so it will free your PHP script. Delivery will happen next time it 
will run the queue.


--

Regards,
Manuel Lemos


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: smtp relay problem

2002-04-16 Thread phplists

Sounds like an MTA issue. You should find out which MTA it is and look at
their support site..

Sendmail has a feature that will rewrite the domain on all outgoing
addresses unless the user sending out is a 'trusted' user.. That could be
the problem you are experiencing. You should certainly have an entry for the
IP of your server sending email with PHP in the relay-domains and access
files.. Everything else should be blocked unless necessary.

Later,

Bob Weaver

Kris Vose [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I am having problems with my mail server. When I use the mail function in
php it resets the domain of the from: address when the script is executed.

For example: when the from: address is set to [EMAIL PROTECTED] it resets it
to the mail servers domain [EMAIL PROTECTED] I believe this is due to
smtp relaying being blocked. Is there anyway around this problem in php or
is the only solution to unblock smtp relaying? Also...this may not be the
problem at all.

All input is appreciated. Thanks

Kris Vose




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php