php code : email not send

Your hosting provider likely has disabled emailing to prevent its system being used for spamming. You should contact them to see if they will enable it for you. If they will not, you may want to consider using a third-party service.

PHP Errors – Total of four [closed]

The errors are: Notice: Undefined index: name in C:\wamp\www\contact.php on line 9 Notice: Undefined index: email in C:\wamp\www\contact.php on line 10 Notice: Undefined index: message in C:\wamp\www\contact.php on line 11 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() in C:\wamp\www\contact.php on … Read more

php form send email

First, Use this headers: <?php $headers = “MIME-Version: 1.0\r\n”; $headers .= “Content-type: text/html; charset=utf-8\r\n”; //Fom $headers .= “From: XXX XXXX XXXXX <[email protected]>\r\n”; //Reply $headers .= “Reply-To: [email protected]\r\n”; //Path $headers .= “Return-path: [email protected]\r\n”; //CC $headers .= “Cc: [email protected]\r\n”; //BBC $headers .= “Bcc: [email protected],[email protected]\r\n”; ?> Two, Read about PHPMailer and see the next code: And try with … Read more

Query database then email posts from where user is subbed to

I figured it out. Just use ob_start(), and loop through each user. Select the posts they’re subscribed to. Then inside the loop email it to each user. I used this query SELECT articles.* FROM articles INNER JOIN subscriptions ON articles.from_id = subscriptions.sub_to INNER JOIN users ON subscriptions.user_id = users.id WHERE users.email = :email