Wp_mail doesnt work

f you’re using anything that allows you to configure SMTP within WordPress, take it out. Then put everything into a function: add_action(‘init’,’delay_until_init’); function delay_until_init(){ // call wp_mail() here }

How to send email with wp_mail() with from email taken from contact form instead of the host?

You don’t need to pass the from name and email to PHPMailer in your code as it will take it from $headers so try the following: add_action( “phpmailer_init”, “send_smtp_email” ); function send_smtp_email( $phpmailer ) { // ini_set(“sendmail_from”,”[email protected]”); // ini_set(“sendmail_path”,”[email protected]”); // Define that we are sending with SMTP $phpmailer->isSMTP(); // The hostname of the mail server … Read more

wp_mail doen’t send mails whit attachment

Try code below. <?php $attachments = array(); array_push($attachments, WP_CONTENT_DIR . ‘/uploads/my-first-attachment.docx’ ); array_push($attachments, WP_CONTENT_DIR . ‘/uploads/my-second-attachment.zip’ ); $to=”[email protected]”; $subject=”Online: multiple attachment demo through wp_mail of wordpress”; $message=”This is testing”; $headers=”From: NAPSWI online <[email protected]>”; get_header(); if( wp_mail( $to, $subject, $message, $headers, $attachments) ) { // the message was sent… echo ‘The test message was sent. Check … Read more

Sending email with wp_email and AJAX

Have you tried without the ajax? Is that where you’re actually sending the mail? Try just putting the wp_mail function right under headers and see if you get the mail. Also i agree with theDeadmedic. It could be spam. Check the google spam folder and if its’ not there, try sending to an email on … Read more

Is wp_mail plugin territory?

While wp_mail() is not exactly forbidden in a theme, it is very likely misplaced there. The purpose of a theme is presentation. It should not change existing data, and it should always be easy to replace. That’s the reason why contact forms, polls, shops, tracking and similar functionality is pure plugin territory. There is no … Read more

Whitelist email sent by WordPress

Honestly, this also has nothing to do with WordPress. It is more web server whitelisting issue. You should start with this link. SPF records are important. And maybe your web server has IP address that is blacklisted. You may even consider different IP address from your provider.

adding Recipient to wp_email() is not working?

Seem like You are not using the correct variable name in $status = wp_mail( $ecard_recipient, $subject, $message, $headers ); You are getting email of recipient in $recipient and in wp_mail() function you are passing another variable for recipient email. So, i think this must be the issue you are getting empty variable.

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