Sample script in sending email via PHP

Mail function allows your website to automatically send emails like an auto response to customers or website viewers. This is done through sending email via php script. You may try the example below. Please replace all the necessary information to the correct ones.

Sending email via PHP script



$to = “,”;

$subject = “Test mail”;

$message = “Hello! This is a test email message.”;

$from = “”;

$headers = “From:” . $from;


echo “Mail Sent.”;


If you are sending through an external server, you may see Mailing Script with External Server. Please do not hesitate to contact our support team if you have further questions.

sending email via PHP

(Visited 202 times, 1 visits today)