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
Database connection failure
Hello All,
I am trying to create new connection to Oracle DB 10.1,
I could not see a
NOOB needs help with upload file
The intent of this form is to create a folder for a client and upload an image into another folder '
problem with array - multilingual page
this is my test page :
Code: <?php
if(isset($_GET['lang'])) {
if($_GET['la
Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi
A problem with my GD class
Hello,
I created a nice (and simple for now) GD class.
The problem is , it works great on
PHP & Images [Resize, Crop, Save]
Hey! Well I have a little dilema, hoping I could find some guidance.
I have a CMS and on the
Convert .fdf to .pdf
I currently have a web form that uploads the form data to an .fdf file and emails it.
However
Taxonomy? Classification? Categorisation?
Not sure if there is a way around this classification problem
I have a supplier who produces
Image DPI
Hi.
I allow users to upload images, the user then is able to adjust several settings for the
PHP code needed to get/post form fields and request mysql query results.
I'm new to PHP
I've created an html form to allow the user to request a basic telephone dire