Part of the EllisLab Network
   
 
email.php Config Bug?
Posted: 18 June 2008 12:39 PM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  149
Joined  11-10-2005

Hello,

I’m having trouble sending an email.

If I used the controller-based setup, like this…

$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;

$this->email->initialize($config);
... my email is sent fine.  If I, however, attempt to create an email.php file and place it in my system/application/config directory and paste that exact same $cofig array into it, I get the following error…
You did not specify a SMTP hostname.
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

Oddly enough, if I change the email.php file to use “mail” instead of “smtp”, I get the SAME error which leads me to think that the email.php isn’t being used when the controller attempts to send the email.

Has anyone else noticed this?

Profile
 
 
Posted: 16 July 2008 08:03 AM   [ Ignore ]   [ # 1 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  183
Joined  04-11-2008

I’m having this error too, today
I’ve created an email.php inside config folder, and made the email library to autoload, but seems isn’t taking in consideration the config/email.php file

 Signature 

Itexa

Profile
 
 
Posted: 26 December 2008 05:47 PM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  63
Joined  04-21-2007

I want to send mail through a commercial smtp service. I created an email.php file, placed my configuration information in there, and located it in /system/application/config without any luck. It still uses the ‘mail’ protocol. The manual did not say to create an entry in autoload, should I do that?

I am using this along with FAL authentication library, which may be interfering with the configuration being pulled from the config. When I place an email debug call in the FAL email code, I can see it still maintains the default email settings from the Email class, so the config is not being loaded.

I can send mail fine from my own independent controller.

Profile
 
 
Posted: 01 January 2009 05:42 PM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  6
Joined  11-25-2008

I just experienced this today for the first time.  It happened as I am trying to migrate my code from running on a linux to a windows server.  Could that have anything to do with it?

Profile
 
 
Posted: 02 January 2009 07:48 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
RankRank
Total Posts:  247
Joined  11-08-2007

The manual did not say to create an entry in autoload, should I do that?

Yes, otherwise CodeIgniter doesn’t know the config file exists.

 Signature 

Redux Auth is no longer maintained.

Profile
 
 
Posted: 02 January 2009 07:56 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  6
Joined  11-25-2008
Popcorn - 02 January 2009 07:48 PM

The manual did not say to create an entry in autoload, should I do that?

Yes, otherwise CodeIgniter doesn’t know the config file exists.

What do you mean create an entry in autoload?  What do I put into the autoload.php file?  Is there any way to debug the email class properties after it is loaded?  Is there a $this->email->protocol?

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120041 Total Logged-in Users: 26
Total Topics: 126167 Total Anonymous Users: 1
Total Replies: 663624 Total Guests: 370
Total Posts: 789791    
Members ( View Memberlist )