Send Php mail for conditions



You can set your HTML form and input type then follow the below code to send an email.

Working example:

<?php

ifisset($_POST['dbname']) && isset($_POST['dbuser']) && isset($_POST['dbpass']) && isset($_POST['blogurl'])) {


// the message

$msg = "";


// use wordwrap() if lines are longer than 70 characters

$msg = wordwrap($msg,70);


// send email

$result = mail("someone@example.com","My subject",$msg);

if($result) {


echo "message send";

}

else {

echo "message not send";

}

}

else {

die('no post data to process');

}

Send Php mail for conditions Send Php mail for conditions Reviewed by TechTubeHQ on November 28, 2021 Rating: 5

No comments:

Powered by Blogger.