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.
103
30
Other php-forum
GET * FROM _____ Except?
I have a site that is for stock photography.
This section of the code calls images to display
type check while uploading
Hi Everyone,
How can I check the exact type of a file while uploading on my site?
Here
PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi
Calender Not Opening
The following code is not loading the javascript calender in another window. It's not doing anything
Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data
Will an XHTML DOCTYPE interfere with my PHP if I'm not experienced enough?
I've read this article here: http://friendlybit.com/html/why-xhtml-is-a-bad-idea/
In a nutshe
How to update this array?
I am saving a string that looks this: username1, username2, username3...
into a single cell in a
Login Issue's
Code: <?php
$file = fopen('user.txt', 'r');
/* Set login to false initially */
If a form submits back to same page do you need to use $get
IM trying to pass page number and year that was selected back to the same page.
i have this c
why preg_match_all does not return the number of matches
My regex looks like
X[^x{4e00}-x{9fa5}]*Y
(where X and Y are two Chinese characters)