Welcome Guest, Not a member yet? Register   Sign In
Automatic mail sending
#10

[eluser]Atharva[/eluser]
I usually store my cron files in cron folders. You can also user the db config from system/application/database.php and config values from system/application/config.php in that file. Here is how I do it. Suppose there is a file email_cron.php
Code:
define( 'BASEPATH', dirname(__FILE__) );

include( BASEPATH  .'/../system/application/config/database.php' );
include( BASEPATH  .'/../system/application/config/config.php' );

This will include mentioned files, so you can access database settings, base_url etc. Below goes the email code you want to run
Code:
//select email query, mail code , etc....


You can set through cpanel when this cron will run, and the command will be path to this cron file. For sending mail, you can also use phpmailer.


Messages In This Thread
Automatic mail sending - by El Forum - 01-12-2011, 02:45 AM
Automatic mail sending - by El Forum - 01-12-2011, 04:06 AM
Automatic mail sending - by El Forum - 01-12-2011, 04:27 AM
Automatic mail sending - by El Forum - 01-14-2011, 03:27 AM
Automatic mail sending - by El Forum - 01-14-2011, 03:32 AM
Automatic mail sending - by El Forum - 01-14-2011, 03:34 AM
Automatic mail sending - by El Forum - 01-14-2011, 03:37 AM
Automatic mail sending - by El Forum - 01-14-2011, 04:04 AM
Automatic mail sending - by El Forum - 01-14-2011, 04:10 AM
Automatic mail sending - by El Forum - 01-14-2011, 04:18 AM
Automatic mail sending - by El Forum - 01-14-2011, 04:20 AM
Automatic mail sending - by El Forum - 01-14-2011, 04:20 AM
Automatic mail sending - by El Forum - 01-14-2011, 04:25 AM
Automatic mail sending - by El Forum - 01-14-2011, 04:39 AM
Automatic mail sending - by El Forum - 01-14-2011, 04:43 AM
Automatic mail sending - by El Forum - 01-14-2011, 04:45 AM
Automatic mail sending - by El Forum - 01-14-2011, 04:48 AM
Automatic mail sending - by El Forum - 01-14-2011, 04:48 AM
Automatic mail sending - by El Forum - 01-14-2011, 04:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB