Jump to content

Warning: Failed to connect to mailserver, verify your "SMTP" setting in php.ini


Stephen 00

Recommended Posts

Hi,

 

I am very new to php so please go easy on me  ;D. I am working my way through a php book and am trying to send a conf email when a user registers but I am getting this error message when I submit the information Warning:

 

"Failed to connect to mailserver, verify your "SMTP" setting in php.ini in"

 

I have downloaded QK SMTP server and added Stephen 00 as a user.

I am using phpdev.

 

My code is

// Send email.

$body = "Thank you for registering with our site! \n Your User Name is '{$_POST['username']}' and your password is '{$_POST['password1']}'.\n\n Sincerely,\n Us";

mail ($_POST['email'], 'Thank you for registering!', $body, 'From: [email protected]');

echo '<p>You are now registered. An email has been sent to your email address confirming your information.</p>';

}

 

and my php.ini code is

[mail function]

; For Win32 only.

SMTP = localhost

smtp_port = 25

 

; For Win32 only.

sendmail_from = [email protected]

 

Can someone tell me what I am doing wrong or what I need to do to fix it.

 

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.