0

Hey everyone, I have been trying to send a test email before I do any further development and can't see to figure out why I am getting this error
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()

This is the code I I decided to use to test

$to = "wlopez@corp.ptd.net";
    $subject = "Hello!";
    $txt = "Hello world";
    $headers = "From: webmaster@example.com" . "\r\n" .
    "CC: somebodyelse@example.com";

    mail($to, $subject, $txt, $headers);

I changed the php.ini file to the actual SMTP server of the company but still can't seem to figure out what is going wrong on my part. Any help would be great!

2
Contributors
1
Reply
11
Views
1 Year
Discussion Span
Last Post by rproffitt
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.