Welcome Guest, Not a member yet? Register   Sign In
How to configure email
#1

[eluser]Unknown[/eluser]
hi this is hemanth,

i want information like how to configure email in config file,how to activate automatically without initiallization.
#2

[eluser]Pascal Kriete[/eluser]
Which part are you having trouble with?

Quote:If you prefer not to set preferences using the above method, you can instead put them into a config file. Simply create a new file called the email.php, add the $config array in that file. Then save the file at config/email.php and it will be used automatically. You will NOT need to use the $this->email->initialize() function if you save your preferences in a config file.

Source
#3

[eluser]BD-CI-Programmer[/eluser]
Please see the Code

Code:
$this->load->library('email');

$this->email->from('[email protected]', 'Your Name');
$this->email->to('[email protected]');
$this->email->cc('[email protected]');
$this->email->bcc('[email protected]');

$this->email->subject('Email Test');
$this->email->message('Testing the email class.');

$this->email->send();

echo $this->email->print_debugger();
#4

[eluser]Pascal Kriete[/eluser]
Looks perfectly fine. Did you create the config file?
#5

[eluser]taewoo[/eluser]
inparo.. actually... i have this quarky issue.

so i created the application/config/email.php file with all the SMTP parameters... then blanked out all the corresponding parameters in application/library/Email.php... This works on my local dev environment (i.e. my laptop with WAMP on it).

If I copy the setup to my DreamHost LAMP production (i.e. exact same files), it keeps telling me I didn't specify the SMTP host thus no go. I have to physically copy + paste the parameters from config/email to library/email for it to work.

Any thoughts about this?




Theme © iAndrew 2016 - Forum software by © MyBB