Plugin or code to send out email to admin when a post is created

No need for plugin here are a few lines of code you can modify and paste in your themes functions.php file and you will get a new email whenever a post is published: add_action(‘publish_post’, ‘send_admin_email’); function send_admin_email($post_id){ $to = ‘[email protected]’; $subject=”mail subject here”; $message = “your message here ex: new post published at: “.get_permalink($post_id); wp_mail($to, … Read more

WordPress admin area not sending mail (but works with WP Mail SMTP, Test Mail, and PHP mail() function)

I found the issue, had to edit /etc/php/8.3/cli/php.ini file, by adding/editing following lines : [mail function] ; For Win32 only. ; https://php.net/smtp #SMTP = localhost SMTP = mysmtpserver.domain ; https://php.net/smtp-port smtp_port = 25 username = myusername password = mypassword sendmail_from = [email protected] Then a service nginx restart. I still don’t understand why PHP is able … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)