RE: [PHP-DB] mail

2009-05-06 Thread Gautam Bhatia
hello,
   Yes you are right, the || operator stands for OR , which means ,
if any of those listed fields are empty, do not process the form and
throw a error message instead. If you use  instead of || , it instruct
the php other way around as in , if ($field ==   $field1 == ) or
otherfield, only process the form , if all these form fields are empty
and not just one. I hope that helps. good luck.

Regards,
Gautam Bhatia
   




On Wed, 2009-05-06 at 02:25 -0300, Emiliano Boragina wrote:
 Hi again,
 
 Thanks Chris for your quickly answer. I dont test it yet.
 I want to share with all you a very strange, for me, solution:
 
 ?php 
 $empresa = $_POST[empresa];
 $nombre = $_POST[nombre];
 $telefono = $_POST[telefono];
 $mail = $_POST[mail];
 $asunto = $_POST[asunto];
 $mensaje = $_POST[mensaje];
 
 if($empresa ==  || $nombre ==  || $telefono ==  || $mail ==  ||
 $asunto ==  || $mensaje == )
 {
   //echo ERROR;
   header('location:contactenos.php?mensaje=error');
 }
 else
 {
   $fecha = date(d.m.y H:i);
   $mymail = emilino.borag...@gmail.com;
   $subject = my company : Contacto webbr; 
   $contenido .= Empresa: .$_POST[empresa].br;
   $contenido .= Nombre y Apellido: .$_POST[nombre].br;
   $contenido .= Telefono: .$_POST[telefono].br;
   $contenido .= E-mail: .$_POST[mail].br;
   $contenido .= Asunto: .$_POST[asunto].br;
   $contenido .= Mensaje: .$_POST[mensaje].br;
   $contenido .= El mensaje se escribio el .$fecha.br; 
   $header =
 From:.$_POST[mail].\nReply-To:.$_POST[mail].br;
   $header .= X-Mailer:PHP/.phpversion().\n; 
   $header .= Mime-Version: 1.0\n; 
   $header = Content-Type: text/html; charset=utf-8\r\n;
   //mail($mymail, $subject, utf8_encode($contenido) ,$header);
   
   //echo $contenido;
   header('location:contactenos.php?mensaje=ok');
 }
 ?
 
 I want to know somthing: this || operator is OR, and de logic in my code
 is: if one of variables is empty and the rest not send the mail, it isnt?
 If I want all field full with data I must to use  AND operator, it isnt?
 Well, if the answer is YES, I tell you: I test with  and send it anyway.
 
 I dont understand... I am right or not with my afiration?
 Thanks a lot!
 
 +  _
// Emiliano Boragina _
// Diseño  Comunicación //
 +  _
// emiliano.borag...@gmail.com  /
// 15 40 58 60 02 ///
 +  _
 
 -Mensaje original-
 De: Chris [mailto:dmag...@gmail.com] 
 Enviado el: Miércoles, 06 de Mayo de 2009 01:08 a.m.
 Para: Emiliano Boragina
 CC: php-db@lists.php.net
 Asunto: Re: [PHP-DB] mail
 
 Emiliano Boragina wrote:
  ?php 
  if(isset($_POST[empresa])  isset($_POST[nombre]) 
  isset($_POST[telefono])  isset($_POST[mail]) 
  isset($_POST[asunto])  isset($_POST[mensaje]) )
  {   
 
 snip
 
  I test this code to send mail, but I am testing this printing $contenido.
  If nothing is ISSET must be print ERROR, but not, if I send de form
 empty
  this code print $contenido.
  It is not working, why?
 
 Maybe the post variables are there but they are empty.
 
 $form_vars = array('empresa', 'nombre', 'telefono');
 
 $error = false;
 foreach ($form_vars as $var) {
if (!isset($_POST[$var])) {
   echo Error - $var is missing\n;
   $error =  true;
   break;
}
 
if (empty($_POST[$var])) {
  echo Error: $var is empty (no value supplied)\n;
   $error =  true;
  break;
}
 }
 
 if ($error) {
die();
 }
 
 send_email_here();
 
 
 -- 
 Postgresql  php tutorials
 http://www.designmagick.com/
 
 
Regards,
Gautam Bhatia .




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



Re: [PHP-DB] mail

2009-05-05 Thread Chris

Emiliano Boragina wrote:
?php 
if(isset($_POST[empresa])  isset($_POST[nombre]) 

isset($_POST[telefono])  isset($_POST[mail]) 
isset($_POST[asunto])  isset($_POST[mensaje]) )
{   


snip


I test this code to send mail, but I am testing this printing $contenido.
If nothing is ISSET must be print ERROR, but not, if I send de form empty
this code print $contenido.
It is not working, why?


Maybe the post variables are there but they are empty.

$form_vars = array('empresa', 'nombre', 'telefono');

$error = false;
foreach ($form_vars as $var) {
  if (!isset($_POST[$var])) {
 echo Error - $var is missing\n;
 $error =  true;
 break;
  }

  if (empty($_POST[$var])) {
echo Error: $var is empty (no value supplied)\n;
 $error =  true;
break;
  }
}

if ($error) {
  die();
}

send_email_here();


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


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



RE: [PHP-DB] mail

2009-05-05 Thread Emiliano Boragina
Hi again,

Thanks Chris for your quickly answer. I dont test it yet.
I want to share with all you a very strange, for me, solution:

?php 
$empresa = $_POST[empresa];
$nombre = $_POST[nombre];
$telefono = $_POST[telefono];
$mail = $_POST[mail];
$asunto = $_POST[asunto];
$mensaje = $_POST[mensaje];

if($empresa ==  || $nombre ==  || $telefono ==  || $mail ==  ||
$asunto ==  || $mensaje == )
{
//echo ERROR;
header('location:contactenos.php?mensaje=error');
}
else
{
$fecha = date(d.m.y H:i);
$mymail = emilino.borag...@gmail.com;
$subject = my company : Contacto webbr; 
$contenido .= Empresa: .$_POST[empresa].br;
$contenido .= Nombre y Apellido: .$_POST[nombre].br;
$contenido .= Telefono: .$_POST[telefono].br;
$contenido .= E-mail: .$_POST[mail].br;
$contenido .= Asunto: .$_POST[asunto].br;
$contenido .= Mensaje: .$_POST[mensaje].br;
$contenido .= El mensaje se escribio el .$fecha.br; 
$header =
From:.$_POST[mail].\nReply-To:.$_POST[mail].br;
$header .= X-Mailer:PHP/.phpversion().\n; 
$header .= Mime-Version: 1.0\n; 
$header = Content-Type: text/html; charset=utf-8\r\n;
//mail($mymail, $subject, utf8_encode($contenido) ,$header);

//echo $contenido;
header('location:contactenos.php?mensaje=ok');
}
?

I want to know somthing: this || operator is OR, and de logic in my code
is: if one of variables is empty and the rest not send the mail, it isnt?
If I want all field full with data I must to use  AND operator, it isnt?
Well, if the answer is YES, I tell you: I test with  and send it anyway.

I dont understand... I am right or not with my afiration?
Thanks a lot!

+  _
   // Emiliano Boragina _
   // Diseño  Comunicación //
+  _
   // emiliano.borag...@gmail.com  /
   // 15 40 58 60 02 ///
+  _

-Mensaje original-
De: Chris [mailto:dmag...@gmail.com] 
Enviado el: Miércoles, 06 de Mayo de 2009 01:08 a.m.
Para: Emiliano Boragina
CC: php-db@lists.php.net
Asunto: Re: [PHP-DB] mail

Emiliano Boragina wrote:
 ?php 
 if(isset($_POST[empresa])  isset($_POST[nombre]) 
 isset($_POST[telefono])  isset($_POST[mail]) 
 isset($_POST[asunto])  isset($_POST[mensaje]) )
 { 

snip

 I test this code to send mail, but I am testing this printing $contenido.
 If nothing is ISSET must be print ERROR, but not, if I send de form
empty
 this code print $contenido.
 It is not working, why?

Maybe the post variables are there but they are empty.

$form_vars = array('empresa', 'nombre', 'telefono');

$error = false;
foreach ($form_vars as $var) {
   if (!isset($_POST[$var])) {
  echo Error - $var is missing\n;
  $error =  true;
  break;
   }

   if (empty($_POST[$var])) {
 echo Error: $var is empty (no value supplied)\n;
  $error =  true;
 break;
   }
}

if ($error) {
   die();
}

send_email_here();


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


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



Re: [PHP-DB] mail

2009-05-05 Thread Chris



if($empresa ==  || $nombre ==  || $telefono ==  || $mail ==  ||
$asunto ==  || $mensaje == )
{


snip


I want to know somthing: this || operator is OR, and de logic in my code
is: if one of variables is empty and the rest not send the mail, it isnt?


Looks like it to me.


If I want all field full with data I must to use  AND operator, it isnt?
Well, if the answer is YES, I tell you: I test with  and send it anyway.


It would only not send if *ALL* were empty this way.

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


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



Re: [PHP-DB] Mail Function

2006-03-01 Thread JupiterHost.Net



Mark Bomgardner wrote:
I have been racking my brain for the better part of a day with a simple 
mail function.  I am trying to generate a list of events from MySQL and 
then use the php Mail function to email the list in an html email to a 
mailing list.  I keep getting a parse error on a section that I can not 
figure out why.


ok, this is a general PHP question not realy a php-db type but 'sall good ;)

a) the parse error is likely form a rogue quote (in the html perhaps) 
making a syntax error, hard to say with out the actual error


b) are you sure mail() can tell that that is html and create the 
appropriate multi part MIME message? Highly doubtful since all mail() 
does is pipe the data to sendmail, I'd recommend using a valid MIME/SMTP 
tool like Perl's Mail::Sender::Easy module 
(http://search.cpan.org/perldoc?Mail::Sender::Easy)


You can easily use Perl's DBI to do your MySQL query so there really is 
no need to try to hack up PHP's lame mail() function to do something it 
simply can't.


HTH

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



Re: [PHP-DB] Mail Function

2006-03-01 Thread Philip Pryce
You can have

'blah'.}
else {
.'blah'

because that is what you currently have.


Re: [PHP-DB] Mail Function

2006-03-01 Thread Philip Pryce
opps sorry for the typos
you cant have


Re: [PHP-DB] Mail question

2005-02-14 Thread Micah Stevens

I'm replying off-list as this isn't a database question, but check out the 
pear mail class at:

http://pear.php.net

It handles SMTP authentication. The standard mail() function does not. 

HTH
-Micah 


On Monday 14 February 2005 10:12 am, ReClMaples wrote:
 I have a quick, probably easy to answer question.  I am trying to add the
 ability to email from like a quest book or a calendar event and get an
 authentication error in my error log.  I can only believe that this is due
 to my smtp server needed to know my login and password.  Is there a way I
 can pass this in the php.ini file?  I am using apache 2.0 and PHP 4.03 on a
 windows xp machine.  If this can be done, please let me know, any other
 suggestions would be welcomed.

 Thanks
 -Rich

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



RE: [PHP-DB] Mail Header Redirect

2004-10-05 Thread Bastien Koert
if you echo $Sent, what do you get?
bastien

From: Valerie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Mail  Header Redirect
Date: Tue, 5 Oct 2004 08:24:26 -0400
I have an email that is sent upon submission of a form.  I need to redirect 
to a confirmation page if email is sent successfully.  I thought the 
problem was that my email headers are already being sent, but when I 
removed them it still did not work.  I need to bcc as well.

headers:
?php function mailsent(){header(location: 
http://www.justustwo.com/vals/thankyou.html;);exit();}

And mailing:
/*Mailing*/
   $to=[EMAIL PROTECTED];
   $subject=AVC received a quote request!;
   $message=
H3 align='center'AVC received a quote request from $name/h3
 h4table cellpadding='5' cellspacing='0' align='center' border='1'
 tr
 tdEmail:/td
 td$email/td
 /tr
 tr
 tdPhone:/td
 td$phone/td
 /tr
 tr
 tdIndoors/Outdoors:/td
 td$where/td
 /tr
 tr
 tdType of Stock:/td
 td$m/td
 /tr
 tr
 tdQuantity:/td
 td$quantity/td
 /tr
 tr
 tdSides:/td
 td$s/td
 /tr
 tr
 tdColors:/td
 td$colors/td
 /tr
 tr
 tdFinishing:/td
 td$finish/td
 /tr
 tr
 tdComments:/td
 td$c/td
 /tr
 /table/h4;
   /* set the Content-type header. */
   $headers  = MIME-Version: 1.0\n;
   $headers .= Content-type: text/html; charset=iso-8859-1\n\r;
   /* additional headers */
   $headers .= From:AVCQuoteRequest;
   $headers .= Bcc: [EMAIL PROTECTED];
   $sent=mail($to,$subject,$message,$headers);
   if ($sent) {
mailsent();
   }
   else {
$errormessage=h2 class=\error2\**There was an error. Please call 
1-800-548-4449/h2;
echo $errormessage;
exit;
   }

_
Scan and help eliminate destructive viruses from your inbound and outbound 
e-mail and attachments. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.

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


Re: [PHP-DB] Mail Header Redirect

2004-10-05 Thread Valerie
When I echo $sent, it returns 1.
Thanks,
Valerie
- Original Message - 
From: Bastien Koert [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, October 05, 2004 10:03 AM
Subject: RE: [PHP-DB] Mail  Header Redirect


if you echo $Sent, what do you get?
bastien

From: Valerie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Mail  Header Redirect
Date: Tue, 5 Oct 2004 08:24:26 -0400
I have an email that is sent upon submission of a form.  I need to 
redirect to a confirmation page if email is sent successfully.  I thought 
the problem was that my email headers are already being sent, but when I 
removed them it still did not work.  I need to bcc as well.

headers:
?php function mailsent(){header(location: 
http://www.justustwo.com/vals/thankyou.html;);exit();}

And mailing:
/*Mailing*/
   $to=[EMAIL PROTECTED];
   $subject=AVC received a quote request!;
   $message=
H3 align='center'AVC received a quote request from $name/h3
 h4table cellpadding='5' cellspacing='0' align='center' 
border='1'
 tr
 tdEmail:/td
 td$email/td
 /tr
 tr
 tdPhone:/td
 td$phone/td
 /tr
 tr
 tdIndoors/Outdoors:/td
 td$where/td
 /tr
 tr
 tdType of Stock:/td
 td$m/td
 /tr
 tr
 tdQuantity:/td
 td$quantity/td
 /tr
 tr
 tdSides:/td
 td$s/td
 /tr
 tr
 tdColors:/td
 td$colors/td
 /tr
 tr
 tdFinishing:/td
 td$finish/td
 /tr
 tr
 tdComments:/td
 td$c/td
 /tr
 /table/h4;

   /* set the Content-type header. */
   $headers  = MIME-Version: 1.0\n;
   $headers .= Content-type: text/html; charset=iso-8859-1\n\r;
   /* additional headers */
   $headers .= From:AVCQuoteRequest;
   $headers .= Bcc: [EMAIL PROTECTED];
   $sent=mail($to,$subject,$message,$headers);
   if ($sent) {
mailsent();
   }
   else {
$errormessage=h2 class=\error2\**There was an error. Please call 
1-800-548-4449/h2;
echo $errormessage;
exit;
   }

_
Scan and help eliminate destructive viruses from your inbound and outbound 
e-mail and attachments. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines 
Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.

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


Re: [PHP-DB] Mail Header Redirect

2004-10-05 Thread Bastien Koert
can you put some output in the function itself to see if its the function 
that blowing up and or if its the mail call...

bastien

From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Bastien Koert [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Mail  Header Redirect
Date: Tue, 05 Oct 2004 14:50:37 -0400
_
Take advantage of powerful junk e-mail filters built on patented Microsoft® 
SmartScreen Technology. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.
---BeginMessage---

Still doesn't redirect, thanks though. :)- Original Message -
From: Bastien Koert [EMAIL PROTECTED]
Date: Tuesday, October 5, 2004 1:42 pm
Subject: Re: [PHP-DB] Mail  Header Redirect

 so try   if ($sent==true) {  mailsent();  }   bastien   From: "Valerie" [EMAIL PROTECTED]  To: "Bastien Koert" [EMAIL PROTECTED], [EMAIL PROTECTED]  Subject: Re: [PHP-DB] Mail  Header Redirect  Date: Tue, 5 Oct 2004 12:34:27 -0400When I echo $sent, it returns 1.  Thanks,  Valerie  - Original Message - From: "Bastien Koert"  [EMAIL PROTECTED]To: [EMAIL PROTECTED]; php-  [EMAIL PROTECTED]Sent: Tuesday, October 05, 2004 10:03 AM  Subject: RE: [PHP-DB] Mail  Header Redirect  if you echo $Sent, what do you get?bastien 
 From: "Valerie" [EMAIL PROTECTED]  To: [EMAIL PROTECTED]  Subject: [PHP-DB] Mail  Header Redirect  Date: Tue, 5 Oct 2004 08:24:26 -0400I have an email that is sent upon submission of a form. I need  to  redirect to a confirmation page if email is sent successfully.  I thought  the problem was that my email headers are already being sent,  but when I  removed them it still did not work. I need to bcc as well.headers:?php function mailsent(){header("location:  http://www.justustwo.com/vals/thankyou.html");exit();}And mailing:/*Mailing*/ 
  $to="[EMAIL PROTECTED]";   $subject="AVC received a quote request!";   $message="   H3 align='center'AVC received a quote request from  $name/h3 h4table cellpadding='5' cellspacing='0'  align='center'  border='1'   tr   tdEmail:/td   td$email/td   /tr   tr   tdPhone:/td   td$phone/td   /tr   tr   tdIndoors/Outdoors:/td   td$where/td   /tr   tr   tdType of Stock:/td 
  td$m/td   /tr   tr   tdQuantity:/td   td$quantity/td   /tr   tr   tdSides:/td   td$s/td   /tr   tr   tdColors:/td   td$colors/td   /tr   tr   tdFinishing:/td   td$finish/td   /tr   tr   tdComments:/td   td$c/td   /tr   /table/h4"; 
/* set the Content-type header. */   $headers = "MIME-Version: 1.0\n";   $headers .= "Content-type: text/html; charset=iso-8859-1\n\r";   /* additional headers */   $headers .= "From:AVCQuoteRequest";   $headers .= "Bcc: [EMAIL PROTECTED]";   $sent=mail($to,$subject,$message,$headers);   if ($sent) {   mailsent();   }   else {   $errormessage="h2 class=\"error2\"**There was an error.  Please  call 1-800-548-4449/h2";   echo $errormessage;   exit;   }  _ 
 Scan and help eliminate destructive viruses from your inbound  and outbound  e-mail and attachments.  http://join.msn.com/?pgmarket=en-  capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines  Start enjoying all the benefits of MSN® Premium right now and  get the  first two months FREE*.  --  PHP Database Mailing List (http://www.php.net/)  To unsubscribe, visit: http://www.php.net/unsub.php _  Take advantage of powerful junk e-mail filters built on patented  Microsoft®  SmartScreen Technology.  http://join.msn.com/?pgmarket=en- 
 capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines  Start enjoying all the benefits of MSN® Premium right now and  get the  first two months FREE*.   



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

Re: [PHP-DB] Mail Header Redirect

2004-10-05 Thread Valerie
Yes, I put an echo statement inside the function itself and it returns fine. 
The problem appears to be with the header location.

Thanks again,
Valerie
- Original Message - 
From: Bastien Koert [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, October 05, 2004 3:10 PM
Subject: Re: [PHP-DB] Mail  Header Redirect


can you put some output in the function itself to see if its the function
that blowing up and or if its the mail call...
bastien

From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Bastien Koert [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Mail  Header Redirect
Date: Tue, 05 Oct 2004 14:50:37 -0400
_
Take advantage of powerful junk e-mail filters built on patented 
Microsoft®
SmartScreen Technology.
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines
 Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.

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


RE: [PHP-DB] MAIL() help needed :-(

2004-08-09 Thread Chris Payne

Hi there,

Thanks for the help, I've sorted it out now - stupid me :-)  You know what
it's like sometimes, you work that hard on different things that something
which should be really simple just goes over your head - well, it does mine
anyway :-)

Very much appreciated.

Chris

Hey Chris,

Probably a good idea would be to read the email RFC.

I'd say that you're trying to send a Multi-part MIME email, but not
formatting it correctly. You even forget to include your 'simple' (plain
text) message in the email body. SO if you were formatting it correctly, and
your friend is only viewing plain text, you won't see anything.

Here's the basic structure of a Multi-part MIME email:

 begin quote 
From:  Persons Name [EMAIL PROTECTED]
MIME-Version: 1.0
Content-type: multipart/alternative; boundary=mime_seperator
X-Mailer: PHP/5.0.0
This is a multi-part message in MIME format.

--mime_seperator
Content-type: text/plain;charset=us-ascii
Content-Transfer-Encoding: 7bit
This is the plain text part of the email.

--mime_seperator
Content-type: text/html;charset=us-ascii
Content-Transfer-Encoding: 7bit

HTML
HEADTITLEEmail Title/TITLE/HEAD
BODY
HTML Email  in here
/BODY
/HTML

--mime_seperator-

 end quote 


A few notes for you:

1. This is a multi-part message in MIME format. begins the email body. (ie
it's not a header)
2. Most of the headers need \r\n as a newline. \n won't do. (Checkout the
code below to see where to use \r\n and where to use \n)
3. You need a mime seperator to begin each section of the email. it should
be preceded by -- each time. You should end the email with the mime
seperator preceeded with -- AND suffixed with -. You can use pretty much
anything for the seperator. There may be a restriction on which characters
you can use.
4. This does not cover attachments. If you want to send attachments in the
email, you need to do some further research.

Official EMail RFCs:
http://www.ietf.org/rfc/rfc2822.txt
http://www.ietf.org/rfc/rfc1341.txt

Here's a great tutorial at PHP Builder:
http://www.phpbuilder.com/columns/kartic2807.php3


Here's how I do the above email:

?
  $myname=My Name;
  $my_email=[EMAIL PROTECTED];
  $username=Person's Name;
  $user_email=[EMAIL PROTECTED];
  $stamp=time();
  $subject=General Subject;
  $content_boundary=MYDOMAIN_$stamp;
  $extra_headers=From: $myname $my_email \r\nMIME-Version:
1.0\r\nContent-type: multipart/alternative;
boundary=\$content_boundary\\r\nX-Mailer: PHP/.phpversion();
  $start_html=Content-type:
text/html;\tcharset=\us-ascii\\nContent-Transfer-Encoding: 7bit\n\n;
  $start_text=Content-type:
text/plain;\tcharset=\us-ascii\\nContent-Transfer-Encoding: 7bit\n\n;
  $message=This is a multi-part message in MIME format.\r\n\r\n;
  $message.=--.$content_boundary.\r\n.$start_text;
  $message.=Plain text email.\r\nA new line\r\n\r\nTwo new lines follwed by
some more text.
  $message.=--.$content_boundary.\r\n.$start_html;
  $message.=!DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01
Transitional//EN\\r\nHTML\r\nHEADTITLE/TITLE\r\n/HEAD\r\nBODY\
r\n;
  $message.=Message body in here;
  $message.=\r\n/BODY\r\n/HTML;
  $message.=--.$content_boundary.-\r\n;
  mail($username..$user_email., $subject, $message, $extra_headers);
?

Hope this helps.

Collin

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



Re: [PHP-DB] MAIL() help needed :-(

2004-08-08 Thread John Holmes
Chris Payne wrote:
I'm having a major problem.  I'm trying to send a message FROM Windows XP
Pro, now this is where it get weird - in some mail packages it WORKS, and in
some it doesn't.  Basically it's an HTML email which is sent when a form is
completed, the results are stored in a DB and then sent on in an HTML Email
Format.  In My outlook 2003, it works, in my friends outlook 2003 which I
setup for him exactly the same way mine is - the email is blank, it is the
same in his outlook express.  My question is, can anyone see anything that I
am doing wrong for this to happen?  Maybe my headers are wrong?  Any help
would be really appreciated as this is really getting to me.
Are you sure he isn't just viewing the message in plain text? Each of 
you view the source of the message and see if anything is different. 
This isn't a PHP issue, as far as I can tell.

$body_html = $messagebody; 
$body_html = $messagebody;
$headers .= to: \.$to_name.\ .$to_email.\r\n; 
Don't put a To: header here. That's what the to parameter of mail() is 
for.

$headers .= Content-Type: text/html; charset=ISO-8859-1\r\n; 
Not the best way to send an HTML message. It'll work on some mail 
clients and not on others. Best way is to send a multi-part message. 
Search Google for a tutorial.

--
John Holmes
php|architect - The magazine for PHP professionals - http://www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Mail() - Preposterous Accusation

2004-04-09 Thread -{ Rene Brehmer }-
I think where the bounces goes is really a matter of mailserver 
configuration more than PHP itself... not sure about that really though ... 
I only use the mail() function to send mail from the website to the 
webmaster ... so that I don't have to expose the actual email addy on the 
site itself... so never had a bounce...

Rene

At 00:25 09-04-2004, Ryan Jameson (USA) wrote:
He says later in his email that:

The reason I mention this is because any email delivery failures will
not be sent back to you, but to our servers (due to the way that PHP
writes the email headers when using the mail() command).
... Is there a way to get the bounces to go to the reply to address?
I've never really cared to, but now that he mentions it ... It would be
nice.
 Ryan
--
Rene Brehmer
aka Metalbunny
~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Mail() - Preposterous Accusation

2004-04-09 Thread -{ Rene Brehmer }-
At 03:02 09-04-2004, Jochem Maas wrote:
Justin Patrin wrote:

Sounds alot more like advertising than sanity ... there's not much
trickery in using the mail() function ... only if you want to attach
files can it get a bit tricky (encoding the file and inserting the
result), but in reality, there's not much in using that function
properly ...
you'll find that phpmailer is a quite nice wrapper for the mail function - 
it presents 1 clear object interface and handles all the mundane tasks of 
CC, BCC, Attachments, Encoding, MIME etc. I have been using it for quite 
sometime now. just drop 2 files into your project include/class directory 
and your pretty much off using a simple Mailer object.

I think advertising is a bit harsh considering it free software. I usually 
interested in what people think are good tools/classes, even if its the 
writer (is that even the case here?). let the code speak for itself.
I meant more the wording in that paragraph ... to me it sounds like someone 
that's given up figuring out how to do it himself. I've always learned, in 
the classic programming, that you need to learn how it's done, before you 
start using others code to do the work. In my oppinion, if you use a module 
you don't fully understand how works, or why it works how it does, then 
you'll never be able to take full advantage of it, or know what to do 
if/when errors occurs.

incitement_to_riot
code re-use is good right? which is why ideas like PEAR a good for 
everyone. and in the interest of starting a flame war (which there seems 
to be a bit of going around lately) I'll say that IMO most of PEAR (incl. 
the core is bloatware) and that PHP5 will make alot of it redundant, they 
should tear down all but the package manager and a few the gems and start 
again.
/incitement_to_riot
Actually ... in school (Advanced Computer Studies = programming/system 
development) we basically learn that copy/paste is the most important 
function for a programmer ... despite the crudeness of that statement, 
it's just a matter of saying that we shouldn't rewrite everything 
everytime, but try to reuse as much of the code as entirely possible ... so 
yes, code reuse is good, but if you don't understand the code you reuse, 
you're not really benefitting much of it (other than ending in the same 
category as script-kiddies)...

Rene

--
Rene Brehmer
aka Metalbunny
~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Mail() - Preposterous Accusation

2004-04-09 Thread Manuel Lemos
Hello,

On 04/08/2004 08:25 PM, Ryan Jameson wrote:
... Is there a way to get the bounces to go to the reply to address?
I've never really cared to, but now that he mentions it ... It would be
nice.
If you use this class, you can just specify the bounce address in 
Return-Path header and the class will take care of composing and sending 
the message in an appropriate way to make the bounces go to the 
specified address when possible. Keep in mind that just specifying the 
Return-Path header when you use the mail() function directly will not 
work. This class does some magic to make it happen depending on your system.

http://www.phpclasses.org/mimemessage

--

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


Re: [PHP-DB] Mail() - Preposterous Accusation

2004-04-09 Thread Justin Patrin
Jochem Maas wrote:
Justin Patrin wrote:


accurate. If it is, why hasn't the mail function been modified in 
the more recent builds? I've been using PHP since it was invented  
never had a problem with mail.

Also note that your form page is currently using the PHP mail() 
function, which doesn't work very well anymore.  You would be best 
advised to use another solution (one example is PHPMailer -
http://phpmailer.sf.net/) for doing PHP script-based email delivery.




Sounds alot more like advertising than sanity ... there's not much
trickery in using the mail() function ... only if you want to attach
files can it get a bit tricky (encoding the file and inserting the
result), but in reality, there's not much in using that function
properly ...


you'll find that phpmailer is a quite nice wrapper for the mail function 
- it presents 1 clear object interface and handles all the mundane tasks 
of CC, BCC, Attachments, Encoding, MIME etc. I have been using it for 
quite sometime now. just drop 2 files into your project include/class 
directory and your pretty much off using a simple Mailer object.

I think advertising is a bit harsh considering it free software. I 
usually interested in what people think are good tools/classes, even if 
its the writer (is that even the case here?). let the code speak for 
itself.
I didn't mean to say that phpmailer isn't useful, just that using mail() 
should work fine for simple mailing. I definately agree with using a 
library, be it phpmailer or PEAR::Mail for anything more than a simple 
message.

incitement_to_riot
code re-use is good right? which is why ideas like PEAR a good for 
everyone. and in the interest of starting a flame war (which there seems 
to be a bit of going around lately) I'll say that IMO most of PEAR 
(incl. the core is bloatware) and that PHP5 will make alot of it 
redundant, they should tear down all but the package manager and a few 
the gems and start again.
/incitement_to_riot

Yes, code re-use is good. I won't get into the PEAR vs. other stuff 
argument again, I've done it too much lately. Just look for me and 
Manuel Lemos in the archives. ;-) I will say one thing: I like PEAR 
because it's all built around the same framework and everything has a 
similar interface to similar functionality. It has never felt like 
bloatware to me and never will, all of the given functionality is very 
useful.

...




--
paperCrane Justin Patrin
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Mail() - Preposterous Accusation

2004-04-08 Thread -{ Rene Brehmer }-
At 00:01 08-04-2004, Ryan Jameson (USA) wrote:
I know this isn't technically DB related but this is the list that I
use. I'd just like to know if anyone else thinks the below statement is
accurate. If it is, why hasn't the mail function been modified in the
more recent builds? I've been using PHP since it was invented  never
had a problem with mail.
Also note that your form page is currently using the PHP mail()
function, which doesn't work very well anymore.  You would be best
advised to use another solution (one example is PHPMailer -
http://phpmailer.sf.net/) for doing PHP script-based email delivery.


Sounds alot more like advertising than sanity ... there's not much trickery 
in using the mail() function ... only if you want to attach files can it 
get a bit tricky (encoding the file and inserting the result), but in 
reality, there's not much in using that function properly ...

Rene

--
Rene Brehmer
aka Metalbunny
~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Mail() - Preposterous Accusation

2004-04-08 Thread Ryan Jameson (USA)
He says later in his email that:

The reason I mention this is because any email delivery failures will
not be sent back to you, but to our servers (due to the way that PHP
writes the email headers when using the mail() command).

... Is there a way to get the bounces to go to the reply to address?
I've never really cared to, but now that he mentions it ... It would be
nice.

 Ryan

-Original Message-
From: -{ Rene Brehmer }- [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 08, 2004 6:08 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Mail() - Preposterous Accusation

At 00:01 08-04-2004, Ryan Jameson (USA) wrote:
I know this isn't technically DB related but this is the list that I 
use. I'd just like to know if anyone else thinks the below statement is

accurate. If it is, why hasn't the mail function been modified in the 
more recent builds? I've been using PHP since it was invented  never 
had a problem with mail.

Also note that your form page is currently using the PHP mail() 
function, which doesn't work very well anymore.  You would be best 
advised to use another solution (one example is PHPMailer -
http://phpmailer.sf.net/) for doing PHP script-based email delivery.


Sounds alot more like advertising than sanity ... there's not much
trickery in using the mail() function ... only if you want to attach
files can it get a bit tricky (encoding the file and inserting the
result), but in reality, there's not much in using that function
properly ...


Rene

--
Rene Brehmer
aka Metalbunny

~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/

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

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



Re: [PHP-DB] Mail() - Preposterous Accusation

2004-04-08 Thread Justin Patrin
Ryan Jameson wrote:

He says later in his email that:

The reason I mention this is because any email delivery failures will
not be sent back to you, but to our servers (due to the way that PHP
writes the email headers when using the mail() command).
... Is there a way to get the bounces to go to the reply to address?
I've never really cared to, but now that he mentions it ... It would be
nice.
 Ryan

-Original Message-
From: -{ Rene Brehmer }- [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 08, 2004 6:08 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Mail() - Preposterous Accusation

At 00:01 08-04-2004, Ryan Jameson (USA) wrote:

I know this isn't technically DB related but this is the list that I 
use. I'd just like to know if anyone else thinks the below statement is


accurate. If it is, why hasn't the mail function been modified in the 
more recent builds? I've been using PHP since it was invented  never 
had a problem with mail.

Also note that your form page is currently using the PHP mail() 
function, which doesn't work very well anymore.  You would be best 
advised to use another solution (one example is PHPMailer -
http://phpmailer.sf.net/) for doing PHP script-based email delivery.


Sounds alot more like advertising than sanity ... there's not much
trickery in using the mail() function ... only if you want to attach
files can it get a bit tricky (encoding the file and inserting the
result), but in reality, there's not much in using that function
properly ...
Rene

--
Rene Brehmer
aka Metalbunny
~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/
--
PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
Maybe add the appropriate header to the headers parameter? I'm using the 
mail() function and getting bounces just fine. Perhaps set up a mail 
alias/forwarding for the user that the script runs as?

--
paperCrane Justin Patrin
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] mail() and sendmail configuration

2004-02-23 Thread Jason Wong
On Tuesday 24 February 2004 00:18, [EMAIL PROTECTED] wrote:

 This post is somewhat OT -- please forgive me. I've spent over 3 days
 trying to get sendmail configured and I've lost some patience and
 reasoning ability in the process.

 I have a Linux (RH9), Apache 2.0.48, PHP 4.3.4, MySQL GUI that creates a

[snip]

 If anyone has suggestions or knows of helpful links or
 tutorials, I'd be deeply obliged.

0) Does the simplest mail() invocation work at all?

1) Check the php logs
2) Check the sendmail logs
3) Ask on the RedHat list
4) Ask on the sendmail list

-- 
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-db
--
/*
To craunch a marmoset.
-- Pedro Carolino, English as She is Spoke
*/

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



Re: [PHP-DB] mail() and sendmail configuration

2004-02-23 Thread dpgirago
Jason,

Thanks for the suggestions.

In regard to your question, no. A simple mail() invocation without the 
attachment does not work, hence my sense that the problem is the sendmail 
config.
I'm in the process of checking the logs and will repost if anything looks 
promising.

David





Jason Wong [EMAIL PROTECTED]

02/23/2004 11:10 AM



 

To:
[EMAIL PROTECTED]
cc:





Subject:
Re: [PHP-DB] mail() and sendmail configuration



On Tuesday 24 February 2004 00:18, [EMAIL PROTECTED] wrote:

 This post is somewhat OT -- please forgive me. I've spent over 3 days
 trying to get sendmail configured and I've lost some patience and
 reasoning ability in the process.

 I have a Linux (RH9), Apache 2.0.48, PHP 4.3.4, MySQL GUI that creates a

[snip]

 If anyone has suggestions or knows of helpful links or
 tutorials, I'd be deeply obliged.

0) Does the simplest mail() invocation work at all?

1) Check the php logs
2) Check the sendmail logs
3) Ask on the RedHat list
4) Ask on the sendmail list

-- 
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-db
--
/*
To craunch a marmoset.
 -- Pedro Carolino, English as She is 
Spoke
*/

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





Re: [PHP-DB] Mail Function

2004-01-30 Thread John W. Holmes
From: Graeme McLaren [EMAIL PROTECTED]

 Evening all, I've written a script which sends emails, there is no problem
 with that.  I was wondering how I can check for email bounces, anyone know
 how to do that?

There's no direct, easy way. You'll have to write/aquire a PHP script that
logs into a mail server and checks your mail for bounces and reacts
accordingly. PHP offers the function to log into mail servers. Check the
manual.

---John Holmes...

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



Re: [PHP-DB] Mail Function

2004-01-30 Thread J-Michael Roberts
Your script actually connects to an SMTP server and sends the email?

If this is the case, you can have your script look for success/error 
messages returned by the server when it sends - unless you're delivering 
to an AOL address.  AOL accepts everything you throw at it and then 
sends back a notification of success/failure via email...sometimes.  
There are a few other servers that act the same way, but AOL is the 
biggest culprit in making an email list manager's life a living hell.

I've actually been kicking around the idea of a PHP-based list manager 
that will also go through bounce notifications but haven't done anything 
more than that.  The biggest hurdle is getting through the bounced messages.

--JMR

Graeme McLaren wrote:

Evening all, I've written a script which sends emails, there is no problem
with that.  I was wondering how I can check for email bounces, anyone know
how to do that?
Cheers,

G :)

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


Re: [PHP-DB] mail function

2003-10-30 Thread Shahmat Dahlan
The textarea tag has an option called wrap, pls read below (extracted from w3c.org)

TEXTAREA NAME=foo ROWS=4 COLS=40 WRAP=OFF

Carriage returns and line feeds entered by the user are ignored
and one line of text is sent to the server. No automatic wrapping is done,
so the user must scroll horizontally to see lines that extend past the
specified column width.
	TEXTAREA NAME=foo ROWS=4 COLS=40 WRAP=VIRTUAL

Carriage returns and line feeds entered by the user are mirrored
on the screen, but only one line of text is sent to the server with the
return characters stripped out. Automatic wrapping as the user enters
text is performed.
	TEXTAREA NAME=foo ROWS=4 COLS=40 WRAP=PHYSICAL

Carriage returns and line feeds entered by the user are mirrored
on the screen, and all characters the user enters are sent to the server.
In addition, automatic word wrapping is performed and CR/LFs are sent
where the user agent wraps the text.


Ng Hwee Hwee wrote:

hi all,

i need to use a mail() function to send a job application to my inbox when
an applicant goes online and complete the application form. However, when
the contents of a certain field is very long, the message i get in my inbox
is truncated! can anyone help me please?
i've tried word wrap, chunk_split and chop but none worked..

the field in the form is something like textarea name=experience
cols=50 rows=8/textarea.
thank you in advance for your help!

kind regards,
hwee hwee
 

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


RE: [PHP-DB] mail()

2003-07-05 Thread Boaz Yahav
Assuming you use MySQL (for example...) do something like :

?
$result=mysql_query(SELECT * FROM Table) or die(mysql_error());
While($row = mysql_fetch_object($result)) {
 $MyVar .= $row-MyField;
}
mail([EMAIL PROTECTED],this is may
email,$MyVar,From:[EMAIL PROTECTED]);
?

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.

-Original Message-
From: Phil Dowson [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 04, 2003 2:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mail()


Hi,

Could someone let me know if it is possible to pass a resultset of a
query to a single variable so it can be included as the message part of
the mail function?

Thanks!

Phil Dowson



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


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



Re: [PHP-DB] mail() function

2003-05-29 Thread Michael Scappa
Yehp, actually there is :-)

On windows machines you'll need to change the SMTP in there (Since you
probably aren't running a local mail server), in your php.ini you can most
likely change it to your ISP's mail server., there is more specific info on
the docs for the mail funcion in the php manual -- refer to the user
postings: http://us4.php.net/manual/en/ref.mail.php

-Mike

- Original Message -
From: Alex Francis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 3:41 PM
Subject: [PHP-DB] mail() function


 I have set up my pc as a test server  Windows 98 running Apache as a
 service, PHP and MySQL but cannot get the mail() function to work.
 After a long wait, I get an error Warning: Failed to Receive in
 c:\phpdev\www\assets\submit_users.php on line 17. Is there something I
 should be changing in the PHP.ini. I used the default settings for this.



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


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



RE: [PHP-DB] mail()

2003-03-31 Thread Jennifer Goodie
This is not so much a database question.  The answer is yes, it can be.  You
can read the documentation to find out how.
 http://www.php.net/manual/en/function.mail.php

A quick example is:
?php
$body = '';
foreach ($_POST as $key= $val){
$body .= $key = $val\n;
}
mail ($address, Form submission, $body);
?

That is really ugly an inelegant.  I would suggest building off of it by
adding error checking and formatting the mail body.

-Original Message-
From: Mike Delorme [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:23 PM
To: MySQL PHP Database Help
Subject: [PHP-DB] mail()


Can this fucktion be use to mail the submited content of a form? If so how?



Thanks for your time,
Mike Delorme


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



Re: [PHP-DB] mail() function

2003-03-24 Thread Rick Dahl
Is the the type of thing I would need?

http://www.postcastserver.com/

I found where I am supposed to alter the PHP.ini file.  What am I supposed 
to type instead of 'localhost'

Rick

Don't burn the day...away ~ DJM



From: Jason Wong [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mail() function
Date: Sat, 22 Mar 2003 14:49:29 +0800
On Saturday 22 March 2003 16:53, Rick Dahl wrote:
 I think the fact that I don't have a mailserver would do it.  Unless the
 PHP home edition 2 bundle has a mailserver, I don't have one.  Where can 
I
 get one of those?  Can I get it for free?

I think having a mailserver would be a tremendous help in sending mail :)

If you're running on some Windows system you can try specifying the SMTP
server provided by your ISP. Otherwise google is your friend.
If you're running some *nix system then they usually come with the 
ubiquitous
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-db
--
/*
Let me put it this way: today is going to be a learning experience.
*/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Re: [PHP-DB] mail() function

2003-03-24 Thread Jason Wong
On Tuesday 25 March 2003 04:39, Rick Dahl wrote:
 Is the the type of thing I would need?

 http://www.postcastserver.com/

 I found where I am supposed to alter the PHP.ini file.  What am I supposed
 to type instead of 'localhost'

If you're running an SMTP server on the same machine (as your webserver) then 
leave it as 'localhost'. Otherwise do what I originally suggested and use an 
upstream SMTP server (probably provided by your ISP).

-- 
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-db
--
/*
Hoare's Law of Large Problems:
Inside every large problem is a small problem struggling to get out.
*/


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



Re: [PHP-DB] mail() function

2003-03-21 Thread Jason Wong
On Saturday 22 March 2003 16:38, Rick Dahl wrote:
 I can't get it to work.  I get the echo to show up but never receive a
 email.


 if($blankpostage) {
$to = Rick Dahl [EMAIL PROTECTED];
$subject = Online B+P Request;
$body = Show ID =  . $id;
mail($to, $subject, $body);
echo sadflkjaflkasdj;
 }

1) Check that php.ini is correctly configured

2) Check the php error log

3) Check your mailserver log

-- 
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-db
--
/*
You can learn many things from children.  How much patience you have,
for instance.
-- Franklin P. Jones
*/


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



Re: [PHP-DB] mail() function

2003-03-21 Thread Rick Dahl
I think the fact that I don't have a mailserver would do it.  Unless the PHP
home edition 2 bundle has a mailserver, I don't have one.  Where can I get
one of those?  Can I get it for free?

Rick


- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 21, 2003 10:41 PM
Subject: Re: [PHP-DB] mail() function


 On Saturday 22 March 2003 16:38, Rick Dahl wrote:
  I can't get it to work.  I get the echo to show up but never receive a
  email.
 
 
  if($blankpostage) {
 $to = Rick Dahl [EMAIL PROTECTED];
 $subject = Online B+P Request;
 $body = Show ID =  . $id;
 mail($to, $subject, $body);
 echo sadflkjaflkasdj;
  }

 1) Check that php.ini is correctly configured

 2) Check the php error log

 3) Check your mailserver log

 --
 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-db
 --
 /*
 You can learn many things from children.  How much patience you have,
 for instance.
 -- Franklin P. Jones
 */


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



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



Re: [PHP-DB] mail() function

2003-03-21 Thread Jason Wong
On Saturday 22 March 2003 16:53, Rick Dahl wrote:
 I think the fact that I don't have a mailserver would do it.  Unless the
 PHP home edition 2 bundle has a mailserver, I don't have one.  Where can I
 get one of those?  Can I get it for free?

I think having a mailserver would be a tremendous help in sending mail :)

If you're running on some Windows system you can try specifying the SMTP 
server provided by your ISP. Otherwise google is your friend.

If you're running some *nix system then they usually come with the ubiquitous 
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-db
--
/*
Let me put it this way: today is going to be a learning experience.
*/


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



Re: [PHP-DB] Mail() and replies

2003-01-15 Thread John Krewson
I would say this can be done (-:

Run a quck search on freshmeat.net, sourceforge.net,
of course the manual http://www.php.net/manual/en/ref.mail.php,
and http://www.hotscripts.com/, just to name a few places to start.  Or 
just search for mailing list php on Google.

There are a ton of mailing list managers out there - check them out and 
then decide if you need to roll your own.  Many are free to use, and 
would at least offer some idea of where to start.




Baumgartner Jeffrey wrote:

Is there any way to receive mail via PHP?

What I am interested in doing is creating a double opt-in e-mail list
whereby someone can subscribe to an e-mail service via an on-line 
form. Upon
doing so, they would get a confirmation e-mail. Replying to this e-mail
would confirm the subscription and add the sender's e-mail address to the
database (MySQL).

Doable?

Thanks,

Jeffrey Baumgartner

eBusiness Consultant - ITP Europe
http://www.itp-europe.com
[EMAIL PROTECTED]
+32 2 721 51 00



--
John Krewson
Programmer - SWORPS


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




Re: [PHP-DB] Mail() and replies

2003-01-15 Thread 1LT John W. Holmes
 Is there any way to receive mail via PHP?

 What I am interested in doing is creating a double opt-in e-mail list
 whereby someone can subscribe to an e-mail service via an on-line form.
Upon
 doing so, they would get a confirmation e-mail. Replying to this e-mail
 would confirm the subscription and add the sender's e-mail address to the
 database (MySQL).

 Doable?

Sure, there are a couple modules in PHP that'll let you access and read your
POP3 or IMAP email. I'm sure there are some classes on phpclasses.org that
can be modified to your needs.

There are programs out there that do this already, too, if you don't want to
re-create the wheel.

---John Holmes...


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




Re: [PHP-DB] Mail() and replies

2003-01-15 Thread Ignatius Reilly
Quite doable.

Check the IMAP functions.

Ignatius

- Original Message -
From: Baumgartner Jeffrey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 15, 2003 5:19 PM
Subject: [PHP-DB] Mail() and replies


 Is there any way to receive mail via PHP?

 What I am interested in doing is creating a double opt-in e-mail list
 whereby someone can subscribe to an e-mail service via an on-line form.
Upon
 doing so, they would get a confirmation e-mail. Replying to this e-mail
 would confirm the subscription and add the sender's e-mail address to the
 database (MySQL).

 Doable?

 Thanks,

 Jeffrey Baumgartner

 eBusiness Consultant - ITP Europe
 http://www.itp-europe.com
 [EMAIL PROTECTED]
 +32 2 721 51 00


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




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




RE: [PHP-DB] - mail() with atachment

2003-01-12 Thread Rene Groothuis (Aeqis)
Take a look at http://phpmailer.sourceforge.net/ a very usefull php
class for sending e-mail including attachements.

Rene.

-Original Message-
From: Nikos Gatsis [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, January 12, 2003 3:21 AM
To: PHP-mailist
Subject: [PHP-DB] - mail() with atachment


Hello list!
Does anybody knows how to send a mail through a php page using mail()
function including an attachment file? Thanx Nikos



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




Re: [PHP-DB] - mail() with atachment

2003-01-12 Thread Manuel Lemos
Hello,

On 01/12/2003 09:21 AM, Nikos Gatsis wrote:

Does anybody knows how to send a mail through a php page using mail() function including an attachment file?


Just try this class that provides exactly what you need and more and is 
very easy:

http://www.phpclasses.org/mimemessage


--

Regards,
Manuel Lemos


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



Re: [PHP-DB] mail()

2002-10-31 Thread Jeffrey_N_Dyke

did you restart apache?



   
 
epeloke@echoma 
 
n.com (EdwardTo: [EMAIL PROTECTED]
 
Peloke)  cc:   
 
 Subject: [PHP-DB] mail()  
 
10/31/2002 
 
02:53 PM   
 
   
 
   
 




I know this is off topic to the db list but..


I am attempting to use the mail function.  I have set the smtp in the
php.ini file to my smtp server but when I run the script, I get the error
Warning: Failed to Connect in c:\program files\apache
group\apache\htdocs\lg\nuser2.php on line 50 where line 50 is where the
mail
function is called.  Why is it still pointing to my localhost?  I am
running
it through apache and Win98.

Thanks,
Eddie


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





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




Re: [PHP-DB] mail()

2002-10-31 Thread Marco Tabini
Did you restart the server? Are you sure you modified the right php.ini?


On Thu, 2002-10-31 at 14:53, Edward Peloke wrote:
 I know this is off topic to the db list but..
 
 
 I am attempting to use the mail function.  I have set the smtp in the
 php.ini file to my smtp server but when I run the script, I get the error
 Warning: Failed to Connect in c:\program files\apache
 group\apache\htdocs\lg\nuser2.php on line 50 where line 50 is where the mail
 function is called.  Why is it still pointing to my localhost?  I am running
 it through apache and Win98.
 
 Thanks,
 Eddie
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



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




RE: [PHP-DB] mail()

2002-10-31 Thread Edward Peloke
yep and I still get the same error...I modified the ini file in my windows
directory..I assume that is the right one.

Eddie

-Original Message-
From: Marco Tabini [mailto:marcot;tabini.ca]
Sent: Thursday, October 31, 2002 2:24 PM
To: Edward Peloke
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mail()


Did you restart the server? Are you sure you modified the right php.ini?


On Thu, 2002-10-31 at 14:53, Edward Peloke wrote:
 I know this is off topic to the db list but..


 I am attempting to use the mail function.  I have set the smtp in the
 php.ini file to my smtp server but when I run the script, I get the error
 Warning: Failed to Connect in c:\program files\apache
 group\apache\htdocs\lg\nuser2.php on line 50 where line 50 is where the
mail
 function is called.  Why is it still pointing to my localhost?  I am
running
 it through apache and Win98.

 Thanks,
 Eddie


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




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


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




RE: [PHP-DB] mail()

2002-10-31 Thread Edward Peloke

this may be dumb but I for the smtp setting, I simply put in what every is
under smtp when I open up the info in outlook...do I need to put it in
quotes or anything?
-Original Message-
From: [EMAIL PROTECTED] [mailto:Jeffrey_N_Dyke;Keane.com]
Sent: Thursday, October 31, 2002 2:31 PM
To: Edward Peloke
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mail()



did you restart apache?




epeloke@echoma
n.com (EdwardTo: [EMAIL PROTECTED]
Peloke)  cc:
 Subject: [PHP-DB] mail()
10/31/2002
02:53 PM






I know this is off topic to the db list but..


I am attempting to use the mail function.  I have set the smtp in the
php.ini file to my smtp server but when I run the script, I get the error
Warning: Failed to Connect in c:\program files\apache
group\apache\htdocs\lg\nuser2.php on line 50 where line 50 is where the
mail
function is called.  Why is it still pointing to my localhost?  I am
running
it through apache and Win98.

Thanks,
Eddie


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





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


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




RE: [PHP-DB] Mail Function

2002-08-27 Thread Ruprecht Helms


Hi Manoj  Japher,

 add the following (see in context)
 
 ?
  $toaddress = [EMAIL PROTECTED];
^ 
addslashes(...)
  $fromaddress = [EMAIL PROTECTED];
  ^
  addslashes(...)
  $subject = Test Mail;
  ^
  addslashes(...)
  $content = Your username and password as you requested 
 \n ^
  addslashes(...)

 .Username = user \n
 .Password = pass \n;
  mail($toaddress, $subject ,$content, $fromaddress);
  echo  Your username and password has been mailed to you 
 ;
  ?

The returned mail can be a result of the missing part(s).

Regards,
Ruprecht


--
Ruprecht Helms  -   IT-Service  Softwareentwicklung
==
E-Mail: Ruprecht Helms [EMAIL PROTECTED]
Date: 27-Aug-02
Time: 22:16:46
==
Homepage: http://www.rheyn.de 
email: [EMAIL PROTECTED]

Phone + Fax  +49[0]7621 16 99 16


This message was sent by XFMail 


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




RE: [PHP-DB] Mail Function

2002-08-27 Thread Russ

$mailTo = [EMAIL PROTECTED];
$mailFrom = From:[EMAIL PROTECTED];
$mailSubject = This is an email...;
$mailBody = This is a message;
@mail($mailTo,$mailFrom,$mailSubject,$mailBody);

Try this, it works for me ;-)
Russ

-Original Message-
From: Manoj Japher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 2:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Mail Function


hi,
  I know this question is in the wrong group, but I hope someone 
maybe
able to help me out. I need to use the mail() function in my code 
to
send out mails which I am able to do successfully. But I am not 
able
to set the 'from address' in the mail I sent. It always varies. 
Can I
set the from address field as to my liking.

  I tried the following code

?
 $toaddress = [EMAIL PROTECTED];
 $fromaddress = [EMAIL PROTECTED];
 $subject = Test Mail;
 $content = Your username and password as you requested 
\n
.Username = user \n
.Password = pass \n;
 mail($toaddress, $subject ,$content, $fromaddress);
 echo  Your username and password has been mailed to you 
;
 ?

And the mail I got had the from address as
[EMAIL PROTECTED]

Can someone help me out please

Best Regards,

Manoj


'I have miles to go before I sleep, and promises to keep'

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



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




RE: [PHP-DB] Mail Function

2002-08-27 Thread Russ

Oops! wrong order of arguments...

I meant:

$mailTo = [EMAIL PROTECTED];
$mailFrom = From:[EMAIL PROTECTED];
$mailSubject = This is an email...;
$mailBody = This is a message;
@mail($mailTo,$mailSubject,$mailBody,$mailFrom);

Russ

-Original Message-
From: Manoj Japher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 2:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Mail Function


hi,
  I know this question is in the wrong group, but I hope someone 
maybe
able to help me out. I need to use the mail() function in my code 
to
send out mails which I am able to do successfully. But I am not 
able
to set the 'from address' in the mail I sent. It always varies. 
Can I
set the from address field as to my liking.

  I tried the following code

?
 $toaddress = [EMAIL PROTECTED];
 $fromaddress = [EMAIL PROTECTED];
 $subject = Test Mail;
 $content = Your username and password as you requested 
\n
.Username = user \n
.Password = pass \n;
 mail($toaddress, $subject ,$content, $fromaddress);
 echo  Your username and password has been mailed to you 
;
 ?

And the mail I got had the from address as
[EMAIL PROTECTED]

Can someone help me out please

Best Regards,

Manoj


'I have miles to go before I sleep, and promises to keep'

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



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




RE: [PHP-DB] Mail problem

2002-08-01 Thread Russ

Could you not simply extract all the email addresses from the DB as you
would any other data, then loop thru the result set calling PHP's mail()
function for every record retrieved?

while($row=mysql_fetch_assoc($result))
{
extract($row);
//Presume's '$email ' is the name of the field in which email addresses
are stored in your DB:
@mail($email,$from,$subject,$body);
}

or am I missing something??
Russ

-Original Message-
From: Bartek Pawlik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 01, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Mail problem


Sorry to be a little bit off topic.

I need a tool or script in PHP, that will automaticaly send e-mails to
receipients taken from database.
For example 1 the same e-mail to 1000 receipients. B

Mail server is on different machine.

Thanks in advance

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




Re: [PHP-DB] Mail problem

2002-08-01 Thread Bartek Pawlik

Of course, but

PHP is on Linux machine where I don't have sendmail, because my 
mail server is on different machine, and that's my problem

Bartek

- Original Message - 
From: Russ [EMAIL PROTECTED]
To: Bartek Pawlik [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, August 01, 2002 8:38 AM
Subject: RE: [PHP-DB] Mail problem


Could you not simply extract all the email addresses from the DB as you
would any other data, then loop thru the result set calling PHP's mail()
function for every record retrieved?

while($row=mysql_fetch_assoc($result))
{
extract($row);
//Presume's '$email ' is the name of the field in which email addresses
are stored in your DB:
@mail($email,$from,$subject,$body);
}

or am I missing something??
Russ

-Original Message-
From: Bartek Pawlik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 01, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Mail problem


Sorry to be a little bit off topic.

I need a tool or script in PHP, that will automaticaly send e-mails to
receipients taken from database.
For example 1 the same e-mail to 1000 receipients. B

Mail server is on different machine.

Thanks in advance

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



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




RE: [PHP-DB] Mail problem

2002-08-01 Thread Russ

Just looking at our php.ini file and we use an external machine to send
mail with when calling the mail() function.

I think you just need to change the directive for the path/URI to the
mail server you wish PHP to use, in your php.ini file.

HTH :-)
Russ

-Original Message-
From: Bartek Pawlik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 01, 2002 2:47 PM
To: [EMAIL PROTECTED]; Russ
Subject: Re: [PHP-DB] Mail problem


Of course, but

PHP is on Linux machine where I don't have sendmail, because my 
mail server is on different machine, and that's my problem

Bartek

- Original Message - 
From: Russ [EMAIL PROTECTED]
To: Bartek Pawlik [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, August 01, 2002 8:38 AM
Subject: RE: [PHP-DB] Mail problem


Could you not simply extract all the email addresses from the DB as you
would any other data, then loop thru the result set calling PHP's mail()
function for every record retrieved?

while($row=mysql_fetch_assoc($result))
{
extract($row);
//Presume's '$email ' is the name of the field in which email addresses
are stored in your DB:
@mail($email,$from,$subject,$body);
}

or am I missing something??
Russ

-Original Message-
From: Bartek Pawlik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 01, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Mail problem


Sorry to be a little bit off topic.

I need a tool or script in PHP, that will automaticaly send e-mails to
receipients taken from database.
For example 1 the same e-mail to 1000 receipients. B

Mail server is on different machine.

Thanks in advance

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



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




Re: [PHP-DB] Mail problem

2002-08-01 Thread Manuel Lemos

Hello,

On 12/31/1969 09:00 PM, Unknown Sender wrote:
 Of course, but
 
 PHP is on Linux machine where I don't have sendmail, because my 
 mail server is on different machine, and that's my problem

If you are allowed, you can install sendmail in your machine and 
configure to route all mail through the mail server.

If you can't, all you can do is to use some PHP SMTP client code to send 
your messages.

In this case you may want to try this class that is optimized for 
queuing messages for many recipients as you need.

http://www.phpclasses.org/smtpclass

You are strongly recommended to put all recipients in Bcc: because 
queuing via SMTP is much slower than using a local mailer like sendmail 
and it would take you a long time to queue if you send separate messages 
for each recipient.

-- 

Regards,
Manuel Lemos


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




Re: [PHP-DB] mail function

2002-07-01 Thread Martin Clifford

Nice, mature response, Jason.  Really smooth! :o)

:chortle:

Martin

 [EMAIL PROTECTED] 06/30/02 09:44AM 
On Sunday 30 June 2002 09:06, CrossWalkCentral wrote:

As this has nothing to do with DBs it should be posted to the php-general 
list.

 When using this fucntion listed bellow with the HTML headder

What function? And what HTML header?

 the email sent does not show the FROM in the FORM filed it just displays it
 in the email message

FORM filed -- is this FROM field or FORM filled (or do you really mean FORM 
filed?)

 Any one have any ideas.

From this confusing mish-mash, I can only guess that you're trying to use the 
mail() function and you're trying to add a FROM header.

 $headers .= From: CrossWalkCentral [EMAIL PROTECTED] \n;

That being the case the manual has an example on how it is done.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk 
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *


/*
No good deed goes unpunished.
-- Clare Booth Luce
*/


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



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




Re: [PHP-DB] mail function

2002-06-30 Thread Jason Wong

On Sunday 30 June 2002 09:06, CrossWalkCentral wrote:

As this has nothing to do with DBs it should be posted to the php-general 
list.

 When using this fucntion listed bellow with the HTML headder

What function? And what HTML header?

 the email sent does not show the FROM in the FORM filed it just displays it
 in the email message

FORM filed -- is this FROM field or FORM filled (or do you really mean FORM 
filed?)

 Any one have any ideas.

From this confusing mish-mash, I can only guess that you're trying to use the 
mail() function and you're trying to add a FROM header.

 $headers .= From: CrossWalkCentral [EMAIL PROTECTED] \n;

That being the case the manual has an example on how it is done.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *


/*
No good deed goes unpunished.
-- Clare Booth Luce
*/


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




Re: [PHP-DB] mail() function

2002-06-11 Thread Lisi

If you are on Windows you can just point to your ISP's SMTP server in your 
.ini file.

At 11:02 AM 6/10/02 +0200, Dib, Walid (MED, Stagiaire GEMS) wrote:
Hello

I want to test the mail() function locally, i'm using esays php, how can I
do that?
thanks

Walid



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


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




Re: [PHP-DB] mail() function

2002-06-10 Thread Edward Marczak

On 6/10/02 5:02 AM, Dib, Walid (MED, Stagiaire GEMS) [EMAIL PROTECTED]
pressed the keys forming the message:

 Hello
 
 I want to test the mail() function locally, i'm using esays php, how can I
 do that?

Not sure what esays php is, but you don't say what platform you're on.
Basically, you need some kind of mail server.  If you're on Linux or MacOS
X, great: you've got sendmail built in.  If you're on Windows, you either
need an SMTP product running locally, or you need one you can connect to.
-- 
Ed Marczak
[EMAIL PROTECTED]


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




Re: [PHP-DB] Mail

2002-04-22 Thread Alex Francis

Here is the section from my PHP.INI

[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = [EMAIL PROTECTED]

; For Unix only.  You may supply arguments as well (default:
'sendmail -t -i').
;sendmail_path =

I presume you mean the SMTP server set in my mail account. That is at my
ISP.


--
Alex Francis
Cameron Design
35, Drumillan Hill
Greenock PA16 0XD

Tel 01475 798106
[EMAIL PROTECTED]
http://www.camerondesign.co.uk

This message is sent in confidence for the addressee only. It may contain
legally privileged information.
Unauthorised recipients are requested to preserve this confidentiality and
to advise the sender
immediately of any error in transmission.
Dl Neil [EMAIL PROTECTED] wrote in message
049e01c1ea16$8a0cf690$0600a8c0@jrbrown">news:049e01c1ea16$8a0cf690$0600a8c0@jrbrown...
 Alex,

  I'm still having problems with the mail function.
 
  I have installed PHP in a Windows 2000 test server. Is there something
 I
  should do to allow this function to work. I am a complete newbie and
  installed with the default settings. I get a Failed to connect Error
 when I
  call the mail() function.
 
  // retrieve values
  $row = mysql_fetch_array($ret);
  $email = $row[email];
  $title = $row[title];
  $comments = $row[comments];
  $title = $row[title];
 
  mail($email, $title, $comments);


 Mail is controlled by settings in the php.ini file.
 Please post the [mail function] section (changing any confidential names
 to protect the guilty).
 Setup for Windows differs from *NIX - hence confusion in many
 tutorials/books... this matter is frequently discussed - see archives.

 Regards,
 =dn




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




Re: [PHP-DB] Mail

2002-04-22 Thread Lisi

just change the SMTP to your ISP's SMTP server, i.e. the server you use to 
send mail from your regular mail account.


At 06:45 PM 4/22/02 +0100, Alex Francis wrote:
Here is the section from my PHP.INI

[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = [EMAIL PROTECTED]

; For Unix only.  You may supply arguments as well (default:
'sendmail -t -i').
;sendmail_path =

I presume you mean the SMTP server set in my mail account. That is at my
ISP.


--
Alex Francis
Cameron Design
35, Drumillan Hill
Greenock PA16 0XD

Tel 01475 798106
[EMAIL PROTECTED]
http://www.camerondesign.co.uk

This message is sent in confidence for the addressee only. It may contain
legally privileged information.
Unauthorised recipients are requested to preserve this confidentiality and
to advise the sender
immediately of any error in transmission.
Dl Neil [EMAIL PROTECTED] wrote in message
049e01c1ea16$8a0cf690$0600a8c0@jrbrown">news:049e01c1ea16$8a0cf690$0600a8c0@jrbrown...
  Alex,
 
   I'm still having problems with the mail function.
  
   I have installed PHP in a Windows 2000 test server. Is there something
  I
   should do to allow this function to work. I am a complete newbie and
   installed with the default settings. I get a Failed to connect Error
  when I
   call the mail() function.
  
   // retrieve values
   $row = mysql_fetch_array($ret);
   $email = $row[email];
   $title = $row[title];
   $comments = $row[comments];
   $title = $row[title];
  
   mail($email, $title, $comments);
 
 
  Mail is controlled by settings in the php.ini file.
  Please post the [mail function] section (changing any confidential names
  to protect the guilty).
  Setup for Windows differs from *NIX - hence confusion in many
  tutorials/books... this matter is frequently discussed - see archives.
 
  Regards,
  =dn
 



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


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




Re: [PHP-DB] Mail

2002-04-22 Thread DL Neil

Alex,
That's the info in question!

 Here is the section from my PHP.INI

 [mail function]
 ; For Win32 only.
 SMTP = localhost

 ; For Win32 only.
 sendmail_from = [EMAIL PROTECTED]

 ; For Unix only.  You may supply arguments as well (default:
 'sendmail -t -i').
 ;sendmail_path =

 I presume you mean the SMTP server set in my mail account. That is at
my
 ISP.

The SMTP= entry must be pointing at an SMTP server. Have you installed
SMTP on the local box? In any case, others have had major problems using
localhost, cf a machine name.

FWIW, I recommend using the SMTP svr at your ISP. Because you can set up
this line to be exactly the same as you have in your email package - and
thus reduce variable factors, if you can get email OUT using your email
client, you should be able to have high confidence that your PHP
infrastructure will work! (so even if you have set up a local SMTP
server, I'd get going on the ISP, and once proven switch back in-house)

Regards,
=dn


   I'm still having problems with the mail function.
  
   I have installed PHP in a Windows 2000 test server. Is there
something
  I
   should do to allow this function to work. I am a complete newbie
and
   installed with the default settings. I get a Failed to connect
Error
  when I
   call the mail() function.
  
   // retrieve values
   $row = mysql_fetch_array($ret);
   $email = $row[email];
   $title = $row[title];
   $comments = $row[comments];
   $title = $row[title];
  
   mail($email, $title, $comments);
 
 
  Mail is controlled by settings in the php.ini file.
  Please post the [mail function] section (changing any confidential
names
  to protect the guilty).
  Setup for Windows differs from *NIX - hence confusion in many
  tutorials/books... this matter is frequently discussed - see
archives.
 
  Regards,
  =dn
 



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




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




RE: [PHP-DB] Mail

2002-04-22 Thread Alex Francis

Can I set this to use the SMTP Server at my ISP but still use the database
and PHP files in house. I don't want to make any changes to either the php
pages or the database at the ISP until I have got it all working. Although I
suppose I could set up another site and database at my ISP.

Alex Francis
Cameron Design
35, Drumillan Hill, Greenock, PA16 0XD
Tel / Fax 01475 798106
http://www.camerondesign.co.uk
email: [EMAIL PROTECTED]

This message is sent in confidence for the addressee only. It may contain
legally privileged information.
Unauthorised recipients are requested to preserve this confidentiality and
to advise the sender immediately of any error in transmission.


---BeginMessage---

Alex,
That's the info in question!

 Here is the section from my PHP.INI

 [mail function]
 ; For Win32 only.
 SMTP = localhost

 ; For Win32 only.
 sendmail_from = [EMAIL PROTECTED]

 ; For Unix only.  You may supply arguments as well (default:
 'sendmail -t -i').
 ;sendmail_path =

 I presume you mean the SMTP server set in my mail account. That is at
my
 ISP.

The SMTP= entry must be pointing at an SMTP server. Have you installed
SMTP on the local box? In any case, others have had major problems using
localhost, cf a machine name.

FWIW, I recommend using the SMTP svr at your ISP. Because you can set up
this line to be exactly the same as you have in your email package - and
thus reduce variable factors, if you can get email OUT using your email
client, you should be able to have high confidence that your PHP
infrastructure will work! (so even if you have set up a local SMTP
server, I'd get going on the ISP, and once proven switch back in-house)

Regards,
=dn


   I'm still having problems with the mail function.
  
   I have installed PHP in a Windows 2000 test server. Is there
something
  I
   should do to allow this function to work. I am a complete newbie
and
   installed with the default settings. I get a Failed to connect
Error
  when I
   call the mail() function.
  
   // retrieve values
   $row = mysql_fetch_array($ret);
   $email = $row[email];
   $title = $row[title];
   $comments = $row[comments];
   $title = $row[title];
  
   mail($email, $title, $comments);
 
 
  Mail is controlled by settings in the php.ini file.
  Please post the [mail function] section (changing any confidential
names
  to protect the guilty).
  Setup for Windows differs from *NIX - hence confusion in many
  tutorials/books... this matter is frequently discussed - see
archives.
 
  Regards,
  =dn
 



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





---End Message---

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


RE: [PHP-DB] Mail

2002-04-22 Thread Lisi

Yep, that's exactly how it works. Just like the email you send from Eudora 
or Outlook is all stored on your hard drive, but uses the SMTP server of 
your ISP, same here.

-Lisi

At 07:17 PM 4/22/02 +0100, Alex Francis wrote:
Can I set this to use the SMTP Server at my ISP but still use the database
and PHP files in house. I don't want to make any changes to either the php
pages or the database at the ISP until I have got it all working. Although I
suppose I could set up another site and database at my ISP.

Alex Francis
Cameron Design
35, Drumillan Hill, Greenock, PA16 0XD
Tel / Fax 01475 798106
http://www.camerondesign.co.uk
email: [EMAIL PROTECTED]

This message is sent in confidence for the addressee only. It may contain
legally privileged information.
Unauthorised recipients are requested to preserve this confidentiality and
to advise the sender immediately of any error in transmission.

From: DL Neil [EMAIL PROTECTED]
To: Alex Francis [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
References: [EMAIL PROTECTED] 
049e01c1ea16$8a0cf690$0600a8c0@jrbrown 
[EMAIL PROTECTED]
Subject: Re: [PHP-DB] Mail
Date: Mon, 22 Apr 2002 18:53:58 +0100
Message-ID: 060401c1ea26$fcebc050$0600a8c0@jrbrown
MIME-Version: 1.0
Content-Type: text/plain;
 charset=iso-8859-1
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
X-UIDL: jj`!!6LA!QlX!!e7!!

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


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




RE: [PHP-DB] Mail

2002-04-22 Thread Alex Francis

Lisi

I realised that just after my last post. I also realised that I would never
get it to work until I make some alterations to my network. I have a
broadband cable modem connected to a Windows 98 system which I use for
everything. For test purposes I added a Windows 2000 system and at the
moment I am reluctant to spend the time changing over the modem and I can't
seem to get the Windows 2000 PC to connect through the Modem on the Windows
98 mc. I may just get as far as I can and take a chance on working on the
ISP.

Thank you for your help

Alex Francis
Cameron Design
35, Drumillan Hill, Greenock, PA16 0XD
Tel / Fax 01475 798106
http://www.camerondesign.co.uk
email: [EMAIL PROTECTED]

This message is sent in confidence for the addressee only. It may contain
legally privileged information.
Unauthorised recipients are requested to preserve this confidentiality and
to advise the sender immediately of any error in transmission.


---BeginMessage---

Yep, that's exactly how it works. Just like the email you send from Eudora
or Outlook is all stored on your hard drive, but uses the SMTP server of
your ISP, same here.

-Lisi

At 07:17 PM 4/22/02 +0100, Alex Francis wrote:
Can I set this to use the SMTP Server at my ISP but still use the database
and PHP files in house. I don't want to make any changes to either the php
pages or the database at the ISP until I have got it all working. Although
I
suppose I could set up another site and database at my ISP.

Alex Francis
Cameron Design
35, Drumillan Hill, Greenock, PA16 0XD
Tel / Fax 01475 798106
http://www.camerondesign.co.uk
email: [EMAIL PROTECTED]

This message is sent in confidence for the addressee only. It may contain
legally privileged information.
Unauthorised recipients are requested to preserve this confidentiality and
to advise the sender immediately of any error in transmission.

From: DL Neil [EMAIL PROTECTED]
To: Alex Francis [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
References: [EMAIL PROTECTED]
049e01c1ea16$8a0cf690$0600a8c0@jrbrown
[EMAIL PROTECTED]
Subject: Re: [PHP-DB] Mail
Date: Mon, 22 Apr 2002 18:53:58 +0100
Message-ID: 060401c1ea26$fcebc050$0600a8c0@jrbrown
MIME-Version: 1.0
Content-Type: text/plain;
 charset=iso-8859-1
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
X-UIDL: jj`!!6LA!QlX!!e7!!

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



---End Message---

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


Re: [PHP-DB] mail()

2002-04-02 Thread Maureen

You do not show where $fromemail, $friendemail and $fromname are defined.
Shouldn't $toaddress be the first item in your mail function?
Try echoing these 3 variables to make sure it is what you think it should be.

HTH
MB  

James Kupernik [EMAIL PROTECTED] said:

 I'm trying to run a mail function .. the program is running, but I'm not
 getting the email. Here is the code .. any one have any ideas?
 
 $toaddress = $friendemail;
 
 $subject = A message from .$fromname..;
 
 $mailcontent = Here's a special message from a friend
.Your friend, .$fromname. at .$fromemail. writes:\n\n
..$message.;
 
 $fromaddress = $fromemail;
 
 mail($fromemail, $subject, $mailcontent, $fromaddress);
 
 I talked with my ISP and the sendmail_path is set up correctly
 
 I know it's not DB related, but I didn't know where else to turn. Thanks for
 any help you can provide.
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 




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




Re: [PHP-DB] mail()

2002-04-02 Thread Adam Voigt

You know that $fromaddress must have the correct header's to, right?
Like just [EMAIL PROTECTED] will not be interepreted but something like 
Reply-to:[EMAIL PROTECTED]
will set the Reply-to header correctly.
Also, did you try taking out the dynamic values and just entering a hardcoded test 
without the
variables to make sure it works just even with straight static values?

Adam Voigt
[EMAIL PROTECTED]

On Tue, 2 Apr 2002 10:55:20 -0500, James Kupernik [EMAIL PROTECTED]  wrote:
 I'm trying to run a mail function .. the program is running, but I'm not
 getting the email. Here is the code .. any one have any ideas?
 
 $toaddress = $friendemail;
 
 $subject = A message from .$fromname..;
 
 $mailcontent = Here's a special message from a friend
.Your friend, .$fromname. at .$fromemail. writes:\n\n
..$message.;
 
 $fromaddress = $fromemail;
 
 mail($fromemail, $subject, $mailcontent, $fromaddress);
 
 I talked with my ISP and the sendmail_path is set up correctly
 
 I know it's not DB related, but I didn't know where else to turn. Thanks for
 any help you can provide.
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




Re: RE: [PHP-DB] mail()

2002-04-02 Thread Adam Voigt

The last parameter of the mail command is for email headers, if you pass in
just a single email address it doesn't know what you want to do with that since
thats not a valid header. If you don't know what your doing with the last parameter
then you don't need to have it, and should omit it, as it is opitional for a reason.

If your sure you do need it, you seperate headers like this:

To set the reply-to field and the from field (as it would appear to the person who 
recieves
the email), you would do: From:[EMAIL PROTECTED]\nReply-to:[EMAIL PROTECTED]

This would make the email appear as coming from [EMAIL PROTECTED], while
when they clicked the reply button, it would go to [EMAIL PROTECTED], the most useful
situation for these is when your server appends a nastry from address like 
apache@localhost
or whatever from the webserver daemon.

Adam Voigt
[EMAIL PROTECTED]

On Tue, 2 Apr 2002 11:05:09 -0500 , Jamie Kupernik [EMAIL PROTECTED] wrote:
 I did try taking out the dynamic values and entering static ... Didn't
 seem to do anything. What do you mean by the Replay-to: thing you
 said. Can you show me an example that would fit in with mine?
 
 Thanks for responding..
 
 James
 
 -Original Message-
 From: Adam Voigt [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 02, 2002 11:02 AM
 To: James Kupernik
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] mail()
 
 
 You know that $fromaddress must have the correct header's to, right?
 Like just [EMAIL PROTECTED] will not be interepreted but something like
 Reply-to:[EMAIL PROTECTED] will set the Reply-to header correctly. Also,
 did you try taking out the dynamic values and just entering a hardcoded
 test without the variables to make sure it works just even with straight
 static values?
 
 Adam Voigt
 [EMAIL PROTECTED]
 
 On Tue, 2 Apr 2002 10:55:20 -0500, James Kupernik [EMAIL PROTECTED]
 wrote:
  I'm trying to run a mail function .. the program is running, but I'm
  not getting the email. Here is the code .. any one have any ideas?
 
  $toaddress = $friendemail;
 
  $subject = A message from .$fromname..;
 
  $mailcontent = Here's a special message from a friend
 .Your friend, .$fromname. at .$fromemail.
 writes:\n\n
 ..$message.;
 
  $fromaddress = $fromemail;
 
  mail($fromemail, $subject, $mailcontent, $fromaddress);
 
  I talked with my ISP and the sendmail_path is set up correctly
 
  I know it's not DB related, but I didn't know where else to turn.
  Thanks for any help you can provide.
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
 This message has been scanned for computer
 viruses and none were found.
 
 Country Curtains Information Systems Department
 
 
 
 
 
 
 This message has been scanned for computer
 viruses and none were found.
 
 Country Curtains Information Systems Department
 
 
 

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




Re: [PHP-DB] mail() on Mac OS X

2002-01-15 Thread Paul Burney

on 1/15/02 7:38 AM, Adam Royle at [EMAIL PROTECTED] appended the
following bits to my mbox:

 I have been trying for months now (on and off) to get mail() working in
 OS X. I

 - I am using PHP v4.0.6 on Mac OS X 10.1 (pre-compiled with cool options
 from entropy.ch)

 - I installed Communigate Pro (a mail server -- and this works when I
 use it in Mail.app)

1) This post should've gone to PHP-General since it isn't related to
databases.

 SMTP = ifunk.dyndns.org
 sendmail_from = [EMAIL PROTECTED]

2) These values are only valid for Windows php installs, not for Unix (i.e.,
Mac OS X.

 - I don't want to use sendmail, I want to use the mail server I have
 already installed.

FWIW, OS X comes with sendmail installed, you just need to enable it in the
/etc/hostconfig file.

Perhaps Communigate Pro has a sendmail type wrapper that you can point the
php sendmail value to.  I've heard that qmail has such a script.  Check with
CG Pro support for more info.

Another option would be to use Manuel Lemos' excellent SMTP class for
sending you email directly through an smtp server.

http://phpclasses.upperdesign.com/

Of course, then you wouldn't actually be using the mail() function.

HTH.

Paul

?php
while ($self != asleep) {
$sheep_count++;
}
?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] mail() - Return-Path

2002-01-12 Thread DL Neil

Malcolm,

 I Have been trying to change the Return-Path: when using mail() but to no
 success. I have followed the examples in the documentation. Is there any
 hidden trick - Iam using apache 1.3.14, php 4.1.1 and sendmail 8.9.3.


=There's been some grouching on the lists about spam and vague questions - How much 
detail have you given about
this problem? Would it be acceptable to answer saying Iam using apache 1.3.14, php 
4.1.1 and sendmail 8.9.3.
and it works fine?

=Fortunately I don't (use sendmail) so after grumbling away, let me say that I do have 
systems that email
(successfully) from PHP code and am interested in the topic (and did like your precise 
subject line).

1 if a msg is constructed (without Return-Path) does it send/receive to spec?
2 which example/documentation?
3 what is the pertinent PHP code?
4 what is the errmsg-received/other symptoms?

=dn



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] mail() - Return-Path

2002-01-12 Thread Malcolm White

1. Message sends.
2/3. The code used is as per the annotated on line PHP manual

[EMAIL PROTECTED]
11-Jan-2002 02:10 
 
There used to be a note with a complete set of headers to use with the mail
function but somehow now its gone so here they are again hope it helps :)

$headers .= From: Name[EMAIL PROTECTED]\n;
$headers .= X-Sender: [EMAIL PROTECTED]\n;
$headers .= X-Mailer: PHP\n; //mailer
$headers .= X-Priority: 3\n; //1 UrgentMessage, 3 Normal
$headers .= Return-Path: [EMAIL PROTECTED]\n;
//Uncomment this to send html format
//$headers .= Content-Type: text/html; charset=iso-8859-1\n;
//$headers .= cc: [EMAIL PROTECTED]\n; // CC to
//$headers .= bcc: [EMAIL PROTECTED]; // BCCs to, separete
multiple with commas [EMAIL PROTECTED], [EMAIL PROTECTED]

Regards
P.A. Luis Tena O.
Mexico city.
 
4. No error messages. An email constructed as above sends perfectly - but
the return path defaults to the apache user (in my case www) not the
supplied return path. I tested the header construction by changing
Return-Path: to X-Path: and the X-Path: header appears correctly. I am not
sure but it seams that the real Return-Path is not overidable.

I hope this is clearer.

Malcolm



At 12:06 12/01/2002 -, you wrote:
Malcolm,

 I Have been trying to change the Return-Path: when using mail() but to no
 success. I have followed the examples in the documentation. Is there any
 hidden trick - Iam using apache 1.3.14, php 4.1.1 and sendmail 8.9.3.


=There's been some grouching on the lists about spam and vague questions -
How much detail have you given about
this problem? Would it be acceptable to answer saying Iam using apache
1.3.14, php 4.1.1 and sendmail 8.9.3.
and it works fine?

=Fortunately I don't (use sendmail) so after grumbling away, let me say
that I do have systems that email
(successfully) from PHP code and am interested in the topic (and did like
your precise subject line).

1 if a msg is constructed (without Return-Path) does it send/receive to spec?
2 which example/documentation?
3 what is the pertinent PHP code?
4 what is the errmsg-received/other symptoms?

=dn



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] mail() - Return-Path

2002-01-12 Thread Paul Burney

on 1/12/02 7:36 AM, Malcolm White at [EMAIL PROTECTED] appended the
following bits to my mbox:

 4. No error messages. An email constructed as above sends perfectly - but
 the return path defaults to the apache user (in my case www) not the
 supplied return path. I tested the header construction by changing
 Return-Path: to X-Path: and the X-Path: header appears correctly. I am not
 sure but it seams that the real Return-Path is not overidable.

It's a sendmail config thing.  Do you have access to the server? Or is at a
web host?  

If you can get access to your php.ini file and restart apache, you can
change the sendmail path to:

sendmail -t -i -f [EMAIL PROTECTED]

That bounces all mail to that address.  I believe that in PHP 4.0.6 they
added another parameter of the mail function that lets you add options to
sendmail from each script, but check the docs.

HTH.

Paul

BTW, since your original message wasn't about databases and PHP, it
should've gone to PHP-General.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] mail() - Return-Path

2002-01-12 Thread DL Neil

Malcolm,

Thank you for all this info. Let's take it one step at a time:-

 1. Message sends.

=yes, answers 1 and 4 highlight the problem with email (not just email from PHP!) - 
there are no guarantees...
(except that the developer will suffer severe headaches and recurring nightmares)

 2/3. The code used is as per the annotated on line PHP manual

 [EMAIL PROTECTED]
 11-Jan-2002 02:10

 There used to be a note with a complete set of headers to use with the mail
 function but somehow now its gone so here they are again hope it helps :)

 $headers .= From: Name[EMAIL PROTECTED]\n;
 $headers .= X-Sender: [EMAIL PROTECTED]\n;
 $headers .= X-Mailer: PHP\n; //mailer
 $headers .= X-Priority: 3\n; //1 UrgentMessage, 3 Normal
 $headers .= Return-Path: [EMAIL PROTECTED]\n;
 //Uncomment this to send html format
 //$headers .= Content-Type: text/html; charset=iso-8859-1\n;
 //$headers .= cc: [EMAIL PROTECTED]\n; // CC to
 //$headers .= bcc: [EMAIL PROTECTED]; // BCCs to, separete
 multiple with commas [EMAIL PROTECTED], [EMAIL PROTECTED]

 Regards
 P.A. Luis Tena O.
 Mexico city.

=I struggled hard and long with this one too - even more so for us Windows users who 
have to worry about \n or
\r\n... The bottom line is that the PHP-native email() function is very 
exacting/narrowly defined - and I
couldn't get it to accept my code reliably (and there's nothing wrong with MY code so 
it must have been ...
fault !?)

 4. No error messages. An email constructed as above sends perfectly - but
 the return path defaults to the apache user (in my case www) not the
 supplied return path. I tested the header construction by changing
 Return-Path: to X-Path: and the X-Path: header appears correctly. I am not
 sure but it seams that the real Return-Path is not overidable.

=yes I found this too, but no I couldn't figure it out.

=So let's try to be constructive: have you read the various RFCs (depending upon which 
formats of email... there
are several to cope with)? RFC822 is the most basic/easiest for me to understand and 
covers simple-text email
msgs (in particular the various headers).

=This raises the question about the use/implementation of Return-Path vs From. If you 
remove the Return-Path
header completely and succeed in send/receiving a msg, what happens when you hit Reply 
to that msg - does it
give you the from address or does the (useless) Return-Path address interject?

=Assuming that works ok, then the question becomes: do you really need to worry about 
Return-Path at all? If you
do not control the Return-Path, you may want to ascertain the server admin's 
policy/procedure for dealing with
any (your) 'returned mail'.

=If you do need to get clever with the headers then be advised that my path to success 
ran through phpguru.org
and a set of open source email PHP classes available there for download ('the man', 
Richard Heyes (?sp) is often
here on the list steering us through email headaches). Even though I'm not into 
classes/OO-programming, several
examples are provided and were enough to get me started - although much of the 
rationale is pure gobbledegook
unless you've read the RFCs (nag, nag).

=Sorry I didn't spot anything blindingly obvious. Let me know how you get on.

=Regards,
=dn


  I Have been trying to change the Return-Path: when using mail() but to no
  success. I have followed the examples in the documentation. Is there any
  hidden trick - Iam using apache 1.3.14, php 4.1.1 and sendmail 8.9.3.
 
 
 =There's been some grouching on the lists about spam and vague questions -
 How much detail have you given about
 this problem? Would it be acceptable to answer saying Iam using apache
 1.3.14, php 4.1.1 and sendmail 8.9.3.
 and it works fine?
 
 =Fortunately I don't (use sendmail) so after grumbling away, let me say
 that I do have systems that email
 (successfully) from PHP code and am interested in the topic (and did like
 your precise subject line).
 
 1 if a msg is constructed (without Return-Path) does it send/receive to spec?
 2 which example/documentation?
 3 what is the pertinent PHP code?
 4 what is the errmsg-received/other symptoms?
 
 =dn
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Mail() Not working

2001-12-12 Thread Kevin J . Maynard


On Wednesday, December 12, 2001, at 01:14 AM, Cristian Pozzer wrote:

 my php.ini file has the following line in it:
 SMTP = mail.attbi.com

 my php script is as follows:
 ?
 $email = to_email;
 $from = from_email;
 $mesg = This is a test email. \r\n;

 if (mail($email, Test, $mesg, $from))
 echo Mail Sent!;
 else
 echo Mail could not be sent...;
 ?


 I have the same problem!


Snip...

 Do you have this problem on a OSX Server right?

OS X.1, I can't imagine there's much difference.

Kevin


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Mail() Not working

2001-12-12 Thread Kevin J . Maynard

On Wednesday, December 12, 2001, at 06:12 AM, Rick Emery wrote:

 The mail() function works fine.  $email must be set to you email 
 program,
 NOT an email server.

 Should be something like  /bin/sendmail.  If you don't have access to 
 this
 function, then you cannot send mail.

So where would the To: address go if not $email?  I thought the proper 
syntax was:  mail(Email_Address_of_Recipient, Title_of_Email, 
Body_of_Email, Headers);

Kevin

 -Original Message-
 From: Kevin J. Maynard [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 11, 2001 10:18 PM
 To: PHP List
 Subject: [PHP-DB] Mail() Not working


 I have been unable to get the mail() function to work.

 my php.ini file has the following line in it:
 SMTP = mail.attbi.com

 my php script is as follows:
 ?
   $email = to_email;
   $from = from_email;
   $mesg = This is a test email. \r\n;
   
   if (mail($email, Test, $mesg, $from))
   echo Mail Sent!;
   else
   echo Mail could not be sent...;
 ?

 Every time I run this script, I receive Mail could not be sent...


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Mail() Not working

2001-12-12 Thread Rick Emery

It should look like:

$email = /bin/sendmail;
$to = [EMAIL PROTECTED];
$subj = A test message;
$body = This is the body of the message;
$hdr = Reply-to: [EMAIL PROTECTED];
mail ($email, $to, $subj, $body, $hdr);

-Original Message-
From: Kevin J. Maynard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 12, 2001 10:33 AM
To: PHP List; Rick Emery
Subject: Re: [PHP-DB] Mail() Not working


On Wednesday, December 12, 2001, at 06:12 AM, Rick Emery wrote:

 The mail() function works fine.  $email must be set to you email 
 program,
 NOT an email server.

 Should be something like  /bin/sendmail.  If you don't have access to 
 this
 function, then you cannot send mail.

So where would the To: address go if not $email?  I thought the proper 
syntax was:  mail(Email_Address_of_Recipient, Title_of_Email, 
Body_of_Email, Headers);

Kevin

 -Original Message-
 From: Kevin J. Maynard [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 11, 2001 10:18 PM
 To: PHP List
 Subject: [PHP-DB] Mail() Not working


 I have been unable to get the mail() function to work.

 my php.ini file has the following line in it:
 SMTP = mail.attbi.com

 my php script is as follows:
 ?
   $email = to_email;
   $from = from_email;
   $mesg = This is a test email. \r\n;
   
   if (mail($email, Test, $mesg, $from))
   echo Mail Sent!;
   else
   echo Mail could not be sent...;
 ?

 Every time I run this script, I receive Mail could not be sent...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] mail() - is there a limit?

2001-09-27 Thread Luke Muszkiewicz

olinux:

I do not know the answer to your question.

However, I would alternatively suggest that you send the email to each
person individually. That is to say, loop through your recipient array and
use mail() to send the message to each recipient, as opposed to creating a
bcc array and then sending one email.

This solution will take longer to execute -- you may in fact need to adjust
the maximum program execution time via set_time_limit() -- but each
recipient will receive an individual email, which, I think, will make your
message look more personal.

Plus, you no longer need to consider the number of addresses in the bcc
field.

Let me know if you have any questions!

-luke

Luke Muszkiewicz
Pure Development, LLC
http://puredev.com


 I am using a script that grabs about 100 emails from a
 database, loops thru and writes them to $bcc

 Then I use a single mail() to send a msg to everyone
 in the $bcc

 Is there a maximum nuber of emails that i can mail to
 this way?

 Thanks,
 olinux


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] mail ()

2001-09-17 Thread Sam Masiello


I think you might want to be a little more specific as to what you are
trying to accomplish.  Give us some more details and we would be glad to
help you out!

HTH

Sam Masiello
Software Quality Assurance Engineer
Synacor 
(716) 853-1362 X289
[EMAIL PROTECTED]


-Original Message-
From: Andrius Jakutis [mailto:[EMAIL PROTECTED]] 
Sent: Monday, September 17, 2001 1:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mail ()

Hello,

How to make field required?

Using mail ()


Thanks.





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] mail function

2001-08-14 Thread Tom Hodder



check that you have either specified

[mail function]
; For Win32 only.
SMTP = mail.myserver.com

; For Win32 only.
sendmail_from = [EMAIL PROTECTED]

or the sendmail path here;

; For Unix only.  You may supply arguments as well (default:
'sendmail -t -i').
;sendmail_path = /usr/bin/sendmail

otherwise mail cannot send mail at all.






-Original Message-
From: Travis Cannell [mailto:[EMAIL PROTECTED]]
Sent: 14 August 2001 03:27
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mail function


hi all,

I cant seem to get my mail function to work. OK so i am a noob, that might
have something to do with it.  I am using a script I found called the HTML
Mime Mail Class, which does everything i need except actually send the mail.
I am guessing that there is some config problems, but i am not sure.  Even
when i try and use the mail() function i get a server error.  So i guess
that my problem is that my return address is messed up.  Does it have to  be
my own domain, or the domain that the server is running on?  Can i set the
return address as a hotmail account, or do i need my own server mail
program?  And is there anything that i need to config in the php.ini file?

Thanks for helping,

T P K Cannell



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] MAIL from php

2001-06-23 Thread Andreas D. Landmark

At 22.06.2001 16:22, you wrote:
Very strange

Warning: mail() is not supported in this PHP build in
/virtual/sergio/public/prova.php on line 18
What's this ?

This is _totally_ unrelated to php-db, and should have been posted on the 
php-general list!
But basically your php install hasn't compiled in support for the mail() 
command, it might
have been disabled on purpose, ask your admin.


-- 
Andreas D Landmark / noXtension
Real Time, adj.:
 Here and now, as opposed to fake time, which only occurs there
and then.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] MAIL from php

2001-06-23 Thread TomazSa

e, sergio (oz. admin), rekompajlaj php na serverju z mail() funkcijo
omogoceno, oz. jo omogoci kako drugace, ce znas:)

p.s. in ni prova, nego je proba :)

lp, tomaz

At 22.06.2001 16:22, you wrote:
Very strange

Warning: mail() is not supported in this PHP build in
/virtual/sergio/public/prova.php on line 18
What's this ?

This is _totally_ unrelated to php-db, and should have been posted on the 
php-general list!
But basically your php install hasn't compiled in support for the mail() 
command, it might
have been disabled on purpose, ask your admin.



Re: [PHP-DB] mail system

2001-04-26 Thread Andreas D. Landmark

At 26.04.2001 16:20, you wrote:
I was wondering if anyone had any ideas on how I can setup a email system ,
internal using php and mysql only .. No Imap Server, or POP. Can someone
please guide me in the right direction ,, this is email sysetm would be only
for registered members. I am setting up a dating site.. Any help would be
appreciated

Thank You

Store the email in some form of storage (database would be preferable) and then
use queries to fetch the mail.

To send mail just insert an entry into the table holding the mail.



-- 
andreas landmark / noXtension
[EMAIL PROTECTED]
We are Pentium of Borg.  Division is futile.  You will be approximated.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] mail() headers

2001-03-19 Thread Joe Brown

I believe mail works completely different on unix.  It probably doesn't
suffer the same problems, because it's a direct call to an external process.

Lookup "sendmail"

""Free Beachler"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Someone else has tested this on Apache on windows 2000.  it broke under
the
 described conditions, i.e., 4th parameter of mail() function exceeds
approx.
 4K.  Remember, the 4th paramter is the "add'l headers" parameter and is
 essential for mime multipart messages.

 (ok, actually I think that if (the header + message stuff generated by
 mail())  4K --then break!!!)

 can someone try my scenario on unix?
 furthermore, is there something in the RFCs that limits message headers to
 4K???  Seems like there shouldn't be...

 -fre


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] mail server

2001-03-07 Thread Michael J. Upchurch

The function ini.set() should be the one to use, but it doesn't set all
options for security reasons.  See
http://www.php.net/manual/en/function.ini-set.php for details.  You should
also check the annotations for email functions for other options.

Michael J. Upchurch
Partner2Partner Communications, LLC

-Original Message-
From: Free Beachler [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 11:48 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mail server


hi all,
 is there any way i can specify my own smtp server and override the
php.ini file?  i want to use
the mail command on my host and i keep getting this error:

Warning: Unknown error in
D:\inetpub\nextepmedia\www\nexteplaunch\test_email.php on line 2



i just have a simple php file with a mail command to mail to me, something
like:

mail('[EMAIL PROTECTED]', 'test email', 'line1\nline2\line3');



anyway, i'm on this NT host and they're not that good.  instead of having
them go into their php.ini file and see what's wrong i want to set my own
server (in the script) to point to our host's SMTP server.

-f



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] mail server

2001-03-07 Thread JJeffman

I'm not sure but I think you must have a smtp server program running to
configure as your smtp server.

HTH.

Jayme.


-Mensagem Original-
De: Free Beachler [EMAIL PROTECTED]
Para: [EMAIL PROTECTED]
Enviada em: quarta-feira, 7 de maro de 2001 14:48
Assunto: [PHP-DB] mail server


 hi all,
  is there any way i can specify my own smtp server and override the
 php.ini file?  i want to use
 the mail command on my host and i keep getting this error:

 Warning: Unknown error in
 D:\inetpub\nextepmedia\www\nexteplaunch\test_email.php on line 2

 

 i just have a simple php file with a mail command to mail to me, something
 like:

 mail('[EMAIL PROTECTED]', 'test email', 'line1\nline2\line3');

 

 anyway, i'm on this NT host and they're not that good.  instead of having
 them go into their php.ini file and see what's wrong i want to set my own
 server (in the script) to point to our host's SMTP server.

 -f



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] mail server

2001-03-07 Thread Miles Thompson

Paul Schreiber has written, in PHP, an email class. His opening comments 
are given below, but ii doesn't do what you want. He might be worth 
emailing however.

If you were on a Linux/Unix/etc box you could use exim, as it can be 
configured to be either it's own SMTP mailer or to use the ISP's. Aren't 
there any open source mail programs for NT?

I don't think this would be very fast, but Python has an SMTP module which 
is very easy to use, but then you'd be invoking Python and calling a script 
every time you wanted to send something. Not an optimum solution.

Miles Thompson




//   EmailClass 0.5
//   class for sending mail
//
//   Paul Schreiber
//   [EMAIL PROTECTED]
//   http://paulschreiber.com/
//
//   parameters
//   --
//   - subject, message, senderName, senderEmail and toList are required
//   - ccList, bccList and replyTo are optional
//   - toList, ccList and bccList can be strings or arrays of strings
// (those strings should be valid email addresses
//
//   example
//   ---
//   $m = new email ( "hello there",// subject
//"how are you?",   // message body
//"paul",   // sender's name
//"[EMAIL PROTECTED]", // sender's email
//array("[EMAIL PROTECTED]", "[EMAIL PROTECTED]"), // To: 
recipients
//"[EMAIL PROTECTED]"  // Cc: recipient
//   );
//
//   print "mail sent, result was" . $m-send();



At 06:17 PM 3/7/01 -0300, JJeffman wrote:
I'm not sure but I think you must have a smtp server program running to
configure as your smtp server.

HTH.

Jayme.


-Mensagem Original-
De: Free Beachler [EMAIL PROTECTED]
Para: [EMAIL PROTECTED]
Enviada em: quarta-feira, 7 de maro de 2001 14:48
Assunto: [PHP-DB] mail server


  hi all,
   is there any way i can specify my own smtp server and override the
  php.ini file?  i want to use
  the mail command on my host and i keep getting this error:
 
  Warning: Unknown error in
  D:\inetpub\nextepmedia\www\nexteplaunch\test_email.php on line 2
 
  
 
  i just have a simple php file with a mail command to mail to me, something
  like:
 
  mail('[EMAIL PROTECTED]', 'test email', 'line1\nline2\line3');
 
  
 
  anyway, i'm on this NT host and they're not that good.  instead of having
  them go into their php.ini file and see what's wrong i want to set my own
  server (in the script) to point to our host's SMTP server.
 
  -f
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Mail Form error

2001-03-04 Thread Rudi Ahlers

Thanx for all the help, it was so quick. I would have helped if I checked
the manual first though :)


Expecting the world to treat you fairly because you are a good person is a
little like expecting the bull not to attack you because you are a
vegetarian."

Unix specialist   Web Developer
Bonzai Web Design
http://www.bonzai.org.za

- Original Message -
From: "Randall Barber" [EMAIL PROTECTED]
To: "Rudi Ahlers" [EMAIL PROTECTED]
Sent: Sunday, March 04, 2001 9:14 PM
Subject: Re: [PHP-DB] Mail Form error


There are only 4 parameters allowed in the mail function, PHP4.0 Manual pg
535.

mail($to, $subject, $message, $additional_headers);

Thus for your purposes below,

 if ($ACTION == "send-mail") {
 mail($MYEMAIL,$TITLE,$NAME,$COMPANY,$CITY,$COUNTRY,$EMAIL,$NUM,"From:
 $EMAIL");
 echo "h2Your information has been submitted./h2\n";
 } else {
 echo "h2Use this form to submit your information./h2\n";
 }
 ?

Try this:

$extra_header = "From: $EMAIL";
$subject = "Submitted Form";
$message = "$TITLE\n$NAME\n$COMPANY\n$CITY\n$COUNTRY\n$EMAIL\n$NUM";

mail($MYEMAIL, $subject, $message, $extra_header);

Hope that helps
RDB



- Original Message -
From: "Rudi Ahlers" [EMAIL PROTECTED]
To: "PhP List" [EMAIL PROTECTED]
Sent: Sunday, March 04, 2001 11:34 AM
Subject: [PHP-DB] Mail Form error


 Can someone please tell me why this form doesn't work?
 I get the following error:
 Warning: Wrong parameter count for mail() in
 /home/www/projects/temp/mailform4.php on line 11

 The code is as follows:
 html
 head
 meta name="Author" content="Chris Mills"
 /head
 body

 ?php
 $MYEMAIL = "root@localhost";

 if ($ACTION == "send-mail") {
 mail($MYEMAIL,$TITLE,$NAME,$COMPANY,$CITY,$COUNTRY,$EMAIL,$NUM,"From:
 $EMAIL");
 echo "h2Your information has been submitted./h2\n";
 } else {
 echo "h2Use this form to submit your information./h2\n";
 }
 ?

 buPlease fill in the form and then click submit:/u/b
 FORM METHOD=POST

 INPUT TYPE=HIDDEN NAME="ACTION" VALUE="send-mail"

 PRETitle:  INPUT TYPE=TEXT NAME="TITLE"/PRE
 PREName:   INPUT TYPE=TEXT NAME="NAME"/PRE
 PRECompany:INPUT TYPE=TEXT NAME="COMPANY"/PRE
 PRECity:   INPUT TYPE=TEXT NAME="CITY"/PRE
 PRECountry:INPUT TYPE=TEXT NAME="COUNTRY"/PRE
 PREEmail:  INPUT TYPE=TEXT NAME="EMAIL"/PRE
 PREContact number: INPUT TYPE=TEXT NAME="NUM"/PRE

 INPUT TYPE=SUBMIT * INPUT TYPE=RESET

 /FORM
 /body
 /html


 Thanx
 Rudi Ahlers


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]