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
Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba
blank page.... nothing is happening.
I'm new to a lot of this but in the last 24hrs have learned a lot.
Installed latest version of my
Coefficient of a Restitution Hints
Hello. I was wondering if anyone can give me hints on how to write this program...
The coeffi
serializing objects - loses methods - the point being?
Hi
I know that serializing an object will lose the methods. But whats the point in that? What
values in array being escaped
I would like to submit some values - back to the same form for checking before processing...
To add a field on the screen XK02.
Hi All,
How to add an additional field in the vendor change control screen XK02.
The
phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:
Code: [Select]$mailer = new PHPMailer();
$mailer-&
Revoking alter any table from a schema
Hi All,
i am working in Oracle 10g.
my requirement is to revoke all kind of DDL oper
Email Form Syantax Issue 2
How to make this look FROM:"OUR TEAM" instead of FROM:abc@mail.com
$headers = "
Retrieving innerHTML with cURL?
Hey all (sorry I know I'm a leecher, but I soon won't be. This is my first PHP project, but not my l