Pipe email to PHP - get mail adress from MySQL - send?
Posted on
16th Feb 2014 07:03 pm by
admin
Hi all,
this is the challenge:
1) Our faculty at the college where I'm employed includes quite a bit of freelancers that don't check the college mailbox quite as often as the administration would like.
2) I have created forwarders in the form firstname.lastname@ourcollege.com, forwarded to their private mailboxes. That has worked fine up until now.
3) Lately we implemented Moodle as a course platform. As Moodle relies on a MySQL backend, this gave me the idea that something much more flexible would be possible.
I would need a php script that
1) grabs the email piped from cPanel,
2) extracts the email address 'just before', that is, the part in the header that indicates where it were piped from (is that possible? - I'm talking about the last part in a rather complex group mail forwarding sceme, just before the pipe = (ie staff@ourcollege.com->teachers@ourcollege.com->firstname.lastname@ourcollege.com),
3) queries the MySQL database by this field (official_email) and brings back another related field (private_email),
4) forwards the original email to that private e-mail address.
This would give us the opportunity to have our "forwarders -> real mail adresses' list constantly up-to-date, as all the freelancers could keep their records up to date all by themselves through the moodle user front-end interface.
This is, however, beyond me. I know the basics of piping from cPanel, and some rudimental PHP and MySQL, but that's it. Any help would be most appreciated.
No comments posted yet
Your Answer:
Login to answer
103
30
Other forums
login form can you find my error?
registrationform.php seems fine send data to registration.php
registration.php seems fine checks
INSERT for date range
Hi all
I have the following table
Code: [Select] `date` date
`day` int(2)
`
Undefined index on my form
ok im getting Undefined index on this line.. print_r($_REQUEST['form']);
below is the full sc
SQL query not working well
Hi,
I made a small table with 5 rows and want to make them an sql consult using rownum
Comparing Values
Hi
I'm reading data from a database and this seems to work OK.
Each system has an associat
How to search for several parameters from objects in a database?
I have a database with lots of information about objects.
Now I would like to search for 4 or 5 p
Operator precedence assistance.
I did a quick Google search and couldn't quite find the answer I wanted in terms I could understand,
Binding 2 UDP sockets on same port, connected to different destinations, 1 receives
Hello,
My application wants to send/recv data to 2 different UDP ports on a remote computer, us
Help with forum quoting?
Hi im working on a forum and I have alomost finished it but i want a user quote system like twitter
Posting Serialized Data Not Working
I am trying to send an object from one PHP file to another using POST. I serialize the object and th