Page 1 of 1

Send Mail from

PostPosted: 08. July 2010 05:43
by justin105
Hello,

I am trying to request an email recovery from a wordpress site i have locally, when it tries to send me the password it says the following

The e-mail could not be sent.
Possible reason: your host may have disabled the mail() function...

How do I enable the mail() function in XAMPP for windows

Thanks

Justin

Re: Send Mail from

PostPosted: 08. July 2010 16:18
by webuser
Mercury I think. Its comes with it and its for the mail client/server.

Re: Send Mail from

PostPosted: 08. July 2010 21:22
by JonB
Ummm - first - I think you need to fix your php.ini file. (hopefully you only have one and its in XAMPP/php) ON a webhost this is already done for you, not so with XAMMP, as it is a test environment - aha!

Search for mail_function

DO NOT USE/UNCOMMENT THE LINE IN THE DEFAULT FILE THE SYNTAX IS WRONG!

here is the exact entry I used (my Wordpress installs send passowrd reteivals successfully). I'm pretty also sure you need an ISP SMTP connect that works on port 25. (or you will have to twiddle things)

sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"

and then Fix the sendmail.ini

First - add an account for your ISP's SMTP server (you can use other ones if you want read the stuff in sendmail,ini)

#XXX
account xxx
host smtp.xxx.net
from your_email_addy@xxx.net
auth off

then make that account the default

# Set a default account
account default : xxx

Save it all, restart Apache and give it a whirl.
8)
My thanks to Nobbie, who explained this to me...

This assumes (my bad) you do NOT want to actually run your own mailserver (which is what Mercury is) - but merely send mail from your applications (like, gee, sendmail on the *nix world) :mrgreen: