I need a script which will forward e-mails using a mysql database

Posted on 2004-10-16
Last Modified: 2011-09-20
I need a script (preferably PHP or Perl) which can check a POP3 box, get the e-mails and forward them depending on the TO to a address stored in a MySQL database which matches the TO.

If that doesnt exist then a way to do it using a mail server (dont care which one) will do.
Question by:nickstallman
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Expert Comment

ID: 12331453
Can you explain the purpose of the whole excersise. Maybe there are easier ways to achieve your end result than all these.


Author Comment

ID: 12331468
Ok. Basically I have a list of usernames and e-mail addresses in a MySQL database and I have a wildcard forward to a pop3 address.

I need a script which can forward username@mydomain the e-mail address associated with the username.

Expert Comment

ID: 12331497
Ok.. Nick... I am assuming that you are using a thirdparty webspace provider's service. In that case you wouldnt be able to install any Mail management software on the server. The other option is to have a program that does this task. Try out this link... You might find some useful info there in.

Or you can take 2 php scripts - 1 that picks  out email ids and contents from the inbox and another that sends  mails from MYSQL DB and then combine them. This miight be a bit time consuming. Besides, in these choices the biggest problem we will have is that someone will have to manually trigger the page/program for it to work. So basically somebody will have to run the process at the end of the day so that all the mails are routed to their respective mail boxes.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 12331555
Thanks for that one. It'll be useful if I need to make the script myself.

I have a Windows dedi in my house so I can have a mail server running.

Running the program every few miniutes isnt a problem. A Cron job or a scheduled task will do it easily.

Author Comment

ID: 12331621
I have found my solution:

Its not a script like I wanted but it'll do the job.

Accepted Solution

modulo earned 0 total points
ID: 12577703
PAQed with points refunded (500)

Community Support Moderator

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
XSL Grouping 7 42
CSS display:none AND display:block on same element 3 110
Re-position the objects 7 125
Create animated movies for web page 18 120
Preface In the first article: A Better Website Login System ( I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question