Re: [PHP] mail() question

2004-04-02 Thread Aidan Lister
It's quite easy to remove access to the mail function, simply put mail in
your php.ini under disable_functions


Hernan Marino [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
sorry. lazy me.
there is auto_prepend_file in php.ini
I'll see if it works.
Thanks!


On Fri, 2 Apr 2004 03:51:18 -0300, Hernan Marino wrote:
Thanks for your answer.
Don't you know if there is a way to redefine the mail() function in
the php.ini file without touching the source code. Something like
prepending a file for every script parsed in the server and redefine
there several functions or something like that.

Thanks!



On Fri, 2 Apr 2004 07:46:48 +0100, Duncan Hill wrote:
On Friday 02 April 2004 07:39, Hernan Marino wrote:
 Hello.
 My users can send email from their web pages using mail().
 But the email is sent from [EMAIL PROTECTED], I dont want them to
 attempt to send bulk, so I wonder if there is any way to identify
the

Consider removing the mail() function, and requiring they they use
SMTP
connections.  I believe one of the external mail classes supports
authenticated SMTP, so with that you could tell who was sending the
mail.

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

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



[PHP] mail() question

2004-04-01 Thread Hernan Marino
Hello.
My users can send email from their web pages using mail().
But the email is sent from [EMAIL PROTECTED], I dont want them to
attempt to send bulk, so I wonder if there is any way to identify the
system user sending the email. I use postfix, and I know that postfix
gets connected from user apache, but is there anyway to pass an
argument to postfix, for example, some $_SERVER var to identify the
script location, or something like that.

Any help will be greatly appreciated.

Thanks in advamce.

H Marino

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



Re: [PHP] mail() question

2004-04-01 Thread Hernan Marino
Thanks for your answer.
Don't you know if there is a way to redefine the mail() function in
the php.ini file without touching the source code. Something like
prepending a file for every script parsed in the server and redefine
there several functions or something like that.

Thanks!



On Fri, 2 Apr 2004 07:46:48 +0100, Duncan Hill wrote:
On Friday 02 April 2004 07:39, Hernan Marino wrote:
 Hello.
 My users can send email from their web pages using mail().
 But the email is sent from [EMAIL PROTECTED], I dont want them to
 attempt to send bulk, so I wonder if there is any way to identify
the

Consider removing the mail() function, and requiring they they use
SMTP
connections.  I believe one of the external mail classes supports
authenticated SMTP, so with that you could tell who was sending the
mail.

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



Re: [PHP] mail() question

2004-04-01 Thread Hernan Marino
sorry. lazy me.
there is auto_prepend_file in php.ini
I'll see if it works.
Thanks!


On Fri, 2 Apr 2004 03:51:18 -0300, Hernan Marino wrote:
Thanks for your answer.
Don't you know if there is a way to redefine the mail() function in
the php.ini file without touching the source code. Something like
prepending a file for every script parsed in the server and redefine
there several functions or something like that.

Thanks!



On Fri, 2 Apr 2004 07:46:48 +0100, Duncan Hill wrote:
On Friday 02 April 2004 07:39, Hernan Marino wrote:
 Hello.
 My users can send email from their web pages using mail().
 But the email is sent from [EMAIL PROTECTED], I dont want them to
 attempt to send bulk, so I wonder if there is any way to identify
the

Consider removing the mail() function, and requiring they they use
SMTP
connections.  I believe one of the external mail classes supports
authenticated SMTP, so with that you could tell who was sending the
mail.

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

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



RE: [PHP] mail question (mime)

2003-12-17 Thread Bill Green
Thanks for your replies. Figured it out, just blind. The $headers were
written correctly (except for \r\n at end of lines though \n seems to work
in this case). The problem was in the call to the boundary, the boundary has
to start with -- outside the quoted string definition of the boundary, and
end same with -- at the end of the message.

-- 
Bill
--

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



[PHP] mail question (mime)

2003-12-16 Thread Bill Green
Greetings all.

In an effort to understand more about mime mail with php, I'm writing a
little function to send a multipart/alternative encoded mime mail from a
browser interface. I know you guys have answered these types of questions
many times, but I've googled and research til I'm blue. I'm still somewhat
new to php so I apologize. I'm on a shared hosting environment running
Apache 1.3.29 (Unix), magic_quotes_gpc = on, path to sendmail =
/usr/sbin/sendmail -t -i, smtp is localhost on port 25 (and I don't know
much about Unix permissions). My client platform is Mac, my email client is
Outlook Express (might as well be testing to the lowest common denominator).
I've found lots of php classes on mime mail but have not tried them because
I want to understand the code.

I can use this code to send plain text email or html email just fine, but
not multipart/alternative or mixed. Here's the relevant code. Can someone
point out the error of my ways?

browser interface: 5 fields (3 input of type=text, 2 input of type=textarea)
names:
$from
$to
$subject
$text_msg
$html_msg

On submit, I trim all and stripslashes on the textarea inputs (interesting
that magic quotes seems to add slashes to textarea inputs automatically),
then set my email headers:

$headers =From: {$from}\n;
$headers .=Reply-To: {$from}\n;
$headers .=Return-Path: {$from}\n;
$headers .=Subject: {$subject}\n;
$headers .=X-Sender: {$from}\n;
$headers .=X-Mailer: PHP\n;
$headers .=X-MSMail-Priority: High\n;
$headers .=MIME-Version: 1.0\n;
$headers .=Content-Type: multipart/alternative;
boundary=\--i0o9u8h7g65v\;
$message =--i0o9u8h7g65v\n;
$message .=Content-Type: text/plain; charset=iso-8859-1\n;
$message .=Content-Transfer-Encoding: 7bit\n;
$message .=Content-Disposition: inline\n;
$message .=$text_msg.\n;//plain text message here
$message .=--i0o9u8h7g65v\n;
$message .=Content-Type: text/html; charset=iso-8859-1\n;
$message .=Content-Transfer-Encoding: 7bit\n;
$message .=Content-Disposition: inline\n;
$message .=$html_msg.\n;//html message here
$message .=--i0o9u8h7g65v;

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

The email is sent successfully, but with no message in the message body.
Looking at the message source I see that all of the headers are set and I
see the boundaries and I see both versions of the messages as one would
expect. It all looks correct, even as compared to other mime encoded email I
receive and read just fine. I've tried many variations on these variables.
FYI, if I change the $header = Content-Type: multipart/alternative; ;
to $message = Content-Type: ...; then I see the raw code in the message
body, but of course that does no good. Same results when message is viewed
in a browser based hotmail or yahoo account.

I simply do not understand what I don't understand, so I don't know how to
ask my question. Is this a coding problem, sendmail, permissions, a server
issue???

Thanks for your help.


-- 
Bill
--

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



[PHP] mail question (mime)

2003-12-16 Thread Bill Green
Greetings all. (hope this isn't a second post, first try seemed to fail)

In an effort to understand more about mime mail, I'm writing a
little function to send a multipart/alternative encoded mime mail from a
browser interface. I know you guys have answered these types of questions
many times, but I've googled and research til I'm blue. I'm still somewhat
new to php so I apologize. I'm on a shared hosting environment running
Apache 1.3.29 (Unix), magic_quotes_gpc = on, path to sendmail =
/usr/sbin/sendmail -t -i, smtp is localhost on port 25 (and I don't know
much about Unix permissions). My client platform is Mac, my email client is
Outlook Express (might as well be testing to the lowest common denominator).
I've found lots of php classes on mime mail but have not tried them because
I want to understand the code.

I can use this code to send plain text email or html email just fine, but
not multipart/alternative or mixed. Here's the relevant code. Can someone
point out the error of my ways?

browser interface: 5 fields (3 input of type=text, 2 input of type=textarea)
names:
$from
$to
$subject
$text_msg
$html_msg

On submit, I trim all and stripslashes on the textarea inputs (interesting
that magic quotes seems to add slashes to textarea inputs automatically),
then set my email headers:

$headers =From: {$from}\n;
$headers .=Reply-To: {$from}\n;
$headers .=Return-Path: {$from}\n;
$headers .=Subject: {$subject}\n;
$headers .=X-Sender: {$from}\n;
$headers .=X-Mailer: PHP\n;
$headers .=X-MSMail-Priority: High\n;
$headers .=MIME-Version: 1.0\n;
$headers .=Content-Type: multipart/alternative;
boundary=\--i0o9u8h7g65v\;
$message =--i0o9u8h7g65v\n;
$message .=Content-Type: text/plain; charset=iso-8859-1\n;
$message .=Content-Transfer-Encoding: 7bit\n;
$message .=Content-Disposition: inline\n;
$message .=$text_msg.\n;//plain text message here
$message .=--i0o9u8h7g65v\n;
$message .=Content-Type: text/html; charset=iso-8859-1\n;
$message .=Content-Transfer-Encoding: 7bit\n;
$message .=Content-Disposition: inline\n;
$message .=$html_msg.\n;//html message here
$message .=--i0o9u8h7g65v;

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

The email is sent successfully, but with no message in the message body.
Looking at the message source I see that all of the headers are set and I
see the boundaries and I see both versions of the messages as one would
expect. It all looks correct, even as compared to other mime encoded email I
receive and read just fine. I've tried many variations on these variables.
FYI, if I change the $header = Content-Type: multipart/alternative; ;
to $message = Content-Type: ...; then I see the raw code in the message
body, but of course that does no good. Same results when message is viewed
in a browser based hotmail or yahoo account.

I simply do not understand what I don't understand, so I don't know how to
ask my question. Is this a coding problem, sendmail, permissions, a server
issue???

Thanks for your help.


-- 
Bill
--

-- 
Bill
--

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



RE: [PHP] mail question (mime)

2003-12-16 Thread Chris
I see 3 problems with your final output (though there still could be more)

1) Each header has to end in \r\n, \n usually works but it's supposed to be
\r\n

2) This:
$headers .=Content-Type: multipart/alternative;
boundary=\--i0o9u8h7g65v\;

should be this:
$headers .=Content-Type: multipart/alternative;
boundary=\--i0o9u8h7g65v\;

or this:
$headers .=Content-Type: multipart/alternative;
  boundary=\--i0o9u8h7g65v\;

A header can continue on the next line for readability, but it has to start
with whitespace (space or a tab), otherwise it trys to create the boundary
as a new header.

3) The final boundary must end in -- as well as start with it
so:
$message .=--i0o9u8h7g65v;

should be

$message .=--i0o9u8h7g65v--;

Chris


-Original Message-
From: Bill Green [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 8:19 AM
To: [EMAIL PROTECTED]
Subject: [PHP] mail question (mime)


Greetings all. (hope this isn't a second post, first try seemed to fail)

In an effort to understand more about mime mail, I'm writing a
little function to send a multipart/alternative encoded mime mail from a
browser interface. I know you guys have answered these types of questions
many times, but I've googled and research til I'm blue. I'm still somewhat
new to php so I apologize. I'm on a shared hosting environment running
Apache 1.3.29 (Unix), magic_quotes_gpc = on, path to sendmail =
/usr/sbin/sendmail -t -i, smtp is localhost on port 25 (and I don't know
much about Unix permissions). My client platform is Mac, my email client is
Outlook Express (might as well be testing to the lowest common denominator).
I've found lots of php classes on mime mail but have not tried them because
I want to understand the code.

I can use this code to send plain text email or html email just fine, but
not multipart/alternative or mixed. Here's the relevant code. Can someone
point out the error of my ways?

browser interface: 5 fields (3 input of type=text, 2 input of type=textarea)
names:
$from
$to
$subject
$text_msg
$html_msg

On submit, I trim all and stripslashes on the textarea inputs (interesting
that magic quotes seems to add slashes to textarea inputs automatically),
then set my email headers:

$headers =From: {$from}\n;
$headers .=Reply-To: {$from}\n;
$headers .=Return-Path: {$from}\n;
$headers .=Subject: {$subject}\n;
$headers .=X-Sender: {$from}\n;
$headers .=X-Mailer: PHP\n;
$headers .=X-MSMail-Priority: High\n;
$headers .=MIME-Version: 1.0\n;
$headers .=Content-Type: multipart/alternative;
boundary=\--i0o9u8h7g65v\;
$message =--i0o9u8h7g65v\n;
$message .=Content-Type: text/plain; charset=iso-8859-1\n;
$message .=Content-Transfer-Encoding: 7bit\n;
$message .=Content-Disposition: inline\n;
$message .=$text_msg.\n;//plain text message here
$message .=--i0o9u8h7g65v\n;
$message .=Content-Type: text/html; charset=iso-8859-1\n;
$message .=Content-Transfer-Encoding: 7bit\n;
$message .=Content-Disposition: inline\n;
$message .=$html_msg.\n;//html message here
$message .=--i0o9u8h7g65v;

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

The email is sent successfully, but with no message in the message body.
Looking at the message source I see that all of the headers are set and I
see the boundaries and I see both versions of the messages as one would
expect. It all looks correct, even as compared to other mime encoded email I
receive and read just fine. I've tried many variations on these variables.
FYI, if I change the $header = Content-Type: multipart/alternative; ;
to $message = Content-Type: ...; then I see the raw code in the message
body, but of course that does no good. Same results when message is viewed
in a browser based hotmail or yahoo account.

I simply do not understand what I don't understand, so I don't know how to
ask my question. Is this a coding problem, sendmail, permissions, a server
issue???

Thanks for your help.


--
Bill
--

--
Bill
--

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

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



Re: [PHP] Mail() question

2003-09-09 Thread Jason Wong
On Tuesday 09 September 2003 08:12, Ryan A wrote:

 I am trying to create a new newsletter software as the ones i found on
 hotscripts were just not good enough or mucho $$ which i dont have :-(

[snip]

All your questions have been covered before and the answers are in the 
archives.

 Please note that i I intend to add a kind of word merge functionality later
 on.
 eg:
 Dear ::name::,
 thank you for subscribing your email address: ::email::
 etc etc

For this, your only choice is to send mails out individually.

--  
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
There is no education that is not political.  An apolitical
education is also political because it is purposely isolating.
*/

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



Re: [PHP] Mail() question

2003-09-09 Thread Ryan A
Hey,
Thanks for replying.
I had a look at quick ezmlm but it seems to be more of a mailing list
software than a newsletter one, and since its not in php i cant really dig
in and shape it to my needs...:-(
Thanks anyway,
Cheers,
-Ryan

 Hi,
 Why don't you take a look at ezmlm instead. This is open source and free
 and widely considered to be the best around. But it's not in php though
:-)


 Ryan A wrote:

 Hi everyone,
 I am trying to create a new newsletter software as the ones i found on
 hotscripts were just not good enough or mucho $$ which i dont have :-(
 
 Have finished the basics but need some advise now.
 I am using a mysql database instead of text files.
 
 I have a table with the fields name and email, my questions are,
 1:is it better to use a for loop and then send each mail?
 2:should i first put all the names and addresses into an array?
 3:Is it better to send each mail independantly or use BCC? (one mail
 blast., will it work?)
 
 
 
 Please note that i I intend to add a kind of word merge functionality
later
 on.
 eg:
 Dear ::name::,
 thank you for subscribing your email address: ::email::
 etc etc
 
 Am expecting the list to grow to around 5000 or more.
 
 When replying if possible please give program examples or links as am not
 very familier with this.
 
 Thanks in advance,
 -Ryan
 
 
 
 
 
 We will slaughter you all! - The Iraqi (Dis)information ministers site
 http://MrSahaf.com
 
 
 


 -- 
 http://www.radinks.com/upload
 Drag and Drop File Uploader.





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



Re: [PHP] Mail() question

2003-09-09 Thread Ryan A
Hey Jason,
Thanks for replying.

I did search the archive for newsletter, newsletter software and
variations but didnt come up with much. I got a lot of german and other
results too from php general,debian etc

Will do another search on mail now.


  Please note that i I intend to add a kind of word merge functionality
later
  on.
  eg:
  Dear ::name::,
  thank you for subscribing your email address: ::email::
  etc etc

 For this, your only choice is to send mails out individually.

Thanks, maybe i can program an option something like
if ($mail_merge==1)
{send_singles();}
else
{send_bcc();}


Any advise is welcome.

Cheers,
-Ryan




 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 There is no education that is not political.  An apolitical
 education is also political because it is purposely isolating.
 */

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




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



Re: [PHP] Mail() question

2003-09-09 Thread Jason Wong
On Tuesday 09 September 2003 17:02, Ryan A wrote:

 I did search the archive for newsletter, newsletter software and
 variations but didnt come up with much. I got a lot of german and other
 results too from php general,debian etc

 Will do another search on mail now.

mass mailing, bulk mailing would probably be better search terms.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Systems programmers are the high priests of a low cult.
-- R.S. Barton
*/

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



Re: [PHP] Mail() question

2003-09-09 Thread Chris Hayes
At 09:40 9-9-03, you wrote:
On Tuesday 09 September 2003 08:12, Ryan A wrote:

 I am trying to create a new newsletter software as the ones i found on
 hotscripts were just not good enough or mucho $$ which i dont have :-(
 Please note that i I intend to add a kind of word merge functionality later
Knowing that PHP has problems sending mass mails I chose to send them as 
SMTP directly.

I used this class for it which is self explaining.
http://phpclasses.half2.nl/browse.html/package/346.html
I have not tried to put any load on it yet. It might be a good idea to 
prolong the timeout period in the class.

Don't forget to add the
 From:
 Reply-To:
 Return-Receipt-To: and
 Return-Path:
to the headers, as bounced mail might otherwise get lost.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Mail() question

2003-09-08 Thread Ryan A
Hi everyone,
I am trying to create a new newsletter software as the ones i found on
hotscripts were just not good enough or mucho $$ which i dont have :-(

Have finished the basics but need some advise now.
I am using a mysql database instead of text files.

I have a table with the fields name and email, my questions are,
1:is it better to use a for loop and then send each mail?
2:should i first put all the names and addresses into an array?
3:Is it better to send each mail independantly or use BCC? (one mail
blast., will it work?)



Please note that i I intend to add a kind of word merge functionality later
on.
eg:
Dear ::name::,
thank you for subscribing your email address: ::email::
etc etc

Am expecting the list to grow to around 5000 or more.

When replying if possible please give program examples or links as am not
very familier with this.

Thanks in advance,
-Ryan





We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com

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



Re: [PHP] mail() question

2003-08-26 Thread Matthias Wulkow
Hallo Alister,

am Montag, 25. August 2003 um 03:27 hast Du Folgendes gekritzelt:


A Did you install postfix _after_ PHP?  Did you have a sendmail binary in
A place before you configured PHP?  If it's not there are configure time,
A it won't even compile the 'mail' function.

Yes and there was no sendmail binary before...

A I've had the same problem before - now that PHP can recognise it's got a
A way to send email, re-running ./configure / make / make install should
A work.  It did for me.

I did that, but I forgot to do 'make clean'... now it seems to work.
But I have still one question:
when sending mail with this sendmail binary, is it possible to pass
the mail to a local mail server instead of sending it directly to the
recipient? I ask, because I have a mail server in the network
(different machine than the one running the webserver), but I'd like
the mail not to go outside the network (I have no nameserver!)...

[10 minutes later...]

I don't get the error anymore, but no mail has been sent. No errors in
apache-logs... nothing. I'm trying to sniff the network data transfer
with ethereal, but I don't find any connection to any port 25...

In php.ini, I haven't uncomment the sendmail part (sendmail_path =
...) because there is written that default is sendmail -t -i which
should be ok...

SvT




-- 
Who is the ennemy?

mailto:[EMAIL PROTECTED]

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



Re: [PHP] mail() question

2003-08-26 Thread Alister
On Mon, 25 Aug 2003 14:24:25 +0200
Matthias Wulkow [EMAIL PROTECTED] wrote:

 A Did you install postfix _after_ PHP?  Did you have a sendmail
 A binary in place before you configured PHP?  If it's not there are
 A configure time, it won't even compile the 'mail' function.
 Yes and there was no sendmail binary before...
 
 A I've had the same problem before - now that PHP can recognise it's
 A got a way to send email, re-running ./configure / make / make
 A install should work.  It did for me.
 
 I did that, but I forgot to do 'make clean'... now it seems to work.
 But I have still one question:
 when sending mail with this sendmail binary, is it possible to pass
 the mail to a local mail server instead of sending it directly to the
 recipient?

Thats a mail configuration issue.  Alternatively you can have the send
the email by SMTP to your primary mail server which then sends it on
from there. 

Alister

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



[PHP] mail() question

2003-08-25 Thread Matthias Wulkow

Hi php-general,

I have followig error reported:

Fatal error: Call to undefined function: mail() in /usr/local/www/login.php on line 235

What is the trouble here?  If I would have trouble because of
delivery, normally mail would return false. But here...

I have php4.3.1 running on linux. I just installed postfix to have the
sendmail binary at the right place.

Thx for help

SvT

-- 
Who is the ennemy?

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



Re: [PHP] mail() question

2003-08-25 Thread Curt Zirzow
* Thus wrote Matthias Wulkow ([EMAIL PROTECTED]):
 
 Hi php-general,
 
 I have followig error reported:
 
 Fatal error: Call to undefined function: mail() in /usr/local/www/login.php on line 
 235
 
 What is the trouble here?  If I would have trouble because of
 delivery, normally mail would return false. But here...

mail() wasn't compiled into php.

 
 I have php4.3.1 running on linux. I just installed postfix to have the
 sendmail binary at the right place.

You'll have to recompile php. the first time you compiled it php it
couldnt find sendmail, so it left it out in the binary.

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] mail() question

2003-08-25 Thread Matthias Wulkow
Hallo Curt,

am Montag, 25. August 2003 um 01:35 hast Du Folgendes gekritzelt:

 I have followig error reported:
 
 Fatal error: Call to undefined function: mail() in /usr/local/www/login.php on line 
 235
 
 What is the trouble here?  If I would have trouble because of
 delivery, normally mail would return false. But here...

CZ mail() wasn't compiled into php.

 
 I have php4.3.1 running on linux. I just installed postfix to have the
 sendmail binary at the right place.

CZ You'll have to recompile php. the first time you compiled it php it
CZ couldnt find sendmail, so it left it out in the binary.

Well, that makes sense to me. But I just recompiled the same way I did
it first time (config.nice), but I still get the same error reported.
I looked in ./configure --help to see if there are specific arguments
I need to add, but couldn't find any... and this time sendmail is
there (/usr/sbin/sendmail).

What's wrong?

Thx

SvT


-- 
Who is the ennemy?

mailto:[EMAIL PROTECTED]

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



Re: [PHP] mail() question

2003-08-25 Thread Stevie D Peele
What is on line 235?? That would help us -


SDP


On Mon, 25 Aug 2003 01:09:29 +0200 Matthias Wulkow [EMAIL PROTECTED]
writes:
 
 Hi php-general,
 
 I have followig error reported:
 
 Fatal error: Call to undefined function: mail() in 
 /usr/local/www/login.php on line 235
 
 What is the trouble here?  If I would have trouble because of
 delivery, normally mail would return false. But here...
 
 I have php4.3.1 running on linux. I just installed postfix to have 
 the
 sendmail binary at the right place.
 
 Thx for help
 
 SvT
 
 -- 
 Who is the ennemy?
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

Re: [PHP] mail() question

2003-08-25 Thread Alister
 On Mon, 25 Aug 2003 01:09:29 +0200 Matthias Wulkow [EMAIL PROTECTED]
 writes:
  
  Hi php-general,
  I have followig error reported:
  
  Fatal error: Call to undefined function: mail() in 
  /usr/local/www/login.php on line 235
  What is the trouble here?  If I would have trouble because of
  delivery, normally mail would return false. But here...

  I have php4.3.1 running on linux. I just installed postfix to have 
  the
  sendmail binary at the right place.

Did you install postfix _after_ PHP?  Did you have a sendmail binary in
place before you configured PHP?  If it's not there are configure time,
it won't even compile the 'mail' function.

I've had the same problem before - now that PHP can recognise it's got a
way to send email, re-running ./configure / make / make install should
work.  It did for me.

Alister

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



Re: [PHP] mail() question

2003-08-25 Thread Curt Zirzow
* Thus wrote Matthias Wulkow ([EMAIL PROTECTED]):
 Hallo Curt,
 
 am Montag, 25. August 2003 um 01:35 hast Du Folgendes gekritzelt:
 
  I have followig error reported:
  
  Fatal error: Call to undefined function: mail() in /usr/local/www/login.php on 
  line 235
  
  What is the trouble here?  If I would have trouble because of
  delivery, normally mail would return false. But here...
 
 CZ mail() wasn't compiled into php.
 
  
  I have php4.3.1 running on linux. I just installed postfix to have the
  sendmail binary at the right place.
 
 CZ You'll have to recompile php. the first time you compiled it php it
 CZ couldnt find sendmail, so it left it out in the binary.
 
 Well, that makes sense to me. But I just recompiled the same way I did
 it first time (config.nice), but I still get the same error reported.
 I looked in ./configure --help to see if there are specific arguments
 I need to add, but couldn't find any... and this time sendmail is
 there (/usr/sbin/sendmail).
 
 What's wrong?

When you configure PHP it uses your $PATH envirmonment (plus som
e standard paths.)  

To get more detailed on the situation There is a file in your surce
tree:
  main/php_config.h:

there should be a line (around line #972) that says something like:
  #define HAVE_SENDMAIL 1

If it says 'undef HAVE_SENDMAIL', that generaly means that your
configure script can't find it.

If this is the case I would strongly encourge a search/report at
bugs.php.net to find out how to resolve this.

As long as your sendmail is in a common place you shouldn't have
any problems.



Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



[PHP] mail question

2003-02-13 Thread Jonas Geiregat
is it possible to do something like mail([EMAIL PROTECTED],subject,hello
if($a){ return andreas; });
or what would be the best solution for this ?



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




Re: [PHP] mail question

2003-02-13 Thread Jason Wong
On Friday 14 February 2003 18:53, Jonas Geiregat wrote:
 is it possible to do something like mail([EMAIL PROTECTED],subject,hello
 if($a){ return andreas; });
 or what would be the best solution for this ?

Try it.

I would prefer:

 if ($a) {
   $name = 'andreas'; }
 else {
   $name = '';
 }
 mail([EMAIL PROTECTED],subject,hello $name);

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Seize the day, put no trust in the morrow!
-- Quintus Horatius Flaccus (Horace)
*/


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




Re: [PHP] mail question

2003-02-13 Thread Leif K-Brooks
Try:
mail('[EMAIL PROTECTED]','subject','hello '.($a ? 'andreas'));

Jonas Geiregat wrote:


is it possible to do something like mail([EMAIL PROTECTED],subject,hello
if($a){ return andreas; });
or what would be the best solution for this ?



 


--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.




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




[PHP] mail() question!

2002-11-25 Thread Beauford.2002
Hi,

I have a form where a user enters an email address. The contents of the form
are then sent to myself, which works fine. The problem is that the from
field says it is from nobody - how can I get it to say it is from the email
address the user inputted - or is this possible?

TIA



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




Re: [PHP] Mail Question

2002-11-14 Thread R'twick Niceorgaw
put the following line in the .qmail file for that user

|/path/to/your/script/yourscript.php

HTH
R'twick

- Original Message - 
From: Mike D [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 13, 2002 3:12 PM
Subject: [PHP] Mail Question


 Does anyone know of a way to achieve the following on 
 linux/apache/qmail/php server
 
I want to have an email address that when people send a message to, 
 a php script is triggered and the data of the email is extracted and 
 inserted into a DB for use in a ticketing system.
 
 I know how to do all of the above except how to trigger a php script 
 from an incoming email.
 
 Any ideas anyone?
 
 Thanks,
 Mike Dunlop
 
 
 
 
 
 Mike Dunlop
 Webmaster - AWN, Inc.
 [E] [EMAIL PROTECTED]
 [P] 323.606.4237
 [F] 323.466.6619
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 


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




[PHP] Mail Question

2002-11-13 Thread Mike D
Does anyone know of a way to achieve the following on 
linux/apache/qmail/php server

  I want to have an email address that when people send a message to, 
a php script is triggered and the data of the email is extracted and 
inserted into a DB for use in a ticketing system.

I know how to do all of the above except how to trigger a php script 
from an incoming email.

Any ideas anyone?

Thanks,
Mike Dunlop





Mike Dunlop
Webmaster - AWN, Inc.
[E] [EMAIL PROTECTED]
[P] 323.606.4237
[F] 323.466.6619



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



Re: [PHP] Mail Question

2002-11-13 Thread Jason Wong
On Thursday 14 November 2002 04:12, Mike D wrote:
 Does anyone know of a way to achieve the following on
 linux/apache/qmail/php server

I want to have an email address that when people send a message to,

 a php script is triggered and the data of the email is extracted and
 inserted into a DB for use in a ticketing system.

 I know how to do all of the above except how to trigger a php script
 from an incoming email.

It depends somewhat on what MTA you're using to handle that incoming mail. For 
example in qmail you just create a dot-qmail file which points to the program 
you wish to use to handle that mail. Courier and sendmail both have a similar 
mechanism.

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

/*
You will find me drinking gin
In the lowest kind of inn,
Because I am a rigid Vegetarian.
-- G.K. Chesterton
*/


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




Re: [PHP] Mail Question

2002-11-13 Thread Mike D
Yes we are using qmail. So all I have to do is create the .qmail-info 
file and have that point to a php script?

 - MD


On Wednesday, November 13, 2002, at 12:35  PM, Jason Wong wrote:

On Thursday 14 November 2002 04:12, Mike D wrote:

Does anyone know of a way to achieve the following on
linux/apache/qmail/php server


 I want to have an email address that when people send a message to,


a php script is triggered and the data of the email is extracted and
inserted into a DB for use in a ticketing system.

I know how to do all of the above except how to trigger a php script
from an incoming email.


It depends somewhat on what MTA you're using to handle that incoming 
mail. For
example in qmail you just create a dot-qmail file which points to the 
program
you wish to use to handle that mail. Courier and sendmail both have a 
similar
mechanism.

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

/*
You will find me drinking gin
In the lowest kind of inn,
Because I am a rigid Vegetarian.
		-- G.K. Chesterton
*/


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





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




Re: [PHP] Mail Question

2002-11-13 Thread Jason Wong
On Thursday 14 November 2002 05:48, Mike D wrote:
 Yes we are using qmail. So all I have to do is create the .qmail-info
 file and have that point to a php script?

Yes, man dot-qmail for the details.

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

/*
I think I'm schizophrenic.  One half of me's paranoid and the other half's
out to get him.
*/


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




[PHP] mail() question

2002-09-17 Thread Meltem Demirkus

Hi,
I am trying to send an email by using the function mail().
Although I use  in a form of mail($to, $subject, $message, $headers), it is
giving this error:
Failed to Connect

So I think I am missing something ...
Can anybody help me ?..

thanks alot

meltem demirkus


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




Re: [PHP] mail() question

2002-09-17 Thread John Wards

Meltem

What is you system set up? OS etc?

Cheers
John Wards
SportNetwork.net
- Original Message -
From: Meltem Demirkus [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 17, 2002 2:35 PM
Subject: [PHP] mail() question


 Hi,
 I am trying to send an email by using the function mail().
 Although I use  in a form of mail($to, $subject, $message, $headers), it
is
 giving this error:
 Failed to Connect

 So I think I am missing something ...
 Can anybody help me ?..

 thanks alot

 meltem demirkus


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


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




Re: [PHP] mail() question

2002-09-17 Thread Meltem Demirkus

windows 2000
by the way my whole code is this:

?

$msg = Sender Name:\t$_POST[sender_name]\n;
$msg .= Sender E-Mail:\t$_POST[sender_email]\n;
$msg .= Message:\t$_POST[message]\n\n;

$recipient = mailto:[EMAIL PROTECTED];
$subject = Web Site Feedback;

$mailheaders = From: My Web Site  \n;
$mailheaders .= Reply-To: $_POST[sender_email]\n\n;

mail($recipient, $subject, $msg, $mailheaders);

echo HTMLHEADTITLEForm Sent!/TITLE/HEADBODY;
echo H1 align=centerThank You, $_POST[$sender_name]/H1;
echo P align=centerYour feedback has been sent./P;
echo /BODY/HTML;




?


- Original Message -
From: John Wards [EMAIL PROTECTED]
To: Meltem Demirkus [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, September 17, 2002 4:40 PM
Subject: Re: [PHP] mail() question


 Meltem

 What is you system set up? OS etc?

 Cheers
 John Wards
 SportNetwork.net
 - Original Message -
 From: Meltem Demirkus [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, September 17, 2002 2:35 PM
 Subject: [PHP] mail() question


  Hi,
  I am trying to send an email by using the function mail().
  Although I use  in a form of mail($to, $subject, $message, $headers), it
 is
  giving this error:
  Failed to Connect
 
  So I think I am missing something ...
  Can anybody help me ?..
 
  thanks alot
 
  meltem demirkus
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php


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




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




Re: [PHP] mail() question

2002-09-17 Thread John Wards

Have you set up you php.ini file correctly?

You need to set up your SMTP settings and your sendmail_from settings

John
- Original Message -
From: Meltem Demirkus [EMAIL PROTECTED]
To: John Wards [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, September 17, 2002 2:43 PM
Subject: Re: [PHP] mail() question


 windows 2000
 by the way my whole code is this:

 ?

 $msg = Sender Name:\t$_POST[sender_name]\n;
 $msg .= Sender E-Mail:\t$_POST[sender_email]\n;
 $msg .= Message:\t$_POST[message]\n\n;

 $recipient = mailto:[EMAIL PROTECTED];
 $subject = Web Site Feedback;

 $mailheaders = From: My Web Site  \n;
 $mailheaders .= Reply-To: $_POST[sender_email]\n\n;

 mail($recipient, $subject, $msg, $mailheaders);

 echo HTMLHEADTITLEForm Sent!/TITLE/HEADBODY;
 echo H1 align=centerThank You, $_POST[$sender_name]/H1;
 echo P align=centerYour feedback has been sent./P;
 echo /BODY/HTML;




 ?


 - Original Message -
 From: John Wards [EMAIL PROTECTED]
 To: Meltem Demirkus [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, September 17, 2002 4:40 PM
 Subject: Re: [PHP] mail() question


  Meltem
 
  What is you system set up? OS etc?
 
  Cheers
  John Wards
  SportNetwork.net
  - Original Message -
  From: Meltem Demirkus [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, September 17, 2002 2:35 PM
  Subject: [PHP] mail() question
 
 
   Hi,
   I am trying to send an email by using the function mail().
   Although I use  in a form of mail($to, $subject, $message, $headers),
it
  is
   giving this error:
   Failed to Connect
  
   So I think I am missing something ...
   Can anybody help me ?..
  
   thanks alot
  
   meltem demirkus
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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


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




Re: [PHP] mail() question

2002-09-17 Thread John Wards

You need to edit you php.ini file

Depending on you instlation it should be fount in either c:\windows\php.ini
or c:\winnt\php.ini

If it is not search for php.ini

Then edit the values:

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

; For Win32 only.
sendmail_from = [EMAIL PROTECTED]

Your SMTP setting would be what ever you send your mail with currently.
Looking at you email address somthing like mail.momentum-dmt.com and your
sendmail_from setting would just be your email address

Cheers
John
- Original Message -
From: Meltem Demirkus [EMAIL PROTECTED]
To: John Wards [EMAIL PROTECTED]
Sent: Tuesday, September 17, 2002 2:55 PM
Subject: Re: [PHP] mail() question


 how can I do them?..I am sorry maybe I am asking silly questions .It is
 because I am new on php...
 thnaks ..
 meltem
 - Original Message -
 From: John Wards [EMAIL PROTECTED]
 To: Meltem Demirkus [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, September 17, 2002 4:50 PM
 Subject: Re: [PHP] mail() question


  Have you set up you php.ini file correctly?
 
  You need to set up your SMTP settings and your sendmail_from settings
 
  John
  - Original Message -
  From: Meltem Demirkus [EMAIL PROTECTED]
  To: John Wards [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Tuesday, September 17, 2002 2:43 PM
  Subject: Re: [PHP] mail() question
 
 
   windows 2000
   by the way my whole code is this:
  
   ?
  
   $msg = Sender Name:\t$_POST[sender_name]\n;
   $msg .= Sender E-Mail:\t$_POST[sender_email]\n;
   $msg .= Message:\t$_POST[message]\n\n;
  
   $recipient = mailto:[EMAIL PROTECTED];
   $subject = Web Site Feedback;
  
   $mailheaders = From: My Web Site  \n;
   $mailheaders .= Reply-To: $_POST[sender_email]\n\n;
  
   mail($recipient, $subject, $msg, $mailheaders);
  
   echo HTMLHEADTITLEForm Sent!/TITLE/HEADBODY;
   echo H1 align=centerThank You, $_POST[$sender_name]/H1;
   echo P align=centerYour feedback has been sent./P;
   echo /BODY/HTML;
  
  
  
  
   ?
  
  
   - Original Message -
   From: John Wards [EMAIL PROTECTED]
   To: Meltem Demirkus [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Sent: Tuesday, September 17, 2002 4:40 PM
   Subject: Re: [PHP] mail() question
  
  
Meltem
   
What is you system set up? OS etc?
   
Cheers
John Wards
SportNetwork.net
- Original Message -
From: Meltem Demirkus [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 17, 2002 2:35 PM
Subject: [PHP] mail() question
   
   
 Hi,
 I am trying to send an email by using the function mail().
 Although I use  in a form of mail($to, $subject, $message,
 $headers),
  it
is
 giving this error:
 Failed to Connect

 So I think I am missing something ...
 Can anybody help me ?..

 thanks alot

 meltem demirkus


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


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




Re: [PHP] mail() question

2002-09-17 Thread John Wards

is that definatly your SMTP mail connection?

I notice that you are using outlook. Do this to make sure:

Click tools(in outlook) then Accounts the click on your default acount the
click properties. CLick the server tab then note down the value in the Out
going mail server box and use this in your SMTP seting in php.ini.

Also have you restarted apache(or what ever server u are using) since you
changed the php.ini file
- Original Message -
From: Meltem Demirkus [EMAIL PROTECTED]
To: John Wards [EMAIL PROTECTED]
Sent: Tuesday, September 17, 2002 3:14 PM


 NCOMP
 Subject: Re: [PHP] mail() question
 Date: Tue, 17 Sep 2002 17:15:15 +0300
 MIME-Version: 1.0
 Content-Type: text/plain;
 charset=iso-8859-1
 Content-Transfer-Encoding: 7bit
 X-Priority: 3
 X-MSMail-Priority: Normal
 X-Mailer: Microsoft Outlook Express 5.50.4522.1200
 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

 I changed it like this...
 but still not conneting problem occurs .

 [mail function]
 ; For Win32 only.
 SMTP = mail.momentum-dmt.com

 ; For Win32 only.
 sendmail_from = [EMAIL PROTECTED]


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




[PHP] Re: PHP Mail() Question

2002-03-08 Thread LaserJetter

Its probably a problem with your mail server software not being able to send
email out. I think you need t tell it to connect to another email server
outside of your network


Mindless Bot [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,

 I hope maybe you can help me with this problem... I've been working with
 PHP/mySQL for about 6 months now, this is causing quite a headache!

 When I try to send confirmation email (from a form the user fills out) -
it
 works fine when sending within the company network but fails when sending
to
 other emails (like hotmail accounts).

 Any suggestions?

 I have full rights to the php.ini file on our server, I've tried editing
the
 send_mail path, nothing seems to work! The server is running on a Solaris
 5.8 machine - I'm assuming Apache server.

 $email, $first, $last are pulled from a submitted form (using POST).

 $welcome is a standard message used in several places - easier to change
one
 file when changes are required.

 $toaddressSent = $email;
 $subjectSent = $first $last, Your Request Has Been Received;
 $contentSent = $welcome;


 mail($toaddressSent, $subjectSent, $contentSent, $additionalSent);


 Thanks!
 Brian






 _
 Chat with friends online, try MSN Messenger: http://messenger.msn.com




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




[PHP] PHP Mail() Question

2002-03-05 Thread Mindless Bot

Hello,

I hope maybe you can help me with this problem I've been working with 
PHP/mySQL for about 6 months now, this is causing quite a headache!

When I try to send confirmation email (from a form the user fills out) - it 
works fine when sending within the company network but fails when sending to 
other emails (like hotmail accounts)

Any suggestions?

I have full rights to the phpini file on our server, I've tried editing the 
send_mail path, nothing seems to work! The server is running on a Solaris 
58 machine - I'm assuming Apache server

$email, $first, $last are pulled from a submitted form (using POST)

$welcome is a standard message used in several places - easier to change one 
file when changes are required

$toaddressSent = $email;
$subjectSent = $first $last, Your Request Has Been Received;
$contentSent = $welcome;


mail($toaddressSent, $subjectSent, $contentSent, $additionalSent);


Thanks!
Brian






_
Chat with friends online, try MSN Messenger: http://messengermsncom


-- 
PHP General Mailing List (http://wwwphpnet/)
To unsubscribe, visit: http://wwwphpnet/unsubphp




[PHP] mail() question

2002-01-23 Thread Matthew Walker

I’ve tried Reading The Fine Manual on this, and can’t find an easy
answer.
 
Here’s the headers for a message from the script, and the error I’m
getting on some mail it sends…
 
Return-Path: wwwrun
Received: (from wwwrun@localhost)
by arsenic.mth.com (8.11.6/8.11.3) id g0O4UCQ27546;
Wed, 23 Jan 2002 21:30:12 -0700
Date: Wed, 23 Jan 2002 21:30:12 -0700
Message-Id: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Order Receipt
From: [EMAIL PROTECTED]
Reply-To: HYPERLINK mailto:[EMAIL PROTECTED][EMAIL PROTECTED]
 
Some mail servers give this response:
The original message was received at Wed, 23 Jan 2002 21:30:12 -0700
from wwwrun@localhost
 
   - The following addresses had permanent fatal errors -
[EMAIL PROTECTED]
(reason: 550 REQUESTED ACTION NOT TAKEN: DNS FAILURE)
 
   - Transcript of session follows -
... while talking to mx.somewhere.com.:
 MAIL From:[EMAIL PROTECTED]
 550 REQUESTED ACTION NOT TAKEN: DNS FAILURE
554 5.0.0 Service unavailable
 
Here’s the line of PHP I’m using to send the mail:
mail($CustomerInfo[Email], Order Receipt, $text,From:
$SiteInfo[Email]\nReturn-Path: $SiteInfo[Email]\nReply-To:
$SiteInfo[Email]);
 
arsenic.mth.com is the LAN name of my box. How can I get PHP to send
mail as if it was from the DNS name for the box (mthmarketing.com)?
 
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.313 / Virus Database: 174 - Release Date: 1/2/2002
 

--
PHP General 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] mail() question

2001-10-23 Thread Jeff Kryvicky @ Collider

Hi all, I've got a question that I'm sure can be answered, but I'm a 
little stuck right now...

I've set up yelvington's excellent annotate script, and it works 
beautifully. My next step was to try to add an auto email function to 
notify me when someone has posted a comment, and send me the entire 
question list. (I'll be using this for client feedback)
Everything works extremely peachy, EXCEPT the mail gets posted on 
every page update, not just on the button press.

So the question is... is there a way to create this feature that only 
occurs when the submit button is pressed?

Below is the code in it's entirety, with this code:
?require($DOCUMENT_ROOT . /annotate.php3); ?
being placed in the html document.

Thanks a million in advance. (btw, if you do choose to answer this, 
cc me as well, as I'm on digest.)

Jeff

/***/
?PHP
if ($message)
{
$message = ereg_replace(\r\n\r\n, \nP, $message);
$date = date(l, F j Y, h:i a);
$message = B$name /B -- $dateP $message BRHR;
$fp = fopen (basename($PHP_SELF) . .comment, a);
fwrite ($fp, $message);
fclose ($fp);
}
@readfile(basename(($PHP_SELF . .comment)));

// function to open a file and place the file into
//a buffer for further processing
function open_template($template_file)
{
  $i;
  $output;

  $temp = file($template_file);

  for ($i=0; $icount($temp); $i++)
 {
   $output .= $temp[$i];
  }

  return $output;
}

//open the file
$buffer = open_template(basename($PHP_SELF) . .comment);

//do some text processing so the email gets plain text, rather
//than html formatted text

//replace html rules with returns
$buffer = str_replace(HR, chr(10), $buffer);
//replace html breaks with returns
$buffer = str_replace(BR, chr(10), $buffer);
//strip all other html tags
$buffer = strip_tags($buffer);

//email away...
mail([EMAIL PROTECTED], Auto Form Reply, $buffer);
?


FORM method=post
bYour name:/bBRINPUT name=name type=text size=55BR
bYour comment:/bBRTEXTAREA name=message rows=10 cols=55 wrap=virtual
/TEXTAREABR
INPUT name=submit type=submit value=Post your comments
/FORM
-- 
___

Jeff Kryvicky

Collider, Inc.
[motion graphics for the masses]

133 W 19th St  5th Floor  NYC 10011
Tel 646 336 9398   Fax 646 349 4159
Email  [EMAIL PROTECTED]
Site   http://www.collidernyc.com

___


Re: [PHP] mail() question

2001-10-23 Thread David Robley

On Wed, 24 Oct 2001 07:03, [EMAIL PROTECTED] wrote:
 Hi all, I've got a question that I'm sure can be answered, but I'm a
 little stuck right now...

 I've set up yelvington's excellent annotate script, and it works
 beautifully. My next step was to try to add an auto email function to
 notify me when someone has posted a comment, and send me the entire
 question list. (I'll be using this for client feedback)
 Everything works extremely peachy, EXCEPT the mail gets posted on
 every page update, not just on the button press.

 So the question is... is there a way to create this feature that only
 occurs when the submit button is pressed?

 Below is the code in it's entirety, with this code:
 ?require($DOCUMENT_ROOT . /annotate.php3); ?
 being placed in the html document.

 Thanks a million in advance. (btw, if you do choose to answer this,
 cc me as well, as I'm on digest.)

 Jeff

 /***/
 ?PHP
 if ($message)
   {
   $message = ereg_replace(\r\n\r\n, \nP, $message);
   $date = date(l, F j Y, h:i a);
   $message = B$name /B -- $dateP $message BRHR;
   $fp = fopen (basename($PHP_SELF) . .comment, a);
   fwrite ($fp, $message);
   fclose ($fp);
   }
 @readfile(basename(($PHP_SELF . .comment)));

 // function to open a file and place the file into
 //a buffer for further processing
 function open_template($template_file)
 {
   $i;
   $output;

   $temp = file($template_file);

   for ($i=0; $icount($temp); $i++)
  {
$output .= $temp[$i];
   }

   return $output;
 }

 //open the file
 $buffer = open_template(basename($PHP_SELF) . .comment);

 //do some text processing so the email gets plain text, rather
 //than html formatted text

 //replace html rules with returns
 $buffer = str_replace(HR, chr(10), $buffer);
 //replace html breaks with returns
 $buffer = str_replace(BR, chr(10), $buffer);
 //strip all other html tags
 $buffer = strip_tags($buffer);

 //email away...
 mail([EMAIL PROTECTED], Auto Form Reply, $buffer);
 ?


 FORM method=post
 bYour name:/bBRINPUT name=name type=text size=55BR
 bYour comment:/bBRTEXTAREA name=message rows=10 cols=55
 wrap=virtual /TEXTAREABR
 INPUT name=submit type=submit value=Post your comments
 /FORM

You might also do a check on whether $submit is empty; if so, don't do 
any processng that isn't relevant.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   I can't use Windows. The cat ate my mouse.

-- 
PHP General 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] mail() question

2001-10-23 Thread Niklas Lampén

Well, not sure if this is a solution for you but I've done it with
something like this:

If ($Page == Form) {
// Form itself with hidden field Page=Mailer
} else if($Page == Mailer) {
// Send the mail
header(Location: youraddress?Page=Form);
};


Hope this helps.


Niklas


-Original Message-
From: Jeff Kryvicky @ Collider [mailto:[EMAIL PROTECTED]] 
Sent: 24. lokakuuta 2001 0:33
To: [EMAIL PROTECTED]
Subject: [PHP] mail() question


Hi all, I've got a question that I'm sure can be answered, but I'm a 
little stuck right now...

I've set up yelvington's excellent annotate script, and it works 
beautifully. My next step was to try to add an auto email function to 
notify me when someone has posted a comment, and send me the entire 
question list. (I'll be using this for client feedback) Everything works
extremely peachy, EXCEPT the mail gets posted on 
every page update, not just on the button press.

So the question is... is there a way to create this feature that only 
occurs when the submit button is pressed?

Below is the code in it's entirety, with this code:
?require($DOCUMENT_ROOT . /annotate.php3); ? being placed in the
html document.

Thanks a million in advance. (btw, if you do choose to answer this, 
cc me as well, as I'm on digest.)

Jeff

/***/
?PHP
if ($message)
{
$message = ereg_replace(\r\n\r\n, \nP, $message);
$date = date(l, F j Y, h:i a);
$message = B$name /B -- $dateP $message BRHR;
$fp = fopen (basename($PHP_SELF) . .comment, a);
fwrite ($fp, $message);
fclose ($fp);
}
@readfile(basename(($PHP_SELF . .comment)));

// function to open a file and place the file into
//a buffer for further processing
function open_template($template_file)
{
  $i;
  $output;

  $temp = file($template_file);

  for ($i=0; $icount($temp); $i++)
 {
   $output .= $temp[$i];
  }

  return $output;
}

//open the file
$buffer = open_template(basename($PHP_SELF) . .comment);

//do some text processing so the email gets plain text, rather //than
html formatted text

//replace html rules with returns
$buffer = str_replace(HR, chr(10), $buffer);
//replace html breaks with returns
$buffer = str_replace(BR, chr(10), $buffer);
//strip all other html tags
$buffer = strip_tags($buffer);

//email away...
mail([EMAIL PROTECTED], Auto Form Reply, $buffer); ?


FORM method=post
bYour name:/bBRINPUT name=name type=text size=55BR
bYour comment:/bBRTEXTAREA name=message rows=10 cols=55
wrap=virtual /TEXTAREABR INPUT name=submit type=submit
value=Post your comments /FORM
-- 
___

Jeff Kryvicky

Collider, Inc.
[motion graphics for the masses]

133 W 19th St  5th Floor  NYC 10011
Tel 646 336 9398   Fax 646 349 4159
Email  [EMAIL PROTECTED]
Site   http://www.collidernyc.com

___


-- 
PHP General 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] mail() question

2001-03-20 Thread Altunergil, Oktay

it's not /n .. it's \n

-Original Message-
From: Wade DeWerff [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 2:37 PM
To: [EMAIL PROTECTED]
Subject: [PHP] mail() question


is there a way to do this in a mail() ? I need to add the $Phone and $Email
variables too the $message, but I need to format it so that it is on a new
line in the emailI tried using br and /n, but it formats as text not
code function. 


$message = $Info ."br". $Phone ."br". $Email;



-- 
PHP General 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] mail() question

2001-03-20 Thread Clayton Dukes

$message .= $Info;
$message .="br";
$message .=$Phone;
$message .="br";
$message .=$Email;


This should append everything, but I could be wrong, I'm no Guru :-)


Clayton Dukes
-
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


- Original Message -
From: "Wade DeWerff" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 2:36 PM
Subject: [PHP] mail() question


is there a way to do this in a mail() ? I need to add the $Phone and $Email
variables too the $message, but I need to format it so that it is on a new
line in the emailI tried using br and /n, but it formats as text not
code function.


$message = $Info ."br". $Phone ."br". $Email;





-- 
PHP General 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] mail() question

2001-03-20 Thread CC Zona

In article 00be01c0b175$1cee4080$[EMAIL PROTECTED],
 [EMAIL PROTECTED] ("Wade DeWerff") wrote:

 is there a way to do this in a mail() ? I need to add the $Phone and $Email 
 variables too the $message, but I need to format it so that it is on a new 
 line in the emailI tried using br and /n, but it formats as text not 
 code function. 
 
 
 $message = $Info ."br". $Phone ."br". $Email;


"br" is used in hypertext markup language (HTML). Email (unless specially 
encoded--MIME headers, ugh!) does not use HTML.

"/n" is a slash followed by the letter n.

"\n" is a newline on *nix system (Unix, Linux, etc.).

"\r\n" is a Wintel linebreak.  It's also the standard for linebreaks within 
emails.

-- 
CC

-- 
PHP General 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] mail() question

2001-03-20 Thread Altunergil, Oktay

I don't think email messages care about html breaks "BR"..(unless it's
HTML email or something)

This is what I always use..

$message = "$Info \n$Phone \n$Email";



You can use the '\n' to also make your HTML sources more readable.

-Original Message-
From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 2:37 PM
To: Wade DeWerff; [EMAIL PROTECTED]
Subject: Re: [PHP] mail() question


$message .= $Info;
$message .="br";
$message .=$Phone;
$message .="br";
$message .=$Email;


This should append everything, but I could be wrong, I'm no Guru :-)


Clayton Dukes
-
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


- Original Message -
From: "Wade DeWerff" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 2:36 PM
Subject: [PHP] mail() question


is there a way to do this in a mail() ? I need to add the $Phone and $Email
variables too the $message, but I need to format it so that it is on a new
line in the emailI tried using br and /n, but it formats as text not
code function.


$message = $Info ."br". $Phone ."br". $Email;





-- 
PHP General 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 General 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] mail() question

2001-02-27 Thread W.D.

just the info in the .txt file


 did you want to actually send the .txt file or just the info in the .txt
 file??

 -Original Message-
 From: W.D. [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 28, 2001 10:19 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] mail() question


 I want to send a .txt file back to the sender when a form is filled out,
 sort of like an autoresponder. I have one mail() to send info from form to
 me, is the only way to send out a file back to the sender by using a
second
 mail()?


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com


 --
 PHP General 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]



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General 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] mail() question

2001-02-27 Thread Peter Houchin


Set your mail script up something like

//open the file
$myfile= file("data.txt");

//put file contents into one string
$myfile = implode($myfile, "");

$mailTo = "[EMAIL PROTECTED]"; // if its going to more than one use a
comma after "
$mailSubject = "some subject"; // subject of email
$mailBody = $myfile // call in $myfile
$mailHeaders "From: [EMAIL PROTECTED]\n"; add mail headers here

mail($mailTo, $mailSubject, $mailBody, $mailHeaders);

 your done
I can't see why this wouldn't work for you

Peter

-Original Message-
From: W.D. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 10:34 AM
To: Peter Houchin; [EMAIL PROTECTED]
Subject: Re: [PHP] mail() question


just the info in the .txt file


 did you want to actually send the .txt file or just the info in the .txt
 file??

 -Original Message-
 From: W.D. [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 28, 2001 10:19 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] mail() question


 I want to send a .txt file back to the sender when a form is filled out,
 sort of like an autoresponder. I have one mail() to send info from form to
 me, is the only way to send out a file back to the sender by using a
second
 mail()?


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com


 --
 PHP General 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]



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



-- 
PHP General 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] mail( ) question

2001-01-30 Thread Jon Haworth

If you've copied-and-pasted that script, you might want to correct this
line:

scrip language="JavaScrip"

Both the words "script" and "Javascript" have a T on the end of them :-)

On the other hand, why don't you just use PHP for the whole thing? Get the
e-mail address from a form, make the action of this form $PHP_SELF, and have
a condition along the lines of

if ($submit) {
  ... send the mail
} else {
  ... display the form
}

Then you don't have to switch to and from client- and server-side scripts,
and you don't risk your system being fubar'd by people who browse with
Javascript turned off.

Just a thought.

Cheers
Jon


-Original Message-
From: Fang Li [mailto:[EMAIL PROTECTED]]
Sent: 29 January 2001 17:30
To: [EMAIL PROTECTED]
Subject: [PHP] mail( ) question


Hi All:

Would anyone tell me how to correct the code in mail( ) function? Thanks a
lot.

html
head
scrip language="JavaScrip"
function askEmailAddress( ){
   var inputedData = prompt("The email address you want send
to:"," ");
   if(confirm("The email address you want send to is" +
inputedData +
"?")){
   alert("OK, the article will send to " + inputedData +
"!");
   }
}
/script
/head

body
...

?php
mail(? script language="JavaScript" document.write(inputed_data)/script
?php , "My Subject", "Line 1\nLine 2\nLine 3"); ?

/body
/html

Fang Li


-- 
PHP General 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 General 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] mail( ) question

2001-01-29 Thread Toby Butzon

This isn't going to work the way it's set up now. Javascript is
processed by the visitor's browser, while PHP is processed by the server
before the page is ever sent.

So in essence, PHP doesn't care one bit what anything outside of the
?php ? tags does. Therefore, you're instructing PHP to do this:

mail(

That doesn't mean anymore to PHP than it does to me. It's definately not
a function without the arguments and closing paren.

If you're not following me, I suggest you go read up in the PHP manual
and any sites you can find on the links page; you might even check the
archives of this list, I know we've been over it several times. It's a
matter of client-side scripting vs. server-side scripting.

--toby

Fang Li wrote:
 
 Hi All:
 
 Would anyone tell me how to correct the code in mail( ) function? Thanks a
 lot.
 
 html
 head
 scrip language="JavaScrip"
 function askEmailAddress( ){
var inputedData = prompt("The email address you want send to:"," 
");
if(confirm("The email address you want send to is" + inputedData +
 "?")){
alert("OK, the article will send to " + inputedData + "!");
}
 }
 /script
 /head
 
 body
 ...
 
 ?php
 mail(? script language="JavaScript" document.write(inputed_data)/script
 ?php , "My Subject", "Line 1\nLine 2\nLine 3"); ?
 
 /body
 /html
 
 Fang Li
 
 --
 PHP General 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 General 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] mail() question

2001-01-15 Thread Robert Hough

Sorry in advance for being redundant. I was unable to find the answer I
needed, on the php.net site.

We have a mailto form, which uses the mail() funciton. For the most part,
it works as intended. All of my headers seem to be coming through intact
(To, From, Reply-To, Return-Path, Error-To, etc).

However, if the message should bounce, it always bounces back to nobody. 
When we want it to bounce back to say, rch instead. Can any offer a
possible solution here?

TIA

-- 
Robert Hough ([EMAIL PROTECTED])


-- 
PHP General 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] mail() question

2001-01-15 Thread jeremy brand

Your Return-Path: header should have that email address.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Mon, 15 Jan 2001, Robert Hough wrote:

 Date: Mon, 15 Jan 2001 15:13:42 -0500 (EST)
 From: Robert Hough [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] mail() question
 
 Sorry in advance for being redundant. I was unable to find the answer I
 needed, on the php.net site.
 
 We have a mailto form, which uses the mail() funciton. For the most part,
 it works as intended. All of my headers seem to be coming through intact
 (To, From, Reply-To, Return-Path, Error-To, etc).
 
 However, if the message should bounce, it always bounces back to nobody. 
 When we want it to bounce back to say, rch instead. Can any offer a
 possible solution here?
 
 TIA
 
 -- 
 Robert Hough ([EMAIL PROTECTED])
 
 
 -- 
 PHP General 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 General 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] mail() question

2001-01-15 Thread jeremy brand

I understand.  So, does $sender_address have the email address that
you want it returned to?  You didn't specifically say this, that is
why I asked.

If you actually get the mail sent on the internet, and the headers
contain explicit instructions, then the mail has no choice but to
return to who you specify in the Return-Path:.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Mon, 15 Jan 2001, Robert Hough wrote:

 Date: Mon, 15 Jan 2001 15:27:06 -0500 (EST)
 From: Robert Hough [EMAIL PROTECTED]
 To: jeremy brand [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] mail() question
 
 On Mon, 15 Jan 2001, jeremy brand wrote:
  Your Return-Path: header should have that email address.
 
 Thanks, but as stated in my post, all of my headers
 Return-Path included, are coming through correctly. Here is what I am
 using for my headers, is there something missing here?
 
   $headers .= "From: $sender_name $sender_address\n";
   $headers .= "X-Sender: $sender_address\n";
   $headers .= "X-Mailer: $version\n";
   $headers .= "Return-Path: $sender_address\n";
   $headers .= "Error-To: $sender_address\n";
 
 
 -- 
 Robert Hough ([EMAIL PROTECTED])
 
 
 -- 
 PHP General 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 General 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] mail() question

2001-01-15 Thread Robert Hough

On Mon, 15 Jan 2001, jeremy brand wrote:
 So, does $sender_address have the email address that you want it
 returned to?  You didn't specifically say this, that is why I asked.

Sorry, yes it does. The message, if delivered properly, is fine. The
receiver can hit "Reply" and that works as intended. The From field also
displays correctly.

The problem happens when the message bounces. For whatever reason, if the
message bounces, it returns to nobody. Which, of course is what the web
server is running as.

-- 
Robert Hough ([EMAIL PROTECTED])


-- 
PHP General 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] mail() question

2001-01-15 Thread jeremy brand

Well, I don't know exactly what you mean by a bounce.  But, an
undelivered email will return to the Return-Path address.  

Why don't you forward the actuall email headers to the list and I can
look at them.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Mon, 15 Jan 2001, Robert Hough wrote:

 Date: Mon, 15 Jan 2001 15:53:01 -0500 (EST)
 From: Robert Hough [EMAIL PROTECTED]
 To: jeremy brand [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] mail() question
 
 On Mon, 15 Jan 2001, jeremy brand wrote:
  So, does $sender_address have the email address that you want it
  returned to?  You didn't specifically say this, that is why I asked.
 
 Sorry, yes it does. The message, if delivered properly, is fine. The
 receiver can hit "Reply" and that works as intended. The From field also
 displays correctly.
 
 The problem happens when the message bounces. For whatever reason, if the
 message bounces, it returns to nobody. Which, of course is what the web
 server is running as.
 
 -- 
 Robert Hough ([EMAIL PROTECTED])
 
 
 -- 
 PHP General 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 General 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] mail() question

2001-01-15 Thread mailing_list

I asked the same question some weeks ago!

The problem is, my root installed the mail-function so that "nobody" is
the owner of the send-process!

I wanted the same thing as you want - At last I did a workaround (not bad
for sending that small amount of mails I do):

I configured .procmailrc, so the mails I want to send are sent to my local
account (specific subject), and then sendmail is called (the mail is sent
with MY USER)! If I use headers like Error-To:, they now work as expected!!

I hope you understand my filthy english!
witty

-- 
Sent through GMX FreeMail - http://www.gmx.net


-- 
PHP General 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] mail() question

2001-01-15 Thread Robert Hough

Quick update, for anyone interested...

I managed to answer my own question, but I'd still like to thank everyone
that replied, it did lead me to the right place. What I ended up doing was
using sendmail with the -f option. This did require me to add a new
trusted user to my sendmail.cf though.

Once that was done, I just used popen to dump the message to
sendmail. Here's the ugly/incomplete version of the code. If you can't
figure it out, or want to see the exacts let me know off list, and I'll
send it to ya in the morning (read, give me time to clean it up).

$mailer = "/usr/sbin/sendmail -t -i [EMAIL PROTECTED]";

$fd = popen($mailer, "w");
 fputs($fd, "$headers");
 fputs($fd, "$message");
pclose($fd);


-- 
Robert Hough ([EMAIL PROTECTED])



-- 
PHP General 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]