Trying to get author’email for sending email from single.php page in wordpress?
Trying to get author’email for sending email from single.php page in wordpress?
Trying to get author’email for sending email from single.php page in wordpress?
You are passing $email where there should be attachments. Look at wp_mail arguments. Also you have not defined $to variable which in your case i assume should be $email. Try this, $name = $_POST[‘cuf_sender’.$n]; $email = $_POST[‘cuf_email’.$n]; $subject= $this->o[‘subpre’].’ ‘.$_POST[‘cuf_subject’.$n]; $msg = $_POST[‘cuf_msg’.$n]; $extra=””; foreach ($_POST as $k => $f ) if ( strpos( $k, … Read more
How can I replace Email addresses with BitMessage Addresses througout wordpress?
Attachments should always use the absolute filesystem path. Also to change the Content-Type of the email you should use the wp_mail_content_type filter. <?php function my_custom_email() { $to = ‘[email protected]’; $subject=”WordPress wp_mail”; $message=” <html> <body> <table rules=”all” style=”border-color: #666;” cellpadding=”10″> <tr>Hello WordPress</tr> </table> </body> </html> “; $attachments = array( WP_PLUGIN_DIR . ‘/my-plugin/uploads/sample_photo_01.jpg’ ); $headers[] = ‘From: … Read more
wp_mail not sending when attachment
This question is quite outdated, so I’m pretty sure no one is looking at it. However, should anyone end up here, this question isn’t really a WordPress question. Your problem is that on a locally hosted system, you actually have to configure your stack to be able to send email. And if you look in … Read more
You can do some simple debugging: Try: wp_mail(‘youremail@com’, ‘123’, ‘123’); // to see if it will go through If #1 is not, check if you setup SMTP correctly // install a smpt plugin(wp smtp mail/easy wp smtp) and send a test email If you can’t send out a test email by plugin, check if your … Read more
wp_mail 200 response but no mail sent
Wp mail does not work when Ajaxed to
EDIT – SOLUTION I got the solution using status ‘new_to_pending’ and adding the $auto object. function newpost_notify( $auto ) { $mailadmin = ‘[email protected]’; $subject=”Subject”; $headers=”MIME-Version: 1.0″ . “\r\n”; $headers .= ‘Content-type: text/html; charset=UTF-8’ . “\r\n”; $headers .= ‘From: xxx <[email protected]>’ . “\r\n”; $message=”There\”s a new post.’; wp_mail( $mailadmin, $subject, $message, $headers ); } add_action( ‘new_to_pending’, … Read more