I supposed that I will ask on this forum again but I didn't know it will be so soon..
So, when I register on my site as a new user this error is occuring:
Fatal error: Call to undefined method EmailComponent::__() in C:\wamp2\www\app\controllers\components\email.php on line 329
I checked that file but with my knowledge I can't fix it. I'm adding attachment cause this code is longer than 10000 signs. Thanks for helping me out.
Why are you moving EmailComponent to your app directory? It's a core cake library and should stay where it is unless you are intending to override it. To use it you just need to add:
PHP Code:
public $components = array('Email');
to your controller.
EDIT: realised I didn't answer your question, it seems you are setting $this->EmailComponent->delivery to an empty string in your controller somewhere, but if you need help you really need to post all the involved code otherwise all we can do is guess. Make sure EmailComponent::delivery is either set to mail, smtp or debug and you should be good though.
I'm not really sure what should be in 'host' section though.. I assume that somewhere I need to put my email's provider address but I don't know if "host" is really the place for it.
I'm not sure you're working with cake in the right way. config.php is a core file and should not be changed. To configure the email component you need to execute the following in a controller:
/* Set delivery method */ $this->Email->delivery = 'smtp';
/* Do not pass any args to send() */ $this->Email->send();
/* Check for SMTP errors. */ $this->set('smtp-errors', $this->Email->smtpError);
Note that host is your smtp server, which will probably at a smtp rather than www subdomain (ie smtp.o2.pl), but you'll need to check that with your provider.
Bookmarks