Automatic mail sending - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Automatic mail sending (/showthread.php?tid=37507) Pages:
1
2
|
Automatic mail sending - El Forum - 01-14-2011 [eluser]defectivereject[/eluser] If you're on a Mac, i found this link the much easier of any to follow. Fairly straight forward infact. http://drupal.org/node/434416 Automatic mail sending - El Forum - 01-14-2011 [eluser]Atharva[/eluser] Forgot to mention, you can connect to db in cron file using settings from system/application/database.php as follows Code: mysql_connect($db[$active_group]['hostname'],$db[$active_group]['username'],$db[$active_group]['password']) or die("Error in correction"); Automatic mail sending - El Forum - 01-14-2011 [eluser]Roy MJ[/eluser] Thankyou.. I think it'l work.. Ive been thinking i cant use pure php inside codeigniter. Now its making sense. Thankyou.. Automatic mail sending - El Forum - 01-14-2011 [eluser]Roy MJ[/eluser] Ok here is what i am getting from mailer demon /bin/sh: php/home/aromaren/public_html/cron.php: No such file or directory My cron.php looks looks like this: Code: <?php The command i gave in the cpanel is : php/home/aromaren/public_html/cron.php The error says there is no file or directory ..Can you see what i am doing wrong? Automatic mail sending - El Forum - 01-14-2011 [eluser]Atharva[/eluser] Can you execute this file through browser ans see what happens? Automatic mail sending - El Forum - 01-14-2011 [eluser]Roy MJ[/eluser] When i access it through browser i am getting this : Warning: require(../system/application/config/database.php) [function.require]: failed to open stream: No such file or directory in /home/aromaren/public_html/cron.php on line 3 Warning: require(../system/application/config/database.php) [function.require]: failed to open stream: No such file or directory in /home/aromaren/public_html/cron.php on line 3 Fatal error: require() [function.require]: Failed opening required '../system/application/config/database.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/aromaren/public_html/cron.php on line 3 Automatic mail sending - El Forum - 01-14-2011 [eluser]Atharva[/eluser] If cron.php is on root folder, then remove '..' Code: require('system/application/config/database.php'); Automatic mail sending - El Forum - 01-14-2011 [eluser]Roy MJ[/eluser] Heyy.. Solved..!!!!!.. Actually i was using require function ... When i changed to include as u had told earlier it worked well.. Thanks a lot.. Automatic mail sending - El Forum - 01-14-2011 [eluser]Roy MJ[/eluser] Yes i have changed that too.. Thanks a lot.. |