After registration, an email with password is suppose to send to the user, but it fails. The following error occured:

Message mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\domains\askforpeace.com.my\wwwroot\modules\user.module on line 430.
Severity error

Would appreciate if someone could help me with this.......a thousand thanks~~~~!!

How to modify the user.module on line 430?

Comments

phuc77’s picture

It's not really a problem with the user.module.
More of a server settings.
Find the php.ini file that is in use for your apache installation and give it a working smtp server since you don't have a smtp server running on your local server.

Few examples:
Debian: /etc/php4/apache/php.ini
xampp for windows: C:\Program Files\xampp\apache\bin\php.ini

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

Replace localhost with your isp's smtp server like this

[mail function]
; For Win32 only.
SMTP = smtp.example.com
smtp_port = 25

Restart apache.

naja-1’s picture

how can i get the ISP's SMTP server?

willow315’s picture

And how does this apply for IIS?

I've tried your example. Using an Exchange Server mail address. And a "from' email address from an account created on that server. Doesn't work.

I've tried writing it with and without the smtp.example.com (without the smtp. and with.)

I've also created an SMTP server on the server running Drupal. And I've used that IP address as in SMTP = IP of Web server where SMTP is set up.

What do you use as a "from" address in that case?

I appreciate whatever assistance you can give. WCW wwright@wusf.org