How Can I Run PHP file in SMTP Server

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
KKLR
Forum Newbie
Posts: 1
Joined: Fri Jun 01, 2007 1:48 am

How Can I Run PHP file in SMTP Server

Post by KKLR »

Hi..All

I have one task to solve.

Task is :

When I'm sending the mail from OUTLook Express... I should be able to run the php file to save the those data ( Subject,body content) into database.

Is it possible..?

If possible how can I do that...

Please give the valueble solutions.

Thank you
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Unless you add hooks to your server, I would say not even remotely possible.
Arawn
Forum Commoner
Posts: 42
Joined: Sat May 05, 2007 6:03 am

Post by Arawn »

On cPanel servers, you can add an email alias which allow you to use a pipe "|" to kick off a PHP script. Usually looks something like:

Code: Select all

|/usr/local/bin/php /home/username/public_html/script.php
Check out: http://www.evolt.org/article/Incoming_M ... index.html
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Last I checked, that would be for incoming mail Arawn. KKLR wants it for outgoing mail, I believe.
Arawn
Forum Commoner
Posts: 42
Joined: Sat May 05, 2007 6:03 am

Post by Arawn »

feyd wrote:Last I checked, that would be for incoming mail Arawn. KKLR wants it for outgoing mail, I believe.
I just throw it out there but how about blind copy? Not exactly elegant ... eh? :oops:

Somewhere I bet there's a better solution at the root level. Doesn't Exim have filter files?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

A 'trick' would be to run an immediary smtp server (does outlook use smtp? or a propriatary version?) that dispatches the e-mail to a php script...
Post Reply