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 Like 30 Dislike
Previous forums Next forums
Other forums

Not Inserting into DB
I can't get my Add new Division form to submit to the database. Anyone see my issue?

Code: &a

empty() error
Why does

Code: empty($USER_ID = $_SESSION["USER_ID"])
create this error...

Sum of Values in an Array
This is probably really simple... but it's been years since I've written anything, so bare with me!<

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

How to sum these output values
Hi

I need sum the month totals
SELECT region_name, area_name ,SUM (CASE WHEN S

Slashes
Have a small problem and I'm not able to understand why I'm getting the results I'm getting... and i

values not being entered into table
hi. I;ve created a form, so that when a user enters data into it, it gets added to a table in a data

Recode Abap Dynpro into Web Dynpro
Hi All,
A client has asked us to look at rearchitecting a custom transaction that was developed

Casting Decimals in Oracle
This code worked as a query in DB2, but I am not sure what the syntax is for casting decimals in Ora

I got my hosting suspended XD
So I saw this challenge a day or so ago

http://www.programming-challenges.com/pg.php?page=dow

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash