Hi,

I just wanted to share this information with you to be able to send email via php. It works fine to me.

Go to php.ini file and find the line below; (Do changes according to your settings.)

php.ini

[mail function] 
; Setup for Windows systems 
SMTP = your smtp server
sendmail_from = your email

send.php

<?php
$to = "myuncle@uncle.com";
$subject = "Test mail";

$message = <<< emailbody
Dear uncle,

Where have you been.

Bye

emailbody;

mail($to,$subject,$message );
?>

you can post it at code snippets section so it can be used for later use.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.