I have been working through an "Introduction to PHP" book that has been very useful but i'm stuck on the mail() function. The syntax looks pretty simple but when i actually try and run the code on my pc and try to send an email to my hotmail account i get the following error message:
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 D:\Web\WebServer\Apache2\htdocs\WROX\chapter11\firstmail.php on line 2
The settings in php.ini are
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
; For Win32 only.
sendmail_from = me@example.com
which was defaulted in.
My specific questions are:
* What should these settings be to allow me to send outgoing emails? (I don't need to to receive anything, just make sure i'm happy with the basic functions).
* Is the sendmail_from field open to abuse as it could be set to anything? - i.e i could pose as someone else.
* Do i need to install any extra software (a mailserver) or can i configure Apache for this?
In short, what steps do i need to take to send emails from my PC to hotmail?
Any advice/help would be greatly appreciated.
btw,
OS is XP and i'm running Apache 2.0
Thanks,
Peter