icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » pipe email

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old September 10th, 2004, 4:09 PM   #1 (permalink)
Surpass Fan
On a golden path...
 
DiscJockey's Avatar
 
Joined in Jul 2004
Hosted on Pass20
422 posts
Gave thanks: 1
Thanked 1 Time in 1 Post
pipe email

how do i link user[at]mydomain.com to a php file and then the php file emails me...

???
__________________
:P
DiscJockey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 10th, 2004, 4:15 PM   #2 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
use PHP mail function

There is a thread on this...

FORMmail problem -- Recipient
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 10th, 2004, 4:20 PM   #3 (permalink)
Surpass Fan
On a golden path...
 
DiscJockey's Avatar
 
Joined in Jul 2004
Hosted on Pass20
422 posts
Gave thanks: 1
Thanked 1 Time in 1 Post
how do i link the email to the php file??
__________________
:P
DiscJockey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 10th, 2004, 4:25 PM   #4 (permalink)
Web Hosting Super Ninj4
Super #1
 
miakeru's Avatar
 
Joined in Sep 2003
Lives in Fullerton, CA
1,581 posts
Gave thanks: 0
Thanked 2 times
You could put this as the destination of an e-mail forward:

|/home/username/public_html/path/to/php/file

I believe that will work.
miakeru is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 10th, 2004, 4:27 PM   #5 (permalink)
Surpass Fan
On a golden path...
 
DiscJockey's Avatar
 
Joined in Jul 2004
Hosted on Pass20
422 posts
Gave thanks: 1
Thanked 1 Time in 1 Post
okay! done that! now, i put the following code and linked it with the forwarding

<?
mail("myname[at]hotmail.com","subject","ddd");
?>

nothing happens
__________________
:P
DiscJockey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 10th, 2004, 4:33 PM   #6 (permalink)
Web Hosting Super Ninj4
Super #1
 
miakeru's Avatar
 
Joined in Sep 2003
Lives in Fullerton, CA
1,581 posts
Gave thanks: 0
Thanked 2 times
Well, that's because you aren't really linking anything, and the e-mail itself will not execute that script. Piping e-mail merely passes the contents of an e-mail to a script which is then supposed to parse and respond.

With the code you pasted, a mail would only be sent if someone requested the php file in their browser.
miakeru is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 10th, 2004, 6:40 PM   #7 (permalink)
Surpass Fan
On a golden path...
 
DiscJockey's Avatar
 
Joined in Jul 2004
Hosted on Pass20
422 posts
Gave thanks: 1
Thanked 1 Time in 1 Post
ok, heres what i got


a php file named 'test.php' with the following code in it

PHP Code:
#!/usr/sbin/php -q

<?

mail
("myemail[at]hotmail.com","subject","{$email}$email");
exit(
0);

?>
and i linked tester[at]mydomain.com to that file.. when i send a email to it i get the following reply back


- Mail delivery failed: returning message to sender

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |/home/ebreaze/public_html/test.php
generated by tester[at]mydomain.com
local delivery failed

------ This is a copy of the message, including all the headers. ------
__________________
:P
DiscJockey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 10th, 2004, 6:41 PM   #8 (permalink)
Web Hosting Super Ninj4
Super #1
 
miakeru's Avatar
 
Joined in Sep 2003
Lives in Fullerton, CA
1,581 posts
Gave thanks: 0
Thanked 2 times
Did you actually put in 'pipe to' as part of the e-mail forward?
miakeru is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 10th, 2004, 6:47 PM   #9 (permalink)
Surpass Fan
On a golden path...
 
DiscJockey's Avatar
 
Joined in Jul 2004
Hosted on Pass20
422 posts
Gave thanks: 1
Thanked 1 Time in 1 Post
no, how do you mean? show me an example???
__________________
:P
DiscJockey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On