0

I managed to find a PHP code to create a PHP forwarder in collaboration with cPanel via this link.

Using that code... How can I delay the forwarding of such email say by 10 minutes?

Thanks.

1 Answers1

3

You need to set up a cron , so that you could send mail on particular day/time.

Also see sample here

EDIT: You need to open your linux( I assume) machine and set up a cron. Open the linux command terminal and type: crontab -e to open cron jobs and put across your php file.How to call a php file from cron?

php /home/USER/public_html/cron.php

Community
  • 1
  • 1
Vimalnath
  • 6,202
  • 2
  • 24
  • 45
  • The code that I found is to create the fowarder on cPanel. Can you provide me with literature to create a php code that checks a particular email and forward it as per you suggestion please? Thanks. – user1974470 Jan 25 '13 at 12:01
  • I checked it. Can you please provide me with the PHP code? I know how to do the cron job. – user1974470 Jan 25 '13 at 12:44
  • There is no code involved in that. once the cron is setup, thats it. It(the phpfile) would be called automatically on the day/time you had set it up. – Vimalnath Jan 25 '13 at 12:45
  • I know that. what is the code to insert in the phpfile to do that? Thanks – user1974470 Jan 25 '13 at 12:50
  • phpfile should contain code responsible to send emails. which you have from this link:http://forums.glowhost.com/programming-talk/using-cpanel-api-creating-email-account-forwarders-your-own-php-scripts-2798.html – Vimalnath Jan 25 '13 at 12:52
  • Yes but that code is to create email forwarders using cPanel, which I don't want to do. I want PHP code to check my gmail and forward it to a list of recipents. – user1974470 Jan 25 '13 at 12:55
  • 1
    Guess that's a different question then! – Vimalnath Jan 25 '13 at 12:56