Hi,
I’m using “yii-user” extension to manage the users of my web-application. (this)
When I try to register a new user, it should send an email to the email address specified, but it doesn’t work.
When I try to contact the administrator (in the “Contact” page) it doesn’t send the email.
The application works in localhost. Is this the problem?
In the main.php file, under testdrive/protected/config/ I’ve already changed the ‘adminEmail’. Is there any SMTP configuration?
Anyone can help me?
(I don’t want to use other extensions, I want to work with yii-user)
Thanks…
Benn
(B Destrube)
2
I know this is an old post, but who knows, maybe you haven’t found the solution yet…
you need to configure your php server’s smtp: in your php.ini file, look for something like
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
and replace
SMTP = localhost
by
SMTP = <yourSMTPserver>
for example :
SMTP = smtp.gmail.com
You will need to restart your web server for this to be taken into account.
Cheers
It seems “yii-user” uses php mail() function to send email. However, it doesn’t work well with Windows.
I have done the following and made it work:
-
Download sendmail.zip from glob.com.au/sendmail/
-
Unzip this in c:\wamp\sendmail
-
Modify PHP.INI file
[mail function]
SMTP = smtp.gmail.com
smtp_port = 465
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = "C:\wamp\sendmail\sendmail.exe -t"