[PHP] Re: PHP SMTP Mailers

2010-03-22 Thread Auke van Slooten

King Coffee wrote:

Hi,

I'm executing a third-parity standard PHP application on a Windows IIS 7 
shared hosting server.


I need to convert, or use, a SMTP mailer service.  I found two SMTP PHP 
scripts - I think may work.


The sourceforge.net PHPMailer project and the pear.php.net (Mail, 
Net_SMTP) project.


Can any body please help me choose one and probably give a code snip of 
useage?


Currently, I'm leaning forward the PHPMailer, with little to base the 
decision on.


Hi,

I'd take a look at http://www.phpguru.org/static/smtp.html
It doesn't make the mistake of muddling the differnece between the 
message envelope and the message body, so you can set the recipients 
directly and different from the messages to/cc/bcc headers. It has a 
fairly sane design, based on the smtp protocol. And finally it uses 
exceptions in a sane way. Oh, and its a fairly small and straightforward 
piece of code, easy to include in any application.


There's one problem in it when using it for bulk-mail. If you add many 
recipients and one of them is incorrect, it will fail the entire message.


It's not free for commercial use, but the one-time license fee is more 
than worth it.


regards,
Auke van Slooten
Muze

(And no, I'm not affiliated with the author, just a happy customer).

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



Re: [PHP] PHP SMTP Mailers

2010-03-22 Thread Michael A. Peters

King Coffee wrote:

Hi,

I'm executing a third-parity standard PHP application on a Windows IIS 7 
shared hosting server.


I need to convert, or use, a SMTP mailer service.  I found two SMTP PHP 
scripts - I think may work.


The sourceforge.net PHPMailer project and the pear.php.net (Mail, 
Net_SMTP) project.


Can any body please help me choose one and probably give a code snip of 
useage?


Currently, I'm leaning forward the PHPMailer, with little to base the 
decision on.


Thanks in advanced,
King Coffee



I use phpmailer and find it to be painless and consistent.

I extend the class and call the extended class:

?php
require(class.phpmailer.php);

class MyMailer extends PHPMailer {
// Set default variables for all new objects
var $From = zon...@shastaherps.org;
var $FromName = Lampro P. Eltis;
var $ReplyTo  = mpet...@mac.com;
var $Host = localhost;
var $Mailer   = smtp;  // Alternative to IsSMTP()
var $WordWrap = 75;
}
?

Then when I want to use it -

$mail = new MyMailer();
$mail-Subject  = Some Subject;
$mail-Body = Some content;
if($mail-Send()) {
   // it was successfully sent, code on success here
   } else {
   // there was an error, error code here
   }

I never send HTML mail or attachments or bulk mail, but I believe it is 
capable of doing them quite easily.


Tip: Whatever solution you use, set the wordwrap to something that works 
well on an 80 char display. Some clients do not autowrap unwrapped 
messages and other clients wrap for display but when replying, it 
doesn't wrap.


I use 75 because it gives a little room for the   that accompanies a 
reply.


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



Re: [PHP] PHP SMTP Mailers

2010-03-22 Thread King Coffee

Thanks,

I try it and had not problems!

King 


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



Re: [PHP] PHP SMTP Mailers

2010-03-21 Thread King Coffee

Thanks Jan G. B., You got me over the first hump.

I'm having programs installing pear on my VISTA localhost...
So, I uploaded the Mail folder and Mail.php file to my
Shared Hosting ISP. I do not think pear is provided.

The Testing is as follows:

?php

require_once Mail.php;

// SSL HOST
$host = ssl://smtp.gmail.com;
$port = 587;
$username = sen...@gmail.com;
$password = Password;
$from = King Coffee sen...@gmail.com;
$to = Bill recipi...@hotmail.com;
$subject = PHP Mail Test;
$body = This is a simple mail test!;

$headers = array('From' = $from,
'To' = $to,
'Subject' = $subject);

$smtp = Mail::factory('smtp',
array('host' = $host,
'port' = $port,
'auth' = true,
'username' = $username,
'password' = $password));

$mail = $smtp-send($to, $header, $body);

if(PEAR::isError($mail)) {
echo( p . $mail-getMessage() . /p);
} else {
echo(pMessage successfully sent/p);
}

?

html
head
titlePHP EMAIL TESTER/title
h1This is a test/h1
?php Echo Hi King; ?
/head
/html

When I run the server page, The following error is displayed:

Warning: require_once(PEAR.php) [function.require-once]: failed to open 
stream: No such file or directory in D:\Hosting\ID#\html\auction\Mail.php on 
line 46


Fatal error: require_once() [function.require]: Failed opening required 
'PEAR.php' (include_path='.;C:\php5\pear') in 
D:\Hosting\ID#\html\auction\Mail.php on line 46


I will be still trying the get pear installed in VISA, but meanwhile, how 
can I obtain the PEAR.php and supporting files to upload?


Thanks,
King 



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



[PHP] PHP SMTP Mailers

2010-03-20 Thread King Coffee

Hi,

I'm executing a third-parity standard PHP application on a Windows IIS 7 
shared hosting server.


I need to convert, or use, a SMTP mailer service.  I found two SMTP PHP 
scripts - I think may work.


The sourceforge.net PHPMailer project and the pear.php.net (Mail, Net_SMTP) 
project.


Can any body please help me choose one and probably give a code snip of 
useage?


Currently, I'm leaning forward the PHPMailer, with little to base the 
decision on.


Thanks in advanced,
King Coffee 



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



Re: [PHP] PHP SMTP Mailers

2010-03-20 Thread Jan G.B.
2010/3/20 King Coffee kcof...@hotmail.com

 Hi,

 I'm executing a third-parity standard PHP application on a Windows IIS 7
 shared hosting server.

 I need to convert, or use, a SMTP mailer service.  I found two SMTP PHP
 scripts - I think may work.

 The sourceforge.net PHPMailer project and the pear.php.net (Mail,
 Net_SMTP) project.

 Can any body please help me choose one and probably give a code snip of
 useage?

 Currently, I'm leaning forward the PHPMailer, with little to base the
 decision on.

 Thanks in advanced,
 King Coffee


Hi. I'd stick to a PEAR module as long as it exists, because you can update
it easily.

Check out the examples in the PEAR Documentation.
http://pear.php.net/manual/en/package.mail.mail.intro.php

There's also a full detail example here:
http://pear.php.net/manual/en/package.mail.mail.send.php

Bye


Re: [PHP] SMTP Local development to Send email in PHP; Windows Platform/ XP with no IIS

2010-01-16 Thread Eric Lee
Hi,

As I know that php did't setting user name and password.
So, just install any smtp server with authenticaton set to no
authentication
Much list IIS smtp server.



Eric,
Regards,


On 1/16/10, Andy Shellam andy-li...@networkmail.eu wrote:

 Hi,

 
  Also http://www.softstack.com/freesmtp.html which vikash mentioned works
  through outlook settings.
 
  Anyways the below will help-
 
  http://php.net/manual/en/ref.mail.php
 
  http://glob.com.au/sendmail/


 Personally, I always found hMailServer to be perfectly reliable as a relay
 on Windows - just install it and SMTP to localhost - nothing more, nothing
 less.

 Andy


[PHP] SMTP Local development to Send email in PHP; Windows Platform/ XP with no IIS

2010-01-15 Thread Gaurav Kumar
Hi All, Ash, Angelo,

Any ideas how to send an email in PHP on windows platform/xp on local
development machine.

System Configuration
PHP 5.2
Apache 2
No ISS
NO SMTP

Any trusted SMTP software to install on local development machine and how to
set it up with php to send an email?

Also just providing the SMTP server details in php.ini will not work for me
as this requires authentication/credentials etc..


Thanks,

Gaurav Kumar
blog.oswebstudio.com


Re: [PHP] SMTP Local development to Send email in PHP; Windows Platform/ XP with no IIS

2010-01-15 Thread Kim Madsen

Hi Gaurav

Gaurav Kumar wrote on 15/01/2010 09:54:


NO SMTP

Any trusted SMTP software to install on local development machine and how to
set it up with php to send an email?

Also just providing the SMTP server details in php.ini will not work for me
as this requires authentication/credentials etc..


Get PHPmailer and make a gmail account that you connect to and mail through.

--
Kind regards
Kim Emax - masterminds.dk

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



Re: [PHP] SMTP Local development to Send email in PHP; Windows Platform/ XP with no IIS

2010-01-15 Thread Gaurav Kumar
Sorry Kim, don't want to use phpmailer script or manually setting user
accounts u/p in the script.



On Fri, Jan 15, 2010 at 5:23 PM, Kim Madsen php@emax.dk wrote:

 Hi Gaurav

 Gaurav Kumar wrote on 15/01/2010 09:54:


  NO SMTP

 Any trusted SMTP software to install on local development machine and how
 to
 set it up with php to send an email?

 Also just providing the SMTP server details in php.ini will not work for
 me
 as this requires authentication/credentials etc..


 Get PHPmailer and make a gmail account that you connect to and mail
 through.

 --
 Kind regards
 Kim Emax - masterminds.dk



Re: [PHP] SMTP Local development to Send email in PHP; Windows Platform/ XP with no IIS

2010-01-15 Thread vikash . iitb
You can install any smtp server on your windows machine and the mail() will
work with default settings. You can check this out:
http://www.softstack.com/freesmtp.html

Thanks,

Vikash Kumar
http://vika.sh


On Fri, Jan 15, 2010 at 5:30 PM, Gaurav Kumar
kumargauravjuke...@gmail.comwrote:

 Sorry Kim, don't want to use phpmailer script or manually setting user
 accounts u/p in the script.



 On Fri, Jan 15, 2010 at 5:23 PM, Kim Madsen php@emax.dk wrote:

  Hi Gaurav
 
  Gaurav Kumar wrote on 15/01/2010 09:54:
 
 
   NO SMTP
 
  Any trusted SMTP software to install on local development machine and
 how
  to
  set it up with php to send an email?
 
  Also just providing the SMTP server details in php.ini will not work for
  me
  as this requires authentication/credentials etc..
 
 
  Get PHPmailer and make a gmail account that you connect to and mail
  through.
 
  --
  Kind regards
  Kim Emax - masterminds.dk
 



Re: [PHP] SMTP Local development to Send email in PHP; Windows Platform/ XP with no IIS

2010-01-15 Thread Richard Quadling
2010/1/15  vikash.i...@gmail.com:
 You can install any smtp server on your windows machine and the mail() will
 work with default settings. You can check this out:
 http://www.softstack.com/freesmtp.html

 Thanks,

 Vikash Kumar
 http://vika.sh


 On Fri, Jan 15, 2010 at 5:30 PM, Gaurav Kumar
 kumargauravjuke...@gmail.comwrote:

 Sorry Kim, don't want to use phpmailer script or manually setting user
 accounts u/p in the script.



 On Fri, Jan 15, 2010 at 5:23 PM, Kim Madsen php@emax.dk wrote:

  Hi Gaurav
 
  Gaurav Kumar wrote on 15/01/2010 09:54:
 
 
   NO SMTP
 
  Any trusted SMTP software to install on local development machine and
 how
  to
  set it up with php to send an email?
 
  Also just providing the SMTP server details in php.ini will not work for
  me
  as this requires authentication/credentials etc..
 
 
  Get PHPmailer and make a gmail account that you connect to and mail
  through.
 
  --
  Kind regards
  Kim Emax - masterminds.dk
 



You only need a local SMTP server if you want to hold and relay mail.

If you want to send mail directly to the recipients SMTP server you
can do that with standard PHP.

getmxrr() is your friend here.

You provide it with the domain of the recipient and you get back the
SMTP server(s) associated with that domain.

Now, you can send the message to THEIR smtp server ...

ini_set('SMTP', );

where  is one of the servers returned from getmxrr().

No authentication required.




-- 
-
Richard Quadling
Standing on the shoulders of some very clever giants!
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



Re: [PHP] SMTP Local development to Send email in PHP; Windows Platform/ XP with no IIS

2010-01-15 Thread Gaurav Kumar
Hi Richard, The problem is that if I am using any open source software or
any other pre-built software then I will not be able to manage through
ini_set.

Also http://www.softstack.com/freesmtp.html which vikash mentioned works
through outlook settings.

Anyways the below will help-

http://php.net/manual/en/ref.mail.php

http://glob.com.au/sendmail/

Thanks,

Gaurav Kumar
blog.oswebstudio.com



On Fri, Jan 15, 2010 at 6:21 PM, Richard Quadling
rquadl...@googlemail.comwrote:

 2010/1/15  vikash.i...@gmail.com:
  You can install any smtp server on your windows machine and the mail()
 will
  work with default settings. You can check this out:
  http://www.softstack.com/freesmtp.html
 
  Thanks,
 
  Vikash Kumar
  http://vika.sh
 
 
  On Fri, Jan 15, 2010 at 5:30 PM, Gaurav Kumar
  kumargauravjuke...@gmail.comwrote:
 
  Sorry Kim, don't want to use phpmailer script or manually setting user
  accounts u/p in the script.
 
 
 
  On Fri, Jan 15, 2010 at 5:23 PM, Kim Madsen php@emax.dk wrote:
 
   Hi Gaurav
  
   Gaurav Kumar wrote on 15/01/2010 09:54:
  
  
NO SMTP
  
   Any trusted SMTP software to install on local development machine and
  how
   to
   set it up with php to send an email?
  
   Also just providing the SMTP server details in php.ini will not work
 for
   me
   as this requires authentication/credentials etc..
  
  
   Get PHPmailer and make a gmail account that you connect to and mail
   through.
  
   --
   Kind regards
   Kim Emax - masterminds.dk
  
 
 

 You only need a local SMTP server if you want to hold and relay mail.

 If you want to send mail directly to the recipients SMTP server you
 can do that with standard PHP.

 getmxrr() is your friend here.

 You provide it with the domain of the recipient and you get back the
 SMTP server(s) associated with that domain.

 Now, you can send the message to THEIR smtp server ...

 ini_set('SMTP', );

 where  is one of the servers returned from getmxrr().

 No authentication required.




 --
 -
 Richard Quadling
 Standing on the shoulders of some very clever giants!
 EE : http://www.experts-exchange.com/M_248814.html
 Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
 ZOPA : http://uk.zopa.com/member/RQuadling



Re: [PHP] SMTP Local development to Send email in PHP; Windows Platform/ XP with no IIS

2010-01-15 Thread Andy Shellam
Hi,

 
 Also http://www.softstack.com/freesmtp.html which vikash mentioned works
 through outlook settings.
 
 Anyways the below will help-
 
 http://php.net/manual/en/ref.mail.php
 
 http://glob.com.au/sendmail/


Personally, I always found hMailServer to be perfectly reliable as a relay on 
Windows - just install it and SMTP to localhost - nothing more, nothing less.

Andy

[PHP] smtp mail question

2009-10-30 Thread Al
Anyone see a problem if I login into the smtp server with Username different 
than the Return-Path?


It seems to work OK; but, I know from experience using the mail servers that 
increasingly everything must be exactly right to prevent recipient mail servers 
from rejecting emails.


So, I started using authenticated smtp exclusively.

Reason I'm asking is that I'm developing an application that will have several 
pages and each one will have a different Return-Path and Reply-To.


It will make things simpler if I can login to the smtp server with just one 
username/password.


Al.

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



Re: [PHP] smtp mail question

2009-10-30 Thread John Black

Al wrote:
Anyone see a problem if I login into the smtp server with Username 
different than the Return-Path?
It seems to work OK; but, I know from experience using the mail servers 
that increasingly everything must be exactly right to prevent recipient 
mail servers from rejecting emails.


All the email servers I have worked with only care about the proper 
authentication credentials and accept any valid email address for From: 
Reply-to and so on. Free services, like Googlemail.com, may differ.


The receiving server on the other hand will usually do a domain 
validation of the From: field to ensure that the domain exists, validate 
the SPF record and do a few other anti spam tricks.


--
John

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



[PHP] SMTP mail server

2009-04-24 Thread Ron Piggott
How do I specify an actual SMTP server?  (Like mail.host.com)

This is what I have so far:

mail($email, $subject, $message, $headers);

I was to http://ca2.php.net/manual/en/function.mail.php and saw this
syntax:

mail ( string $to , string $subject , string $message [, string
$additional_headers [, string $additional_parameters ]] )

Ronhttp://


Re: [PHP] SMTP mail server

2009-04-24 Thread Adam Williams



Ron Piggott wrote:

How do I specify an actual SMTP server?  (Like mail.host.com)

This is what I have so far:

mail($email, $subject, $message, $headers);

I was to http://ca2.php.net/manual/en/function.mail.php and saw this
syntax:

mail ( string $to , string $subject , string $message [, string
$additional_headers [, string $additional_parameters ]] )

Ronhttp://

  

http://www.php.net/manual/en/mail.configuration.php

looks like you can edit php.ini and change SMTP=localhost to something 
else and restart apache (if needed)



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



Re: [PHP] SMTP mail server

2009-04-24 Thread kranthi
if u cant change the configuration settings of php.ini
use http://pear.php.net/package/Mail
alternatively u can also hav ini_set on top of every page.

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



Re: [PHP] SMTP mail server

2009-04-24 Thread Ron Piggott

I am on a shared web site hosting company.  They are asking me to edit
my PHP script to specify the SMTP using $aditional_parameters on the URL
below.  If this can't be achieved then I need to confirm this.

Ron


On Fri, 2009-04-24 at 20:04 -0500, Adam Williams wrote:

 
 Ron Piggott wrote:
  How do I specify an actual SMTP server?  (Like mail.host.com)
 
  This is what I have so far:
 
  mail($email, $subject, $message, $headers);
 
  I was to http://ca2.php.net/manual/en/function.mail.php and saw this
  syntax:
 
  mail ( string $to , string $subject , string $message [, string
  $additional_headers [, string $additional_parameters ]] )
 
  Ronhttp://
 

 http://www.php.net/manual/en/mail.configuration.php
 
 looks like you can edit php.ini and change SMTP=localhost to something 
 else and restart apache (if needed)
 


Re: [PHP] SMTP mail server

2009-04-24 Thread Ron Piggott

I am needing to put this into one specific PHP script.  What would the
ini_set look like?  Ron


On Sat, 2009-04-25 at 06:43 +0530, kranthi wrote:

 if u cant change the configuration settings of php.ini
 use http://pear.php.net/package/Mail
 alternatively u can also hav ini_set on top of every page.


Re: [PHP] SMTP mail server

2009-04-24 Thread kranthi
ini_set(SMTP, mail.host.com);
ini_set(smtp_port, 25);

http://ca2.php.net/manual/en/mail.configuration.php
http://ca2.php.net/manual/en/function.ini-set.php

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



Re: [PHP] SMTP mail server

2009-04-24 Thread Manuel Lemos
Hello,

on 04/24/2009 10:17 PM Ron Piggott said the following:
 I am on a shared web site hosting company.  They are asking me to edit
 my PHP script to specify the SMTP using $aditional_parameters on the URL
 below.  If this can't be achieved then I need to confirm this.

No, AFAIK you cannot configure the SMTP server that way, unless your Web
hosting company hacked the mail function. Otherwise, I think they have
no idea how to do it and are wild guessing.

The fact is that you do not need to use an SMTP server, especially if
your web host is run on Linux or any Unix like system.

In Linux the mail function just injects the message in the local mail
server queue and from then on the mail server sends the message to the
remote recipient domain SMTP server so it reaches the destination mailbox.

You may want to watch this slide presentation that has a slide that
explains exactly how mail messages are routed. Take a look at slide 13.

http://www.phpclasses.org/browse/video/3/package/9.html


-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

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

2008-03-10 Thread Alain Roger
Hi Ray,

in my php.ini i have :
SMTP = localhost
smtp_port = 25
sendmail_from = [EMAIL PROTECTED]

but my website (testing machine) is on localhost (which has also the IP
195.126.5.1)

i think the problem is not in php.ini but more on SMTP server side (in
settings, maybe password for authentication).

A.

On Sun, Mar 9, 2008 at 10:16 PM, Ray Hauge [EMAIL PROTECTED]
wrote:

 Alain Roger wrote:
  Hi,
 
  i know that this is not necessary the best forum for that, but i need to
 get
  a real feedback and i guess you already faced the same issue as mine.
  basically, i develop php web application on windows XP platform.
  So i have apache 2.24 installed and PHP 5.2.4.
 
  now i would like to test if my application send emails, so i've checked
 my
  php.ini file and it seems ok.
  i tried to use IIS from windows to define a default SMTP server, but as
 my
  emails are not sent, i guess something is wrong with IIS.
 
  so does it exist a free SMTP server (similar that linux daemon) but
 running
  on windows XP ?
  if yes, where can i find it and what steps should i perform to be sure
 my
  emails are sent ?
 
  i do not want to transfer all my web application each time i want to
 test
  email sending...
  i would like to test it locally.
 
  thanks for your feedback.
 

 I could be wrong, but I thought that you had to specify the SMTP server
 in the php.ini file.

 http://us2.php.net/manual/en/ref.mail.php#ini.smtp

   now i would like to test if my application send emails, so i've
 checked my
   php.ini file and it seems ok.

 Maybe that means you already did that.  The second issue might be that
 your SMTP server is MS Exchange, and it requires authentication.

 If that is the case, then search for php SMTP authentication:


 http://www.google.com/search?q=php+smtp+authenticationie=utf-8oe=utf-8aq=trls=org.mozilla:en-US:officialclient=firefox-a

 --
 Ray Hauge
 www.primateapplications.com




-- 
Alain

Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


RE: [PHP] SMTP

2008-03-10 Thread Andrés Robinet
 -Original Message-
 From: Alain Roger [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 10, 2008 3:16 AM
 To: Ray Hauge
 Cc: PHP General List
 Subject: Re: [PHP] SMTP
 
 Hi Ray,
 
 in my php.ini i have :
 SMTP = localhost
 smtp_port = 25
 sendmail_from = [EMAIL PROTECTED]
 
 but my website (testing machine) is on localhost (which has also the IP
 195.126.5.1)
 
 i think the problem is not in php.ini but more on SMTP server side (in
 settings, maybe password for authentication).
 
 A.
 
 On Sun, Mar 9, 2008 at 10:16 PM, Ray Hauge [EMAIL PROTECTED]
 wrote:
 
  Alain Roger wrote:
   Hi,
  
   i know that this is not necessary the best forum for that, but i need
 to
  get
   a real feedback and i guess you already faced the same issue as mine.
   basically, i develop php web application on windows XP platform.
   So i have apache 2.24 installed and PHP 5.2.4.
  
   now i would like to test if my application send emails, so i've checked
  my
   php.ini file and it seems ok.
   i tried to use IIS from windows to define a default SMTP server, but as
  my
   emails are not sent, i guess something is wrong with IIS.
  
   so does it exist a free SMTP server (similar that linux daemon) but
  running
   on windows XP ?
   if yes, where can i find it and what steps should i perform to be sure
  my
   emails are sent ?
  
   i do not want to transfer all my web application each time i want to
  test
   email sending...
   i would like to test it locally.
  
   thanks for your feedback.
  
 
  I could be wrong, but I thought that you had to specify the SMTP server
  in the php.ini file.
 
  http://us2.php.net/manual/en/ref.mail.php#ini.smtp
 
now i would like to test if my application send emails, so i've
  checked my
php.ini file and it seems ok.
 
  Maybe that means you already did that.  The second issue might be that
  your SMTP server is MS Exchange, and it requires authentication.
 
  If that is the case, then search for php SMTP authentication:
 
 
  http://www.google.com/search?q=php+smtp+authenticationie=utf-8oe=utf-
 8aq=trls=org.mozilla:en-US:officialclient=firefox-a
 
  --
  Ray Hauge
  www.primateapplications.com
 
 
 
 
 --
 Alain
 
 Windows XP SP2
 PostgreSQL 8.2.4 / MS SQL server 2005
 Apache 2.2.4
 PHP 5.2.4
 C# 2005-2008

I'm curious what's the error you get when you use the mail function?

Also, if you have SMTP running on port 25 you should be able to telnet
localhost 25 and run some SMTP commands (EHLO, etc).

Beware as well that some ISPs block port 25 so you may need to use their SMPT
server instead of yours, if you can telnet your SMTP server but not send emails,
then you either:
1 - Need to authenticate yourself against your SMTP server, or
2 - You have port 25 blocked, and need to use your ISP's server, or an external
SMTP server that you can talk to on a port other than 25.

Regards,

Rob


Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com




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



Re: [PHP] SMTP

2008-03-10 Thread Daniel Brown
On Sun, Mar 9, 2008 at 4:38 PM, Alain Roger [EMAIL PROTECTED] wrote:
 Hi,

  i know that this is not necessary the best forum for that, but i need to get
  a real feedback and i guess you already faced the same issue as mine.
  basically, i develop php web application on windows XP platform.
  So i have apache 2.24 installed and PHP 5.2.4.

  now i would like to test if my application send emails, so i've checked my
  php.ini file and it seems ok.
  i tried to use IIS from windows to define a default SMTP server, but as my
  emails are not sent, i guess something is wrong with IIS.

So which HTTP server are you using?  You stated earlier that you
have Apache 2.24 on there, but here you say that you're using IIS.  If
you're using Apache, the IIS web server configuration will have
nothing to do with anything.

  so does it exist a free SMTP server (similar that linux daemon) but running
  on windows XP ?

I may be incorrect on this, but I'm pretty sure that
Win2K/XP/Vista have Microsoft Exchange bundled in for SMTP.  Check in
Add/Remove Programs  Windows Components  Internet Information
Services (I think, but I'm guessing I really don't use Windows
that often).  Even though it has the same name (IIS), in this case,
it's the category for all Internet services.  There should be
something mentioning SMTP there.

  if yes, where can i find it and what steps should i perform to be sure my
  emails are sent ?

Check the logs for Exchange/SMTP or whatever other MTA you decide
to use and see if there's anything mentioned about the problem.  It
could be an authentication/negotiation issue.  Also, check your
Windows firewall (or third-party software) to ensure that you can
connect to localhost:25.  The easiest way to test this is as follows:

Start  Run
Type: cmd
Type: telnet localhost 25
If it connects, type: HELO localhost
Note the response.

You can then try sending a message through the server manually, if
you'd like.  While still connected via Telnet as shown above, type the
following (replacing things as necessary):

MAIL FROM: [EMAIL PROTECTED]
RCPT TO: [EMAIL PROTECTED]
DATA
Subject: Testing Email from Telnet
This is a test.
.

Always end with a period on a line of its own.  That should show
you what, if any, error messages are being kicked out by your SMTP
server.

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

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



Re: [PHP] SMTP

2008-03-10 Thread Alain Roger
Hi Ray,

we tested it with telnet and it seems that it works... but my mail client
does not receive it. :-(
php mail function just tells me that email can not be delivered.
here is the function:

 if (mail($to, $subject, $body))
 {
 echo(pMessage successfully sent!/p);
 }
 else
 {
 echo(pMessage delivery failed.../p);
 }


and it returns false... so message delivery failed.
and i use on the same local PC so no ISP. server is used.

Al.

I'm curious what's the error you get when you use the mail function?

 Also, if you have SMTP running on port 25 you should be able to telnet
 localhost 25 and run some SMTP commands (EHLO, etc).

 Beware as well that some ISPs block port 25 so you may need to use their
 SMPT
 server instead of yours, if you can telnet your SMTP server but not send
 emails,
 then you either:
 1 - Need to authenticate yourself against your SMTP server, or
 2 - You have port 25 blocked, and need to use your ISP's server, or an
 external
 SMTP server that you can talk to on a port other than 25.

 Regards,

 Rob


 Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL
 33308 |
 TEL 954-607-4207 | FAX 954-337-2695 |
 Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE:
 bestplace |
  Web: bestplace.biz  | Web: seo-diy.com






-- 
Alain

Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Re: [PHP] SMTP

2008-03-10 Thread Alain Roger
Ok, thanks for info, i've downloaded the MailEnable SW for free and i was
able to check that my PHP mail function really send correctly emails :-)
thanks a lot,

A.

On Mon, Mar 10, 2008 at 3:33 PM, Daniel Brown [EMAIL PROTECTED] wrote:

 On Sun, Mar 9, 2008 at 4:38 PM, Alain Roger [EMAIL PROTECTED] wrote:
  Hi,
 
   i know that this is not necessary the best forum for that, but i need
 to get
   a real feedback and i guess you already faced the same issue as mine.
   basically, i develop php web application on windows XP platform.
   So i have apache 2.24 installed and PHP 5.2.4.
 
   now i would like to test if my application send emails, so i've checked
 my
   php.ini file and it seems ok.
   i tried to use IIS from windows to define a default SMTP server, but as
 my
   emails are not sent, i guess something is wrong with IIS.

 So which HTTP server are you using?  You stated earlier that you
 have Apache 2.24 on there, but here you say that you're using IIS.  If
 you're using Apache, the IIS web server configuration will have
 nothing to do with anything.

   so does it exist a free SMTP server (similar that linux daemon) but
 running
   on windows XP ?

 I may be incorrect on this, but I'm pretty sure that
 Win2K/XP/Vista have Microsoft Exchange bundled in for SMTP.  Check in
 Add/Remove Programs  Windows Components  Internet Information
 Services (I think, but I'm guessing I really don't use Windows
 that often).  Even though it has the same name (IIS), in this case,
 it's the category for all Internet services.  There should be
 something mentioning SMTP there.

   if yes, where can i find it and what steps should i perform to be sure
 my
   emails are sent ?

 Check the logs for Exchange/SMTP or whatever other MTA you decide
 to use and see if there's anything mentioned about the problem.  It
 could be an authentication/negotiation issue.  Also, check your
 Windows firewall (or third-party software) to ensure that you can
 connect to localhost:25.  The easiest way to test this is as follows:

 Start  Run
 Type: cmd
 Type: telnet localhost 25
 If it connects, type: HELO localhost
 Note the response.

You can then try sending a message through the server manually, if
 you'd like.  While still connected via Telnet as shown above, type the
 following (replacing things as necessary):

 MAIL FROM: [EMAIL PROTECTED]
 RCPT TO: [EMAIL PROTECTED]
 DATA
 Subject: Testing Email from Telnet
 This is a test.
 .

Always end with a period on a line of its own.  That should show
 you what, if any, error messages are being kicked out by your SMTP
 server.

 --
 /Dan

 Daniel P. Brown
 Senior Unix Geek
 ? while(1) { $me = $mind--; sleep(86400); } ?




-- 
Alain

Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


[PHP] SMTP

2008-03-09 Thread Alain Roger
Hi,

i know that this is not necessary the best forum for that, but i need to get
a real feedback and i guess you already faced the same issue as mine.
basically, i develop php web application on windows XP platform.
So i have apache 2.24 installed and PHP 5.2.4.

now i would like to test if my application send emails, so i've checked my
php.ini file and it seems ok.
i tried to use IIS from windows to define a default SMTP server, but as my
emails are not sent, i guess something is wrong with IIS.

so does it exist a free SMTP server (similar that linux daemon) but running
on windows XP ?
if yes, where can i find it and what steps should i perform to be sure my
emails are sent ?

i do not want to transfer all my web application each time i want to test
email sending...
i would like to test it locally.

thanks for your feedback.

-- 
Alain

Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Re: [PHP] SMTP

2008-03-09 Thread Ray Hauge

Alain Roger wrote:

Hi,

i know that this is not necessary the best forum for that, but i need to get
a real feedback and i guess you already faced the same issue as mine.
basically, i develop php web application on windows XP platform.
So i have apache 2.24 installed and PHP 5.2.4.

now i would like to test if my application send emails, so i've checked my
php.ini file and it seems ok.
i tried to use IIS from windows to define a default SMTP server, but as my
emails are not sent, i guess something is wrong with IIS.

so does it exist a free SMTP server (similar that linux daemon) but running
on windows XP ?
if yes, where can i find it and what steps should i perform to be sure my
emails are sent ?

i do not want to transfer all my web application each time i want to test
email sending...
i would like to test it locally.

thanks for your feedback.



I could be wrong, but I thought that you had to specify the SMTP server 
in the php.ini file.


http://us2.php.net/manual/en/ref.mail.php#ini.smtp

 now i would like to test if my application send emails, so i've 
checked my

 php.ini file and it seems ok.

Maybe that means you already did that.  The second issue might be that 
your SMTP server is MS Exchange, and it requires authentication.


If that is the case, then search for php SMTP authentication:

http://www.google.com/search?q=php+smtp+authenticationie=utf-8oe=utf-8aq=trls=org.mozilla:en-US:officialclient=firefox-a

--
Ray Hauge
www.primateapplications.com

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



RE: [PHP] SMTP

2008-03-09 Thread Andrés Robinet
 -Original Message-
 From: Ray Hauge [mailto:[EMAIL PROTECTED]
 Sent: Sunday, March 09, 2008 5:17 PM
 To: Alain Roger
 Cc: PHP General List
 Subject: Re: [PHP] SMTP
 
 Alain Roger wrote:
  Hi,
 
  i know that this is not necessary the best forum for that, but i need to
 get
  a real feedback and i guess you already faced the same issue as mine.
  basically, i develop php web application on windows XP platform.
  So i have apache 2.24 installed and PHP 5.2.4.
 
  now i would like to test if my application send emails, so i've checked
 my
  php.ini file and it seems ok.
  i tried to use IIS from windows to define a default SMTP server, but as
 my
  emails are not sent, i guess something is wrong with IIS.
 
  so does it exist a free SMTP server (similar that linux daemon) but
 running
  on windows XP ?
  if yes, where can i find it and what steps should i perform to be sure my
  emails are sent ?
 
  i do not want to transfer all my web application each time i want to test
  email sending...
  i would like to test it locally.
 
  thanks for your feedback.
 
 
 I could be wrong, but I thought that you had to specify the SMTP server
 in the php.ini file.
 
 http://us2.php.net/manual/en/ref.mail.php#ini.smtp
 
   now i would like to test if my application send emails, so i've
 checked my
   php.ini file and it seems ok.
 
 Maybe that means you already did that.  The second issue might be that
 your SMTP server is MS Exchange, and it requires authentication.
 
 If that is the case, then search for php SMTP authentication:
 
 http://www.google.com/search?q=php+smtp+authenticationie=utf-8oe=utf-
 8aq=trls=org.mozilla:en-US:officialclient=firefox-a
 
 --
 Ray Hauge
 www.primateapplications.com

Hi Alain,

I think you have two options:

1 - Install a MTA in your windows box, such as Mercury Mail (if you install
XAMPP, you get Apache, PHP, MySQL, Filezilla FTP Server and Mercury Mail - use
google to know what XAMPP is). To use the mail function on windows, you will
NEED a MTA (correct me if I'm wrong, but sendmail is not available in PHP for
Windows, the mail function will try to reach an MTA on port 25 or the port
you have set up in your php.ini).

2 - Use SMTP Authentication to send out emails on behalf of an existing
authenticated email box (or a relay server if you find one).

If you choose the second option (SMTP authentication) you will likely also use
PHPMailer (or PEAR_Mail, or any of the featured classes at
http://www.phpclasses.org that support SMTP authentication) unless you are
willing to write your own class for SMTP stuff through sockets. So let's say you
have an email box with the following information:

User: [EMAIL PROTECTED]
Password: mypassword
SMTP Server: smtp.mydomain.com

Your PHPMailer code will look like:

$mail = new PHPMailer();
$mail-Mailer = 'smtp';
$mail-SMTPAuth = true;
$mail-Username = '[EMAIL PROTECTED]';
$mail-Password = 'mypassword';
$mail-Host = 'smtp.mydomain.com';
$mail-From = '[EMAIL PROTECTED]';
$mail-FromName = 'My beautiful website';
$mail-Subject = 'You know what this is';
$mail-Body = 'Your email message';
$mail-AddAddress('[EMAIL PROTECTED]', 'Mr X-Man');
$mail-AddReplyTo('[EMAIL PROTECTED]', 'My Beautiful Website');
$mail-Send();

Hope this helps. This issue drove me crazy on my first month with PHP... what is
worse, I asked in the office I worked for at that time. They said it was not
possible (great I don't work there anymore). As The Rock said... NEVER SAY
NO :).

Cheers,

Rob(inet)

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com




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



Re: [PHP] SMTP vs mail()

2008-01-17 Thread Richard Heyes
You can easily make a mail queue in php yourself with a daemon that 
checks the queue and sends waiting mail in batches of say 200 per 
minute. (provided you have access to the cli on the server)


Why when there MTAs?

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

Mailing list management service allowing you to reach your Customers
and increase your sales.

** 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] SMTP vs mail()

2008-01-17 Thread Richard Lynch
On Thu, January 17, 2008 3:50 am, Richard Heyes wrote:
 You can easily make a mail queue in php yourself with a daemon that
 checks the queue and sends waiting mail in batches of say 200 per
 minute. (provided you have access to the cli on the server)

 Why when there MTAs?

Your shared host may provide no access to config an MTA, but will shut
you down automatically if you send either more then 75 emails per
minute, or more than 1000 per hour.

I worked on such a setup, and crafted a PHP DB queue of emails to make
100% sure their mailing list never got their site shut down.

I am confident other examples abound.

-- 
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] SMTP vs mail()

2008-01-17 Thread Manuel Lemos
Hello,

on 01/17/2008 06:57 PM Richard Lynch said the following:
 On Thu, January 17, 2008 3:50 am, Richard Heyes wrote:
 You can easily make a mail queue in php yourself with a daemon that
 checks the queue and sends waiting mail in batches of say 200 per
 minute. (provided you have access to the cli on the server)
 Why when there MTAs?
 
 Your shared host may provide no access to config an MTA, but will shut
 you down automatically if you send either more then 75 emails per
 minute, or more than 1000 per hour.
 
 I worked on such a setup, and crafted a PHP DB queue of emails to make
 100% sure their mailing list never got their site shut down.
 
 I am confident other examples abound.

You are right. After all that is an MTA too. It is an awkward solution
but tt least you will be able work around your ISP constraints.

Some time ago an user published a class that does precisely that:

http://www.phpclasses.org/newsletter


In the past, I used also an unsual solution to send newsletters to the
PHPClasses site users.

Instead of a database, I used to send e-mail messages that contained
newsletter contents and subscriber addresses.

Then I used my desktop machine to pop the messages and distribute the
newsletters. When it exceeded my ISP limits, I used servers borrowed
from kind users, until I finally used a VPS.

The distribution system via e-mail still exists and works as a charm,
although for now it is not needed to work distributedly.

In this blog post you can read all the details.

http://www.phpclasses.org/blog/post/65-8-defensive-programming-best-practices-to-prevent-breaking-your-sites.html

-- 

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] SMTP vs mail()

2008-01-16 Thread Nathan Rixham
You can easily make a mail queue in php yourself with a daemon that 
checks the queue and sends waiting mail in batches of say 200 per 
minute. (provided you have access to the cli on the server)


Black
http://rssphp.net
a85020316bb687648d6f73c4eb3bec93 :msg::id

Chris wrote:

Manuel Lemos wrote:

Hello,

on 01/15/2008 07:16 AM Per Jessen said the following:

If there's any way to re-configure the MTA to queue the messages for
later sending, that would save you a lot of overhead on the PHP end...

The MTA will always queue the messages - well, that is certainly the
case for postfix.  


qmail too. Sendmail can be configured to just queue the messages too but
that is not its default configuration.


This is all getting way OT for php.

All except exim will queue the message AND have a process that looks at 
the queue at the same time.


exim has an option called 'queue_only' which then tells it to just store 
the message and there is no process trying to actually send the emails 
until it hits another option which tells it when to run the queue.


If you run 'mailq' (or qmail-qstat) while you are sending lots of 
emails, the numbers and emails will change as emails are incoming and 
outgoing at the same time. You won't see emails sitting at the top of 
the send queue for very long because another process is picking it up 
and sending it.




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



Re: [PHP] SMTP vs mail()

2008-01-15 Thread Per Jessen
Richard Lynch wrote:

 If there's any way to re-configure the MTA to queue the messages for
 later sending, that would save you a lot of overhead on the PHP end...

The MTA will always queue the messages - well, that is certainly the
case for postfix.  



/Per Jessen, Zürich

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



Re: [PHP] SMTP vs mail()

2008-01-15 Thread mike
i can vouch. postfix rocks.

i send it non-stop 30,000+ emails at a time (a loop from a database
that does a popen(/usr/sbin/sendmail) on the local machine (also
postfix) which then relays it to my actual public smtp server (running
postfix) - and it just throws it all into the queue and chews on that
for a while...


On 1/15/08, Per Jessen [EMAIL PROTECTED] wrote:
 Richard Lynch wrote:

  If there's any way to re-configure the MTA to queue the messages for
  later sending, that would save you a lot of overhead on the PHP end...

 The MTA will always queue the messages - well, that is certainly the
 case for postfix.



 /Per Jessen, Zürich

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




Re: [PHP] SMTP vs mail()

2008-01-15 Thread Manuel Lemos
Hello,

on 01/15/2008 07:16 AM Per Jessen said the following:
 If there's any way to re-configure the MTA to queue the messages for
 later sending, that would save you a lot of overhead on the PHP end...
 
 The MTA will always queue the messages - well, that is certainly the
 case for postfix.  

qmail too. Sendmail can be configured to just queue the messages too but
that is not its default configuration.

-- 

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] SMTP vs mail()

2008-01-15 Thread Chris

Manuel Lemos wrote:

Hello,

on 01/15/2008 07:16 AM Per Jessen said the following:

If there's any way to re-configure the MTA to queue the messages for
later sending, that would save you a lot of overhead on the PHP end...

The MTA will always queue the messages - well, that is certainly the
case for postfix.  


qmail too. Sendmail can be configured to just queue the messages too but
that is not its default configuration.


This is all getting way OT for php.

All except exim will queue the message AND have a process that looks at 
the queue at the same time.


exim has an option called 'queue_only' which then tells it to just store 
the message and there is no process trying to actually send the emails 
until it hits another option which tells it when to run the queue.


If you run 'mailq' (or qmail-qstat) while you are sending lots of 
emails, the numbers and emails will change as emails are incoming and 
outgoing at the same time. You won't see emails sitting at the top of 
the send queue for very long because another process is picking it up 
and sending it.


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

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



Re: [PHP] SMTP vs mail()

2008-01-14 Thread Richard Lynch
On Sat, January 12, 2008 4:28 am, Richard Heyes wrote:
 Assuming you're talking delivery to a local MTA (which will
 subsequently do the remote delivery), is speed really important?
 For the amount of email I'm looking at (1000s, growing), yes.


 Hmm, that's not quite what I was thinking of.  The amount of emails
 to
 be delivered does not in my opinion affect how fast it needs to
 happen.
 Your local MTA will take a while to deliver those emails anyway, so
 the
 time from script to user is mostly dependent on that, which means
 you're left with reducing the time from script to MTA.  If you need
 to
 finish the script fast (in order for some user-intercation to
 continue
 perhaps), I would would just detach the script and carry on.

 Sorry, yes the time of delivery is not so important as the time to
 pump
 the messages to the MTA. As long as the MTA has them and they get
 delivered in a reasonable time frame I'm happy. The application is all
 about mail delivery and the script has to return immediately, so I'll
 be
 launching a separate process to insert the addresses into a minimal
 mail_queue table in my db, and then a 5 minutely cron script which
 will pass them to the MTA.

If there's any way to re-configure the MTA to queue the messages for
later sending, that would save you a lot of overhead on the PHP end...

-- 
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] SMTP vs mail()

2008-01-12 Thread Per Jessen
Richard Heyes wrote:

 Assuming you're talking delivery to a local MTA (which will
 subsequently do the remote delivery), is speed really important?
 
 For the amount of email I'm looking at (1000s, growing), yes.
 

Hmm, that's not quite what I was thinking of.  The amount of emails to
be delivered does not in my opinion affect how fast it needs to happen. 
Your local MTA will take a while to deliver those emails anyway, so the
time from script to user is mostly dependent on that, which means
you're left with reducing the time from script to MTA.  If you need to
finish the script fast (in order for some user-intercation to continue
perhaps), I would would just detach the script and carry on. 


/Per Jessen, Zürich

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



Re: [PHP] SMTP vs mail()

2008-01-12 Thread Richard Heyes

Assuming you're talking delivery to a local MTA (which will
subsequently do the remote delivery), is speed really important?

For the amount of email I'm looking at (1000s, growing), yes.



Hmm, that's not quite what I was thinking of.  The amount of emails to
be delivered does not in my opinion affect how fast it needs to happen. 
Your local MTA will take a while to deliver those emails anyway, so the

time from script to user is mostly dependent on that, which means
you're left with reducing the time from script to MTA.  If you need to
finish the script fast (in order for some user-intercation to continue
perhaps), I would would just detach the script and carry on. 


Sorry, yes the time of delivery is not so important as the time to pump 
the messages to the MTA. As long as the MTA has them and they get 
delivered in a reasonable time frame I'm happy. The application is all 
about mail delivery and the script has to return immediately, so I'll be 
launching a separate process to insert the addresses into a minimal 
mail_queue table in my db, and then a 5 minutely cron script which 
will pass them to the MTA.


--
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] SMTP vs mail()

2008-01-12 Thread Per Jessen
Richard Heyes wrote:

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

I've done some rough benchmarking - 

1. Using mail(), same email sent to 1000 users.

Script finished in 200ms (1000 emails delivered to local MTA). 
Delivery to target MTA over 100Mbit LAN took about 6s.

2. Using mail(), same email sent to 1 users (in blocks of 1000
recipients).

Script finished in 2.6s (1 emails delivered to local MTA). 
Delivery to target MTA over 100Mbit LAN took about 4m20s.

3. Using mail(), but individual emails sent to 1000 users.

Script finished in 59s (1000 emails delivered to local MTA). 
Delivery to target MTA over 100Mbit LAN took about 60s.

4. I didn't bother with 1 individual emails.

5. Repeat case 3, but actual calls of mail() forked using pcntl_fork. 

50ms.  I didn't bother timing the delivery to target MTA, but I estimate
the same as in case 3.

6. Same email to 1000 users sent by piping to sendmail -oi -t

60ms. I didn't bother timing the delivery to target MTA.

7. Same email to 1 users sent by piping to sendmail -oi -t

230ms.  I didn't bother timing the delivery to target MTA.

8. Same email to 10 users sent by piping to sendmail -oi -t

2.4s. I didn't bother timing the delivery to target MTA.

Hardware was a plain P4, 2.4GHz running openSUSE.


You might be able to beat cases 6-7-8 by doing direct SMTP, but I doubt
if it'll be worth your effort. 



/Per Jessen, Zürich

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



Re: [PHP] SMTP vs mail()

2008-01-12 Thread Richard Heyes

1. Using mail(), same email sent to 1000 users.

Script finished in 200ms (1000 emails delivered to local MTA). 
Delivery to target MTA over 100Mbit LAN took about 6s.


That settles it then. The mail() command will be more than fast enough 
for my needs.


Thanks.

--
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] SMTP vs mail()

2008-01-12 Thread Per Jessen
Richard Heyes wrote:

 1. Using mail(), same email sent to 1000 users.
 
 Script finished in 200ms (1000 emails delivered to local MTA).
 Delivery to target MTA over 100Mbit LAN took about 6s.
 
 That settles it then. The mail() command will be more than fast enough
 for my needs.
 
 Thanks.

Note - this was one call to mail():  

mail(user1,user2,user3 ..,subject,text);


/Per Jessen, Zürich

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



Re: [PHP] SMTP vs mail()

2008-01-12 Thread Richard Heyes
Note - this was one call to mail():  


mail(user1,user2,user3 ..,subject,text);


Granted, but as long as the email stays the same size when you compare 
mail() and something like SMTP, I wouldn't imagine the relative speeds 
varying significantly. Or maybe they would, I'll compare and see.


--
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] SMTP vs mail()

2008-01-12 Thread Scott Wilcox



Per Jessen wrote:

Richard Heyes wrote:

  

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




I've done some rough benchmarking - 


1. Using mail(), same email sent to 1000 users.

Script finished in 200ms (1000 emails delivered to local MTA). 
Delivery to target MTA over 100Mbit LAN took about 6s.


2. Using mail(), same email sent to 1 users (in blocks of 1000
recipients).

Script finished in 2.6s (1 emails delivered to local MTA). 
Delivery to target MTA over 100Mbit LAN took about 4m20s.


3. Using mail(), but individual emails sent to 1000 users.

Script finished in 59s (1000 emails delivered to local MTA). 
Delivery to target MTA over 100Mbit LAN took about 60s.


4. I didn't bother with 1 individual emails.

5. Repeat case 3, but actual calls of mail() forked using pcntl_fork. 


50ms.  I didn't bother timing the delivery to target MTA, but I estimate
the same as in case 3.

6. Same email to 1000 users sent by piping to sendmail -oi -t

60ms. I didn't bother timing the delivery to target MTA.

7. Same email to 1 users sent by piping to sendmail -oi -t

230ms.  I didn't bother timing the delivery to target MTA.

8. Same email to 10 users sent by piping to sendmail -oi -t

2.4s. I didn't bother timing the delivery to target MTA.

Hardware was a plain P4, 2.4GHz running openSUSE.


You might be able to beat cases 6-7-8 by doing direct SMTP, but I doubt
if it'll be worth your effort. 




/Per Jessen, Zürich

  

Per's results were pretty much as i'd expected :)


Re: [PHP] SMTP vs mail()

2008-01-11 Thread Eric Butera
On Jan 11, 2008 1:22 PM, Jochem Maas [EMAIL PROTECTED] wrote:
 Eric Butera schreef:
  On Jan 11, 2008 11:33 AM, Stut [EMAIL PROTECTED] wrote:
  No brainer, SMTP will almost certainly be faster. My mailing list system
  (written in PHP obviously) can dump 600k customised emails to the local
  SMTP server in a couple of hours. Doing the same with the mail command
  took over 24 hours. How much slower will depend a lot on how you have
  configured sendmail, but it's never going to be faster than a socket
  connection to the local SMTP server.
 
  Also don't forget the part where you shouldn't disconnect and
  reconnect between mails sent.

 indeed but I have experienced situations where the SMTP server refuses
 more than X number of messages on any one connection ... which meant
 having to get the script to disconnect/reconnect every 200 (iirc) odd
 emails sent.


 
  I used to use htmlMimeMail, but now I use Zend_Mail as it has a better
  API and is also faster in regards to the quoted printable encoding.
 



Weird!  I've never heard of that but I really don't doubt it.  Working
with e-mail is the least favorite part of my work.

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



Re: [PHP] SMTP vs mail()

2008-01-11 Thread Daniel Brown
On Jan 11, 2008 11:36 AM, Richard Heyes [EMAIL PROTECTED] wrote:
  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)?
 
  No brainer, SMTP will almost certainly be faster. My mailing list system
  (written in PHP obviously) can dump 600k customised emails to the local
  SMTP server in a couple of hours. Doing the same with the mail command
  took over 24 hours. How much slower will depend a lot on how you have
  configured sendmail, but it's never going to be faster than a socket
  connection to the local SMTP server.

 Thanks.

Obviously, it will also make a huge difference between a local
SMTP and remote SMTP.

-- 
/Dan

Daniel P. Brown
Senior Unix Geek and #1 Rated Year's Coolest Guy By Self Since
Nineteen-Seventy-[mumble].

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



Re: [PHP] SMTP vs mail()

2008-01-11 Thread Richard Heyes
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)?


No brainer, SMTP will almost certainly be faster. My mailing list system 
(written in PHP obviously) can dump 600k customised emails to the local 
SMTP server in a couple of hours. Doing the same with the mail command 
took over 24 hours. How much slower will depend a lot on how you have 
configured sendmail, but it's never going to be faster than a socket 
connection to the local SMTP server.


Thanks.

--
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] SMTP vs mail()

2008-01-11 Thread Eric Butera
On Jan 11, 2008 1:33 PM, Richard Heyes [EMAIL PROTECTED] wrote:
  I used to use htmlMimeMail, but now I use Zend_Mail as it has a better
  API and is also faster in regards to the quoted printable encoding.

 IIRC htmlMimeMail use the PHP built in function to do quoted printable
 encoding.


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


There is no such thing. :)

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



Re: [PHP] SMTP vs mail()

2008-01-11 Thread Richard Heyes

I used to use htmlMimeMail, but now I use Zend_Mail as it has a better
API and is also faster in regards to the quoted printable encoding.


IIRC htmlMimeMail use the PHP built in function to do quoted printable 
encoding.


--
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] SMTP vs mail()

2008-01-11 Thread Jochem Maas

Eric Butera schreef:

On Jan 11, 2008 11:33 AM, Stut [EMAIL PROTECTED] wrote:

No brainer, SMTP will almost certainly be faster. My mailing list system
(written in PHP obviously) can dump 600k customised emails to the local
SMTP server in a couple of hours. Doing the same with the mail command
took over 24 hours. How much slower will depend a lot on how you have
configured sendmail, but it's never going to be faster than a socket
connection to the local SMTP server.


Also don't forget the part where you shouldn't disconnect and
reconnect between mails sent.


indeed but I have experienced situations where the SMTP server refuses
more than X number of messages on any one connection ... which meant
having to get the script to disconnect/reconnect every 200 (iirc) odd
emails sent.



I used to use htmlMimeMail, but now I use Zend_Mail as it has a better
API and is also faster in regards to the quoted printable encoding.



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



Re: [PHP] SMTP vs mail()

2008-01-11 Thread mike
On 1/11/08, Richard Heyes [EMAIL PROTECTED] wrote:
  Assuming you're talking delivery to a local MTA (which will subsequently
  do the remote delivery), is speed really important?

 For the amount of email I'm looking at (1000s, growing), yes.

one word: phpmailer (http://phpmailer.codeworxtech.com/). seems like
the best option. supports everything under the sun. even phplist
(which itself seems awesome) uses it.

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



Re: [PHP] SMTP vs mail()

2008-01-11 Thread Manuel Lemos
Hello,

on 01/11/2008 04:22 PM Jochem Maas said the following:
 Eric Butera schreef:
 On Jan 11, 2008 11:33 AM, Stut [EMAIL PROTECTED] wrote:
 No brainer, SMTP will almost certainly be faster. My mailing list system
 (written in PHP obviously) can dump 600k customised emails to the local
 SMTP server in a couple of hours. Doing the same with the mail command
 took over 24 hours. How much slower will depend a lot on how you have
 configured sendmail, but it's never going to be faster than a socket
 connection to the local SMTP server.

 Also don't forget the part where you shouldn't disconnect and
 reconnect between mails sent.
 
 indeed but I have experienced situations where the SMTP server refuses
 more than X number of messages on any one connection ... which meant
 having to get the script to disconnect/reconnect every 200 (iirc) odd
 emails sent.

That is one more reason to not use SMTP connections for queueing many
messages.

If you use sendmail or equivalent and the MTA is properly configured,
there will be no SMTP disconnect and reconnects to deal with.

Using SMTP is simply a bad idea unless your MTA is in a separate machine.

Personally I use qmail. It never establishes SMTP connections when you
are queueing messages. When I want to deliver messages to many
recipients I call the qmail-inject program directly, instead of Qmail
sendmail wrapper that is used by the mail function by default.

Actually I use the MIME message package that comes with drivers
specialize in qmail, sendmail, SMTP and mail. Each driver carries its
bag of tricks to optimize deliveries among other options to speedup
bulk-mailing in general.

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] SMTP vs mail()

2008-01-11 Thread Richard Heyes

Assuming you're talking delivery to a local MTA (which will subsequently
do the remote delivery), is speed really important?


For the amount of email I'm looking at (1000s, growing), yes.

--
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] SMTP vs mail()

2008-01-11 Thread Richard Heyes

There is no such thing. :)


Perhaps not then... :-)

--
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] SMTP vs mail()

2008-01-11 Thread Manuel Lemos
Hello,

on 01/11/2008 02:33 PM Stut said the following:
 Richard Heyes wrote:
 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)?
 
 No brainer, SMTP will almost certainly be faster. My mailing list system
 (written in PHP obviously) can dump 600k customised emails to the local
 SMTP server in a couple of hours. Doing the same with the mail command
 took over 24 hours. How much slower will depend a lot on how you have
 configured sendmail, but it's never going to be faster than a socket
 connection to the local SMTP server.

That is not true. SMTP connections are much slower than calling the
sendmail program because calling sendmail uses pipes to communicate and
SMTP requires an TCP connection, even if it is to the same machine.

Your problem is that you have sendmail in the default configuration,
which makes it attempt to deliver the messages when you call it. That is
why it was taking too long to send all your messages.

You need to configure it to queue the messages locally, instead of
attempting to deliver right away.

One solution is to use a better MTA like qmail or postfix.

If you are stuck with sendmail and you cannot change its default
configuration, there are some options to configure it per delivery.

Take a look at this message composing and sending package class. It
provides some options to optimize the message delivery back end to speed
up message queueing. The sendmail backend takes great advantage of these
options. Take a look in particular at the script
test_personalized_bulk_mail.php .

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] SMTP vs mail()

2008-01-11 Thread Eric Butera
On Jan 11, 2008 11:33 AM, Stut [EMAIL PROTECTED] wrote:
 No brainer, SMTP will almost certainly be faster. My mailing list system
 (written in PHP obviously) can dump 600k customised emails to the local
 SMTP server in a couple of hours. Doing the same with the mail command
 took over 24 hours. How much slower will depend a lot on how you have
 configured sendmail, but it's never going to be faster than a socket
 connection to the local SMTP server.

Also don't forget the part where you shouldn't disconnect and
reconnect between mails sent.

I used to use htmlMimeMail, but now I use Zend_Mail as it has a better
API and is also faster in regards to the quoted printable encoding.

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



[PHP] SMTP vs mail()

2008-01-11 Thread Richard Heyes

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


Thanks.

--
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] SMTP vs mail()

2008-01-11 Thread Per Jessen
Richard Heyes wrote:

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

Assuming you're talking delivery to a local MTA (which will subsequently
do the remote delivery), is speed really important?


/Per Jessen, Zürich

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



Re: [PHP] SMTP vs mail()

2008-01-11 Thread Stut

Richard Heyes wrote:
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)?


No brainer, SMTP will almost certainly be faster. My mailing list system 
(written in PHP obviously) can dump 600k customised emails to the local 
SMTP server in a couple of hours. Doing the same with the mail command 
took over 24 hours. How much slower will depend a lot on how you have 
configured sendmail, but it's never going to be faster than a socket 
connection to the local SMTP server.


-Stut

--
http://stut.net/

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



Re: [PHP] SMTP vs mail()

2008-01-11 Thread Daniel Brown
On Jan 11, 2008 1:26 PM, Eric Butera [EMAIL PROTECTED] wrote:
 Weird!  I've never heard of that but I really don't doubt it.  Working
 with e-mail is the least favorite part of my work.

 he said, via email.

-- 
/Dan

Daniel P. Brown
Senior Unix Geek and #1 Rated Year's Coolest Guy By Self Since
Nineteen-Seventy-[mumble].

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



Re: [PHP] SMTP vs mail()

2008-01-11 Thread Richard Lynch


On Fri, January 11, 2008 12:22 pm, Jochem Maas wrote:
 Eric Butera schreef:
 On Jan 11, 2008 11:33 AM, Stut [EMAIL PROTECTED] wrote:
 No brainer, SMTP will almost certainly be faster. My mailing list
 system
 (written in PHP obviously) can dump 600k customised emails to the
 local
 SMTP server in a couple of hours. Doing the same with the mail
 command
 took over 24 hours. How much slower will depend a lot on how you
 have
 configured sendmail, but it's never going to be faster than a
 socket
 connection to the local SMTP server.

 Also don't forget the part where you shouldn't disconnect and
 reconnect between mails sent.

 indeed but I have experienced situations where the SMTP server refuses
 more than X number of messages on any one connection ... which meant
 having to get the script to disconnect/reconnect every 200 (iirc) odd
 emails sent.

SMTP software can be configured that way, or not.

But it SHOULD be sending proper response codes when it decides to quit
on you, and your code *SHOULD* be ready to deal sensibly with those
codes, and any others defined in the SMTP spec.

-- 
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] SMTP vs mail()

2008-01-11 Thread Richard Lynch
On Fri, January 11, 2008 10:29 am, Richard Heyes wrote:
 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)?

If mail() is faster, prepare for the second coming... :-)

mail() fires up the send mail binary.  For each call.

SMTP opens up a socket connection and then you just keep spewing data
at it and getting OK back (hopefully).

You'd have to have a dog-slow SMTP box and a very souped-up sendmail
box to get them on the same footing, almost for sure.

-- 
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] SMTP vs mail()

2008-01-11 Thread Chris



Also don't forget the part where you shouldn't disconnect and
reconnect between mails sent.


indeed but I have experienced situations where the SMTP server refuses
more than X number of messages on any one connection ... which meant
having to get the script to disconnect/reconnect every 200 (iirc) odd
emails sent.


Yep - exim by default has a setting of 100 emails per smtp connection. 
Try to send more than that and you'll get errors.


--
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] SMTP unable to relay

2007-10-25 Thread Diana
I have tried settiing my php.ini to
SMTP = localhost
as well as using the SMTP of my regular mail, and I keep on getting this.
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to 
relay for [EMAIL PROTECTED] in C:\Inetpub\wwwroot\intranet\test.php 
on line 11

-- 
Diana Castillo
Tsanalytics S.A.
Tel: 34 913 595 436
Fax: 34 913 595 439
Mov: 34 609 954 536
[EMAIL PROTECTED]
www.tsanalytics.com 

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



[PHP] SMTP

2007-10-25 Thread Diana

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

-- 
Diana Castillo
Tsanalytics S.A.
Tel: 34 913 595 436
Fax: 34 913 595 439
Mov: 34 609 954 536
[EMAIL PROTECTED]
www.tsanalytics.com 

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



Re: [PHP] SMTP unable to relay

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

Diana wrote:
 I have tried settiing my php.ini to
 SMTP = localhost
 as well as using the SMTP of my regular mail, and I keep on getting this.
 Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to 
 relay for [EMAIL PROTECTED] in C:\Inetpub\wwwroot\intranet\test.php 
 on line 11
 

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



[PHP] SMTP PHP: Spam Tagging Problem

2005-10-25 Thread Cabbar Duzayak
Hi,

I am having a problem with my system when sending e-mails to yahoo
accounts, and it has been baffling me for the last couple of days,
actually I should say it is driving me crazy...

As I mentioned, I have a cpanel and have 2 domains/sites with
dedicated IP addresses on my system. The base account has domain name:
host.mydomain.com with IP address, let's say is x.x.x.x, the first
domain first.com is x.x.x.[x+1], the second domain second.com is
x.x.x.[x+2]. And, as you know, all e-mails for both domains are sent
from host.mydomain.com with source IP as x.x.x.x

Now, I wrote a php script, and placed it on both sites. It is exactly
the same script, with only one difference, from address, reply-to
address, etc. are set to [EMAIL PROTECTED] for the first domain and
[EMAIL PROTECTED] for the second domain.

When I execute this script, it sends an e-mail to a yahoo address. The
problem is: the e-mail sent from first.com is sent fine meaning it
reaches the recipient Yahoo INBOX, but the one sent from second.com is
dropping into Yahoo's Bulk Folder...

For the second domain, I tried sending e-mail for that domain from
another hosting service, and that one got into the INBOX, not Bulk...

Both first.com and second.com have proper A records and MX records.
host.mydomain.com has an A record setup, and mydomain.com has an MX
record setup (pointing to some other mail server)...

Now, this is very confusing because:

1. If my hosts IP address (x.x.x.x) was blocked, then both
[EMAIL PROTECTED] and [EMAIL PROTECTED] should be blocked, but one of
them is reaching its destination, while the second one is tagged as
SPAM.

2. If there was a problem with the way SMTP is configured, again both
should not have been dispatched. In fact, EHLO domain
(host.mydomain.com) is resolving to source IP (x.x.x.x) and source IP
(x.x.x.x) is resolving to the EHLO domain (again host.mydomain.com)...
And, two headers are almost same (other than return-path, etc. of
course)

3. If [EMAIL PROTECTED] (or the whole domain second.com for that
matter) e-mail address(es) was/were blocked, then both mail sent from
x.x.x.x and other hosting service should have been blocked. But, as I
mentioned, other hosting services e-mail goes thru fine!

Can someone please shead a light onto this before I lost my sanity

E-MAIL HEADER AS RECEIVED BY YAHOO: [IT IS ALMOST THE SAME FOR
SECOND.COM, just replace FIRST.COM with SECOND.COM]


X-Apparently-To: [EMAIL PROTECTED] via 68.142.228.52; Mon, 24 Oct
2005 09:54:48 -0700
X-YahooFilteredBulk: x.x.x.x
X-Originating-IP: [x.x.x.x]
Return-Path: [EMAIL PROTECTED]
Authentication-Results: mta295.mail.scd.yahoo.com from=first.com;
domainkeys=neutral (no sig)
Received: from x.x.x.x (EHLO host.mydomain.com) (x.x.x.x) by
mta295.mail.scd.yahoo.com with SMTP; Mon, 24 Oct 2005 09:54:47 -0700
Received: from nobody by host.mydomain.com with local (Exim 4.52) id
XXX for [EMAIL PROTECTED]; Mon, 24 Oct 2005 19:54:44 +0300
To: [EMAIL PROTECTED]
Subject: TESTING
MIME-Version: 1.0
Content-type: text/plain; charset=iso-8859-9
From: [EMAIL PROTECTED]
Message-Id: [EMAIL PROTECTED]
Date: Mon, 24 Oct 2005 19:54:44 +0300
X-AntiAbuse: This header was added to track abuse, please include it
with any abuse report
X-AntiAbuse: Primary Hostname - host.mydomain.com
X-AntiAbuse: Original Domain - yahoo.com
X-AntiAbuse: Originator/Caller UID/GID - [99 99] / [47 12]
X-AntiAbuse: Sender Address Domain - first.com
X-Source:
X-Source-Args:
X-Source-Dir:
Content-Length: 12


PHP CODE USED FOR SENDING E-MAIL:

?php
$fromMail = [EMAIL PROTECTED];

$to = [EMAIL PROTECTED];
$subject = TESTING;
$msg = TEST MESSAGE;

$headers = MIME-Version: 1.0\r\n;
$headers .= Return-Path: $fromMail\r\n;
$headers .= Content-type: text/plain; charset=iso-8859-9\r\n;
$headers .= From: $fromMail\r\n;

print h1TEST:  . mail($to, $subject, $msg, $headers,
-f$fromMail) . /h1;
?

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



Re: [PHP] SMTP PHP: Spam Tagging Problem

2005-10-25 Thread Richard Lynch
On Tue, October 25, 2005 3:27 am, Cabbar Duzayak wrote:
 I am having a problem with my system when sending e-mails to yahoo
 accounts, and it has been baffling me for the last couple of days,
 actually I should say it is driving me crazy...

 As I mentioned, I have a cpanel and have 2 domains/sites with
 dedicated IP addresses on my system. The base account has domain name:
 host.mydomain.com with IP address, let's say is x.x.x.x, the first
 domain first.com is x.x.x.[x+1], the second domain second.com is
 x.x.x.[x+2]. And, as you know, all e-mails for both domains are sent
 from host.mydomain.com with source IP as x.x.x.x

Something to consider:

What if, in Yahoo, the SECOND exact same email is tagged as spam
BECAUSE it is a duplicate.

Change up the email subject and body significantly to test this.

 Now, I wrote a php script, and placed it on both sites. It is exactly
 the same script, with only one difference, from address, reply-to
 address, etc. are set to [EMAIL PROTECTED] for the first domain and
 [EMAIL PROTECTED] for the second domain.

 When I execute this script, it sends an e-mail to a yahoo address. The
 problem is: the e-mail sent from first.com is sent fine meaning it
 reaches the recipient Yahoo INBOX, but the one sent from second.com is
 dropping into Yahoo's Bulk Folder...

You'll never truly know what Yahoo's spam-filtering algorithm is.

You have to live with the fact that some percentage of real email
will end up in Bulk, and some percentage of junk will get through into
INBOX.

Unless the user is allowed to whitelist specific addresses or domains,
that's just how it is.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



RE: [PHP] smtp server

2004-12-16 Thread Mike
 Hi there..
 I´m trying to use the mail function but I have a problem. I´m 
 working in a LAN with more or less 30 pcs, that places inside 
 a huge network, and I just can´t use the enterprise smtp server.
 How can i set a valid smtp server?
 I thought about installing some good-free smtp server on my 
 own pc, and then use it for the mail function.
 What do you think of this idea? Would you recommend any free 
 smtp server currently available?
 

That largely depends on your OS. 

If you're on Windows, there's a TON of free SMTP servers. I just use IIS
because it's as easy as popping in the Windows CD and I know well enough to
lock down the SMTP settings as to not have an open relay.

If you're on any of the *nix'es, it's hard to go wrong with sendmail.

-M

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



Re: [PHP] smtp server

2004-12-16 Thread Jason Wong
On Thursday 16 December 2004 23:00, Mike wrote:

 If you're on any of the *nix'es, it's hard to go wrong with sendmail.

I think you mean it's hard not to go wrong with sendmail ;-)

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
This isn't brain surgery; it's just television.
- David Letterman
*/

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



Re: [PHP] smtp server

2004-12-16 Thread M. Sokolewicz
Jason Wong wrote:
On Thursday 16 December 2004 23:00, Mike wrote:

If you're on any of the *nix'es, it's hard to go wrong with sendmail.

I think you mean it's hard not to go wrong with sendmail ;-)
no, that means it's easy to go wrong with sendmail... I think Mike did 
mean that it's hard to go wrong with it ;) (IMHO)

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


Re: [PHP] smtp server

2004-12-16 Thread Yannick Warnier
Le jeu 16/12/2004 à 14:43, Pablo D Marotta a écrit :
 Hi there..
 I´m trying to use the mail function but I have a problem. I´m working in a LAN
 with more or less 30 pcs, that places inside a huge network, and I just can´t
 use the enterprise smtp server.
 How can i set a valid smtp server?

You can use PEAR::Mail class to send e-mails via an external SMTP server
(an account you have elsewhere), provided your smtp call isn't stopped
by any firewall.

Yannick

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



[PHP] smtp server

2004-12-16 Thread Pablo D Marotta
Hi there..
I´m trying to use the mail function but I have a problem. I´m working in a LAN
with more or less 30 pcs, that places inside a huge network, and I just can´t
use the enterprise smtp server.
How can i set a valid smtp server?
I thought about installing some good-free smtp server on my own pc, and then
use it for the mail function.
What do you think of this idea? Would you recommend any free smtp server
currently available?

Thanks!

Pablo Marotta



American Express made the following
 annotations on 12/16/04 07:43:19
--
**

 This message and any attachments are solely for the intended recipient 
and may contain confidential or privileged information. If you are not the 
intended recipient, any disclosure, copying, use, or distribution of the 
information included in this message and any attachments is prohibited.  If you 
have received this communication in error, please notify us by reply e-mail and 
immediately and permanently delete this message and any attachments.  Thank 
you.

**

==

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


Re: [PHP] smtp server

2004-12-16 Thread Jason Wong
On Thursday 16 December 2004 22:43, Pablo D Marotta wrote:

Please note that this has nothing to do with PHP.

 I´m trying to use the mail function but I have a problem. I´m working in a
 LAN with more or less 30 pcs, that places inside a huge network, and I just
 can´t use the enterprise smtp server.

Why? Company policy? Technicality? You don't know how? Or? NB you don't *have* 
to setup an SMTP server to be able to send mail using PHP, look on 
www.phpclasses.org for some code.

 How can i set a valid smtp server?
 I thought about installing some good-free smtp server on my own pc, and
 then use it for the mail function.
 What do you think of this idea? Would you recommend any free smtp server
 currently available?

Google should have some good answers for you if you ask nicely.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Don't you wish you had more energy... or less ambition?
*/

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


Re: [PHP] smtp server

2004-12-16 Thread Richard Lynch
Pablo D Marotta wrote:
 Hi there..
 I´m trying to use the mail function but I have a problem. I´m working in a
 LAN
 with more or less 30 pcs, that places inside a huge network, and I just
 can´t
 use the enterprise smtp server.
 How can i set a valid smtp server?

If you have Microsoft licensing for them, one would assume their SMTP
server is valid...  Well, as valid as any MS product. :-)

 I thought about installing some good-free smtp server on my own pc, and
 then
 use it for the mail function.

Ah.  good-free...  Google for Windows OpenSource SMTP

 What do you think of this idea? Would you recommend any free smtp server
 currently available?

Depending on how much email you have to move, it may be easier to install
something like Pegasus mail client, which works from command line, and use
http://php.net/exec to invoke it.  Or so other Windows users have told me.

This will probably not be good to handle HEAVY loads of email, but if you
just need to send out the occasional update/newsletter to a small number
of recipients, it should be fine.

You may want to try the PHP Windows mailing list, assuming that's still
around and active.

-- 
Like Music?
http://l-i-e.com/artists.htm

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


RE: [PHP] SMTP and changing the character set

2004-05-08 Thread Dave G
Todd,

 Is there a way to specify a character set in a SMTP email?

I've found that SMTP is really, really very particular about how you
apply spacing and carriage returns when passing a content type header
from PHP. In the PHP mail() function, you want to add the content type
header like so:

?php
$contentType =  \r\nContent-Type: text/plain; charset=UTF-8;
mail($toaddress, $subject, $mailcontent, $contentType);
?

In particular, take note of the space before \r\n. Without it, the
content type header would not work. I had to do a lot of experimenting
before I discovered this. You may have to some experimenting as well, as
I'm not sure if all servers behave the same on this issue.

Hope that helps.

-- 
Yoroshiku!
Dave G
[EMAIL PROTECTED]

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



Re: [PHP] SMTP and changing the character set

2004-05-08 Thread Todd Cary
Thank you both for the help.  One more question: can SMPT use the Asian 
character set since it is 16 bits?

Todd

Dave G wrote:

Todd,


Is there a way to specify a character set in a SMTP email?


I've found that SMTP is really, really very particular about how you
apply spacing and carriage returns when passing a content type header
from PHP. In the PHP mail() function, you want to add the content type
header like so:
?php
$contentType =  \r\nContent-Type: text/plain; charset=UTF-8;
mail($toaddress, $subject, $mailcontent, $contentType);
?
In particular, take note of the space before \r\n. Without it, the
content type header would not work. I had to do a lot of experimenting
before I discovered this. You may have to some experimenting as well, as
I'm not sure if all servers behave the same on this issue.
Hope that helps.

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


[PHP] SMTP and changing the character set

2004-05-07 Thread Todd Cary
Is there a way to specify a character set in a SMTP email?

Todd

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


RE: [PHP] SMTP and changing the character set

2004-05-07 Thread Chris
SMTP, just like HTTP, uses the Content-Type header. So you can do something
like this:

Content-Type: text/plain; charset=US-ASCII

Just add that to the header argument of the mail function, if that's what
you're using.

Chris

-Original Message-
From: Todd Cary [mailto:[EMAIL PROTECTED]
Sent: Friday, May 07, 2004 4:51 PM
To: [EMAIL PROTECTED]
Cc: Kim Wagner; Brian Feifarek; Gus Scherer
Subject: [PHP] SMTP and changing the character set


Is there a way to specify a character set in a SMTP email?

Todd

--
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] SMTP and GroupWise

2004-04-25 Thread Burhan Khalid
Todd Cary wrote:

My client is using GroupWise to relay *without* having relay turned on 
and it needs/uses an authenication that is different from the regular 
SMTP.  Here is a trace of a message that went through:

[ snipped POP before SMTP authentication ]

Does anyone know of a class that can provide this type of authenication?

I don't know of a class, but phpprojekt 4.1 has this functionality built 
in.  You could look at that code and get some ideas.

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


[PHP] SMTP and GroupWise

2004-04-22 Thread Todd Cary
My client is using GroupWise to relay *without* having relay turned on 
and it needs/uses an authenication that is different from the regular 
SMTP.  Here is a trace of a message that went through:

02/11/2004 06:55:27 SMTP to rcpt: Al Smith [EMAIL PROTECTED]
02/11/2004 06:55:29  +OK GroupWise POP3 server ready
02/11/2004 06:55:29  USER scan01
02/11/2004 06:55:29  +OK
02/11/2004 06:55:29  PASS ***
02/11/2004 06:55:29  +OK
02/11/2004 06:55:29  QUIT
02/11/2004 06:55:29  +OK GroupWise POP3 server signing off
02/11/2004 06:55:29 Authenticated at POP Host: mailman.cd-hq.com
02/11/2004 06:55:31  220 mailman.cd-hq.com GroupWise Internet Agent
6.5.1  Copyright (c) 1993-2003 Novell, Inc.  All rights reserved.
Ready
02/11/2004 06:55:31  HELO FDM
02/11/2004 06:55:31  250 mailman.cd-hq.com Ok
02/11/2004 06:55:31  MAIL FROM:[EMAIL PROTECTED]
02/11/2004 06:55:31  250 Ok
02/11/2004 06:55:31  RCPT TO:[EMAIL PROTECTED]
02/11/2004 06:55:31  250 Ok
02/11/2004 06:55:31  DATA
02/11/2004 06:55:31  354 Enter mail, end with . on a line by itself
02/11/2004 06:55:31  .
02/11/2004 06:55:31  250 Ok
02/11/2004 06:55:31 Rcpt: Al Smith ([EMAIL PROTECTED]) 1 file(s)
sent
02/11/2004 06:55:31  QUIT
02/11/2004 06:55:31  221 mailman.cd-hq.com Closing transmission
channel
Does anyone know of a class that can provide this type of authenication?

Todd

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


Re: [PHP] SMTP and GroupWise

2004-04-22 Thread David O'Brien
That's just basic pop before smtp. A common way of authenticating.
Just make a connection to the pop server after the hello and  before
sending the email. Most mail servers cache this info for a certain
amount of time so you may not have to do it every time you send.
I know that http://phpmailer.sourceforge.net/docs/ supports this
you may want to look at their code.
-Dave

At 02:47 PM 4/22/2004, Todd Cary wrote:
My client is using GroupWise to relay *without* having relay turned on and 
it needs/uses an authenication that is different from the regular 
SMTP.  Here is a trace of a message that went through:

02/11/2004 06:55:27 SMTP to rcpt: Al Smith [EMAIL PROTECTED]
02/11/2004 06:55:29  +OK GroupWise POP3 server ready
02/11/2004 06:55:29  USER scan01
02/11/2004 06:55:29  +OK
02/11/2004 06:55:29  PASS ***
02/11/2004 06:55:29  +OK
02/11/2004 06:55:29  QUIT
02/11/2004 06:55:29  +OK GroupWise POP3 server signing off
02/11/2004 06:55:29 Authenticated at POP Host: mailman.cd-hq.com
02/11/2004 06:55:31  220 mailman.cd-hq.com GroupWise Internet Agent
6.5.1  Copyright (c) 1993-2003 Novell, Inc.  All rights reserved.
Ready
02/11/2004 06:55:31  HELO FDM
02/11/2004 06:55:31  250 mailman.cd-hq.com Ok
02/11/2004 06:55:31  MAIL FROM:[EMAIL PROTECTED]
02/11/2004 06:55:31  250 Ok
02/11/2004 06:55:31  RCPT TO:[EMAIL PROTECTED]
02/11/2004 06:55:31  250 Ok
02/11/2004 06:55:31  DATA
02/11/2004 06:55:31  354 Enter mail, end with . on a line by itself
02/11/2004 06:55:31  .
02/11/2004 06:55:31  250 Ok
02/11/2004 06:55:31 Rcpt: Al Smith ([EMAIL PROTECTED]) 1 file(s)
sent
02/11/2004 06:55:31  QUIT
02/11/2004 06:55:31  221 mailman.cd-hq.com Closing transmission
channel
Does anyone know of a class that can provide this type of authenication?

Todd

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


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource  Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] SMTP and GroupWise

2004-04-22 Thread Todd Cary
David -

I am using the phpmailer class, and I do not see mention of using the 
POP3 for authentication.  Am I missing something?

Todd

David O'Brien wrote:
That's just basic pop before smtp. A common way of authenticating.
Just make a connection to the pop server after the hello and  before
sending the email. Most mail servers cache this info for a certain
amount of time so you may not have to do it every time you send.
I know that http://phpmailer.sourceforge.net/docs/ supports this
you may want to look at their code.
-Dave

At 02:47 PM 4/22/2004, Todd Cary wrote:

My client is using GroupWise to relay *without* having relay turned on 
and it needs/uses an authenication that is different from the regular 
SMTP.  Here is a trace of a message that went through:

02/11/2004 06:55:27 SMTP to rcpt: Al Smith [EMAIL PROTECTED]
02/11/2004 06:55:29  +OK GroupWise POP3 server ready
02/11/2004 06:55:29  USER scan01
02/11/2004 06:55:29  +OK
02/11/2004 06:55:29  PASS ***
02/11/2004 06:55:29  +OK
02/11/2004 06:55:29  QUIT
02/11/2004 06:55:29  +OK GroupWise POP3 server signing off
02/11/2004 06:55:29 Authenticated at POP Host: mailman.cd-hq.com
02/11/2004 06:55:31  220 mailman.cd-hq.com GroupWise Internet Agent
6.5.1  Copyright (c) 1993-2003 Novell, Inc.  All rights reserved.
Ready
02/11/2004 06:55:31  HELO FDM
02/11/2004 06:55:31  250 mailman.cd-hq.com Ok
02/11/2004 06:55:31  MAIL FROM:[EMAIL PROTECTED]
02/11/2004 06:55:31  250 Ok
02/11/2004 06:55:31  RCPT TO:[EMAIL PROTECTED]
02/11/2004 06:55:31  250 Ok
02/11/2004 06:55:31  DATA
02/11/2004 06:55:31  354 Enter mail, end with . on a line by itself
02/11/2004 06:55:31  .
02/11/2004 06:55:31  250 Ok
02/11/2004 06:55:31 Rcpt: Al Smith ([EMAIL PROTECTED]) 1 file(s)
sent
02/11/2004 06:55:31  QUIT
02/11/2004 06:55:31  221 mailman.cd-hq.com Closing transmission
channel
Does anyone know of a class that can provide this type of authenication?

Todd

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


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource  Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] SMTP and GroupWise

2004-04-22 Thread Jason Wong
On Friday 23 April 2004 03:27, Todd Cary wrote:

 I am using the phpmailer class, and I do not see mention of using the
 POP3 for authentication.  Am I missing something?

I don't think it supports POP-before-relay last time I looked - which was 
quite a while ago. 

What you need to do is login correctly to the POP server (any valid account 
will do) before you send your mail.

  manual  IMAP, POP3 and NNTP Functions

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Alive without breath,
As cold as death;
Never thirsty, ever drinking,
All in mail ever clinking.
*/

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



[PHP] SMTP Authentication with PHP

2004-04-15 Thread Mike Knittel
My SMTP server requires authentication when sending mail.  How do I send
SMTP authentication information when using the PHP mail() function?

Thank you.

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



[PHP] SMTP Authentication

2004-03-12 Thread Beauford
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] SMTP ERROR

2004-03-03 Thread carlos castillo

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.

Thanks,

Carlos A. Castillo.
Ingeniero de desarrollo
[EMAIL PROTECTED]


Su Aliado Efectivo en Internet
www.imagine.com.co
(57 1)2182064 - (57 1)6163218
Bogotá - Colombia 

- Soluciones web para Internet e Intranet
- Soluciones para redes
- Licenciamiento de Software
- Asesoría y Soporte Técnico


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



[PHP] SMTP vs POP3

2003-12-04 Thread orlandopozo
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.


[PHP] SMTP vs POP3

2003-12-04 Thread orlandopozo

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.

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



Re: [PHP] SMTP vs POP3

2003-12-04 Thread Šimon Tóth
Read the online manual - IMAP functions, they support almost
everything.

Simon Toth
mailto:[EMAIL PROTECTED]
http://kerberos.knows.it

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



[PHP] smtp mail sending on unix

2003-10-08 Thread Jaanus Torp
Hi,

I am running apache in a chrooted enviorment on solaris and trying to get
mail() to work over smtp rather than sendmail, but unsuccessfully. php.ini
states that this is for win32 only. Is there any solution to that? It seems
quite awkward to have the code for smtp but no option to run it.

thanks,
Jaanus

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



RE: [PHP] smtp mail sending on unix

2003-10-08 Thread Javier Tacon

Try a class to send emails by smtps, like phpmailer: http://phpmailer.sourceforge.net/


-Mensaje original-
De: Jaanus Torp [mailto:[EMAIL PROTECTED]
Enviado el: miércoles, 08 de octubre de 2003 11:29
Para: [EMAIL PROTECTED]
Asunto: [PHP] smtp mail sending on unix
Importancia: Baja


Hi,

I am running apache in a chrooted enviorment on solaris and trying to get
mail() to work over smtp rather than sendmail, but unsuccessfully. php.ini
states that this is for win32 only. Is there any solution to that? It seems
quite awkward to have the code for smtp but no option to run it.

thanks,
Jaanus

-- 
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] SMTP server response: 550 5.7.1 Unable to relay for

2003-08-28 Thread Chris W. Parker
Àlex Camps mailto:[EMAIL PROTECTED]
on Wednesday, August 27, 2003 12:04 PM said:

 i have windows xp with apache,php and argomail
 but i cant send emails from php why?

According to your subject it looks like the computer you are trying to use to send the 
email does not allow relaying.


 thaks.

Thaks? Nah, I prefer chocolate milk.


hth,
Chris.
--
3:38pm

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



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

2003-08-27 Thread Àlex Camps
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] SMTP - Authorization?

2003-08-26 Thread Mathiau
Hey all!

glad to bea here! got alot to learn!

k,

basically i am sending out a mailing list to customers, - using a PHP
script, however the SMTP i am using needs to have Authorization to log into
the outgoing SMTP  - i HAVE to use this authentication no if's and ot
butt's., otherwise i will be blocked by Yahooo / AOL and some other provider
for running a relay SMTP as they see it and contirbuting to spammers by
allow anon acces to my smtp.

I know i can put my SMTP server on an internal ip so the outside world can
not see if but that is a bandaid fix for me - i want to know if PHP can use
an SMTP server that requires authotization to use it?


HELP! me searches for this have turned up no results or people simply not
knowing what i need to get done.

Matt.

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



Re: [PHP] SMTP - Authorization?

2003-08-26 Thread Manuel Lemos
Hello,

On 08/25/2003 09:34 PM, Mathiau wrote:
basically i am sending out a mailing list to customers, - using a PHP
script, however the SMTP i am using needs to have Authorization to log into
the outgoing SMTP  - i HAVE to use this authentication no if's and ot
butt's., otherwise i will be blocked by Yahooo / AOL and some other provider
for running a relay SMTP as they see it and contirbuting to spammers by
allow anon acces to my smtp.
I know i can put my SMTP server on an internal ip so the outside world can
not see if but that is a bandaid fix for me - i want to know if PHP can use
an SMTP server that requires authotization to use it?
HELP! me searches for this have turned up no results or people simply not
knowing what i need to get done.
The mail() function does not support authentication. You may want to try 
this SMTP class that lets you send messages via a server that requires 
authentication.

http://www.phpclasses.org/smtpclass

Use it in conjunction with this other class that lets you compose and 
send properly formatted messages:

http://www.phpclasses.org/mimemessage

--

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


RE: [PHP] SMTP - Authorization?

2003-08-26 Thread Mathiau
Another life saver! This news group is great! Thnx.

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 26, 2003 12:09 AM
To: Mathiau
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] SMTP - Authorization?

Hello,

On 08/25/2003 09:34 PM, Mathiau wrote:
 basically i am sending out a mailing list to customers, - using a PHP
 script, however the SMTP i am using needs to have Authorization to log
into
 the outgoing SMTP  - i HAVE to use this authentication no if's and ot
 butt's., otherwise i will be blocked by Yahooo / AOL and some other
provider
 for running a relay SMTP as they see it and contirbuting to spammers
by
 allow anon acces to my smtp.
 
 I know i can put my SMTP server on an internal ip so the outside world
can
 not see if but that is a bandaid fix for me - i want to know if PHP
can use
 an SMTP server that requires authotization to use it?
 
 
 HELP! me searches for this have turned up no results or people simply
not
 knowing what i need to get done.

The mail() function does not support authentication. You may want to try

this SMTP class that lets you send messages via a server that requires 
authentication.

http://www.phpclasses.org/smtpclass

Use it in conjunction with this other class that lets you compose and 
send properly formatted messages:

http://www.phpclasses.org/mimemessage

-- 

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



  1   2   >