nel file php.ini dovresti trovare le seguenti righe

codice:
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
eventualmente puoi impostare la porta via codice prima di inviare la posta

codice:
ini_set("smtp_port", 465);