Hi
I am trying to create a simple login script, a bit like that used on this site, which will email someone who is creating a New Account. I have used the three variables for MAIL() such as [font=Courier New][color=#0000cc]mail[/color][color=#006600]([/color][color=#0000cc]$fromEmail[/color][color=#006600], [/color][color=#0000cc]$Subject[/color][color=#006600], [/color][color=#0000cc]$nMessage),[/color][color=black] [font=Verdana]but not as shown in the [size=4][color=#003366]PHP[font=Verdana] Mail Form[/font][/color][/size] tutorial elsewhere on this site, which goes like this: [/font][font=Courier New][color=#0000cc]mail[/color][color=#006600]([/color][color=#0000cc]$fromEmail[/color][color=#006600], [/color][color=#0000cc]$Subject[/color][color=#006600], [/color][color=#0000cc]$nMessage[/color][color=#006600].[/color][color=#cc0000]"
From: “[/color][color=#006600].[/color][color=#0000cc]$fromName[/color][color=#006600].[/color][color=#cc0000]”<"[/color][color=#006600].[/color][color=#0000cc]$fromEmail[/color][color=#006600].[/color][color=#cc0000]">"[/color][color=#006600]);[/color][/font][/color][/font]
[color=black]Whenever I test the script using the first example above, I get this error message: [/color]
Warning: 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:\inetpub\wwwroot ullah\users\register.php on line 120
My php.ini contains the following:
[mail function]
; For Win32 only.
SMTP =localhost
smtp_port = 25
; For Win32 only.
;sendmail_from = me@example.com
sendmail_from = terence.mold@ntlworld.com
[color=black]Does anyone know what I am doing wrong here?[/color]
Thanks