Solved

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

Posted on 2004-10-16
7
189 Views
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.
0
Comment
Question by:nickstallman
[X]
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
7 Comments
 
LVL 2

Expert Comment

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

-Uday
0
 

Author Comment

by:nickstallman
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.
0
 
LVL 2

Expert Comment

by:udayms
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.
http://www.hotscripts.com/Detailed/35656.html

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.
0
Technology Partners: 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

by:nickstallman
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.
0
 

Author Comment

by:nickstallman
ID: 12331621
I have found my solution:
http://www.gentoo.org/doc/en/virt-mail-howto.xml

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

Accepted Solution

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

modulo
Community Support Moderator
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
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.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

738 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