mail() function
Posted by: kamy (203.134.205.---)
Date: March 20, 2007 05:26PM

Hi,

I am using WAMP5 Server.

I'm trying to send an e-mail from a .php script and ie6 returns this
error:


Warning: mail() [function.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 C:\wamp\www\mailtest\sendmail.php
on line 12


I checked php.ini

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

; For Win32 only.
sendmail_from = me@anydomain.com



Web Programmer
Chandigarh, India

Options: ReplyQuote
Re: mail() function
Posted by: CyberSpatium (71.237.217.---)
Date: March 20, 2007 08:06PM

wamp does not come with an smtp server so you can not send email usign php's mail() function. I have found a way to send email using php without having to install a smtp server (which is a huge security risk). I found a php class called phpMailer. it is freeeware, so you use it on your site and dont have to pay any licensing fees. they also have tons of manuals and docs on how to use the class making it really easy to add to your scripts.

phpMailer:
http://phpmailer.sourceforge.net/


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!


Please visit my latest website Clarify Loans:
ClarifyLoans.com

Options: ReplyQuote


Sorry, only registered users may post in this forum.