Hi,
The SMTP default settings are in the php.ini file which is in c:\wamp\Apache2\bin for Wamp 5. Look for the line:
[mail function]
; For Win32 only.
SMTP = localhost
; For Win32 only.
sendmail_from =
myemail@example.comChange 'localhost' to the IP address of the SMTP server you want to send the messages to. The 'sendmail_from' mailbox is the default mailbox for 'Reply-To' in the emails.
Please note that these defaults are only used if the script sending the messages does not override them.
If your script runs in the Command Line Interpreter (CLI) mode, a different php.ini file is being used, usually from the php folder.
If you are planning to use the mail() function in PHP, you have to be pretty sure what you are doing. In other words, if the email addresses are coming from web forms that anyone can enter their details into, you need to scrub the data carefully to make sure the information contains only valid characters and that the email address is in the right format (unfortunately we cannot run under Windows the PHP functions that validate the email domain), and not for example an SQL injection attempt. Do a bit of research into data security in relation to forms and PHP scripts, the time spent will not go wasted.
phpmailer is a mail class which support the MIME formats, HTML messages and file attachments. You can get it from [
sourceforge.net].
Regards,
toivo
Sydney, Australia
Edited 1 time(s). Last edit at 01/06/2008 11:25PM by toivo.