wp_mail() is a wrapper for PHPMailer which is a wrapper for PHP’s mail() function.

learn more… | top users | synonyms

0
votes
3answers
34 views

Sending HTML email with attachment with wp_mail()

This one should be easy, but I can't figure it out. I want to send an email that is HTML formatted, but also has an attachment. The attachment is being sent correctly, but the message is delivered as ...
0
votes
1answer
17 views

Could not get attachment using wp_mail

I am trying to create a form which can be sent by users with an attachment. The form works fine and sending the emails when it is submitted but without the attached file. my form is : <form ...
0
votes
1answer
18 views

Wp_mail doesnt work

I created a form for mail sending, but it does not work. Email function is enabled in php. if (!$error_msg) { $to = "mail@to.send"; $headers[] = 'Content-Type: text/html; charset=UTF-8'; ...
0
votes
1answer
18 views

wp_email not sending the mails in multisite sub domain

I have a multisite enabled wordpress configurtaion say my main domain is http://www.example.com. It have several subdomains such as http://test1.example.com, http://test2.example.com and so on. I ...
0
votes
1answer
21 views

How to use 'phpmailer_init' SMTP settings only on certain 'wp_mail' actions?

Is there a conditional check I can run for phpmailer_init or a wp_mail parameter that let's me apply my custom phpmailer_init SMTP settings only on specific wp_mail actions or does phpmailer_init ...
0
votes
0answers
17 views

Force plugin to use wp_mail

I downloaded a theme that has built a plugin for contacts which should send emails through an SMTP server through another plugin (WP Mail SMTP). the problem is that the contact plugin use own function ...
7
votes
3answers
237 views

How to add headers to outgoing email?

I want to add an additional header to outgoing emails on my sites, so I can easily determine which site sent a given email. (I put a standard functionality plugin on all of my sites, so this is easy ...
0
votes
1answer
19 views

trigger email when post is published by someone a user follows

I'm trying to send an email to all users who are following a certain post author when they publish a post. I have this function below, but does not seem to work. a few notes the meta value = ...
0
votes
0answers
14 views

Form Won't Anchor After Submit

Having some issues with my form. I basically want the form to anchor at a certain part of the page after a user submits the form but I' can't seem to get it to work. Any ideas? <form ...
0
votes
1answer
21 views

Not able to send links in email after setting header

I am not able send links in email. I am using wp_mail() function to send email. When i set header $headers .= "Content-Type: text/html; \r\n"; this header removes href attribute in received email. i ...
0
votes
1answer
25 views

Wp_mail Returning False on Server

I'm spent the last hour trying to figure out why the wp_mail function is returning a false boolean. Here's my code. I can usually get this to work but can't seem to figure it out now. I'm thinking ...
0
votes
1answer
81 views

wp_mail encode ’ in &rsquo; in subject

I create a function to send mail (in french) for custom post, it's work but subject is encoding in html. I do this : $get_title = get_the_title($ID); wp_mail("me@my.com","new article : ...
0
votes
1answer
43 views

If I connect my own SMTP server to wp_mail, reset password doesn't works anymore

I have decided to connect wp_mail to my "Gandi" authenticated SMTP server to improves the reliability of wp_mail, and avoids many potential problems (with gmail ...) When I want to get a new password ...
0
votes
1answer
67 views

Can you set envelope sender used by wp_mail?

Is it possible to change the envelope sender used by wp_mail? So far I have tried setting headers, and the wp_mail_from and wp_mail_from_name filters.
0
votes
1answer
82 views

Why does wp_mail become so slow when adding a local file attachment?

I have a mail template in Contact Form 7 3.5.4 where I add a standard file attachment which is already on the server (PDF of about 10MB) to an email. I receive the email including the attachment and ...
3
votes
1answer
61 views

Wordpress new user / forgot password emails are broken

I have no idea why it does this - I checked my mu-plugins, functions.php, there's currently nothing that alters emails. (Note that I translated these by heart, words might not be the same but links ...
0
votes
1answer
57 views

Few chars getting replaced with '=' in mail content in wp_mail()

Whenever mails are triggered from a WordPress site, a few alphabets are randomly getting replaced with '=' in the mail content. I have set the charset and content type in headers even then this weird ...
0
votes
1answer
30 views

Wordpress user account activation

How to implement user account activation in WordPress, it's not a multi-site. Once user registered through site or admin panel, user should get an email with activation link. Once the link opened ...
0
votes
0answers
127 views

Why is wp_mail not working?

Why is my wp_mail not working? I am using a SMTP and AJAX function. This function is located in functions.php: add_action( 'wp_ajax_send_email', 'send_email_callback' ); add_action( ...
0
votes
1answer
83 views

WP mail sent to MS Exchange recipients = occasional email corruption?

My office processes many email receipts from WordPress-based forms (primarily using the Formidable Pro plugin). Starting in the last 6 months, one out of every ~15 emails sent from WP will come ...
0
votes
1answer
81 views

wp_mail issue with sending PDF

I have a problem with wp_mail and sending a PDF. The code below occasionally works and when it does, you can only see the message content within the iPhone, and not Yahoo or Gmail. function ...
0
votes
1answer
64 views

Sending emails to separate accounts using a for loop

I need to run a for loop to go through all the users on my site and send any that are applicable an email. A user can have several categories on their profile, let's say 4. If the customer has ...
0
votes
1answer
92 views

Send notification to the admin when new custom post is submitted

I have a cpt called "auto" and i make a frontend form to create new post with "pending" status. After the post submission i would receive an email with a notification of the new post. function ...
0
votes
0answers
78 views

wp_mail: Using file_get_contents to include template in message

I want to use a template as the message in an email which I send with wp_mail. But I get the error: "failed to open stream: No such file or directory". add_filter( 'wp_mail_content_type', ...
0
votes
2answers
252 views

Wordpress Ajax JSON success return no being recognized

I'm working on a contact form for a website using an jQuery Ajax call method that then uses Wordpress's building in admin-ajax.php to submit the form's values, send them to an email address via ...
0
votes
1answer
196 views

How to make mailing queue using php's mail() function

I have a site running WordPress 4.3.1 and a hosts mail() limit of 14 mails per 5 minutes (Which is 2 mails per minute) and cron limit of min 5 minutes, and I am running everyone can register, Profile ...
0
votes
0answers
179 views

Dynamic attachment WooCommerce Follow-Up Emails

I am using the WooCommerce Follow-Up Emails plug-in for my clients website. With this plug-in, I send a e-mail directly after the order has been finished, containing a custom template with WooCommerce ...
0
votes
0answers
34 views

Add a hook to wp_mail() to track Google Analytics Event?

I am looking for a way to include Google tracking in the wp_mail function to have every email sent out by WordPress be tracked in Google Analytics. This thread offers kind of a solution, but I'm not ...
0
votes
0answers
399 views

Sending SMTP mail using a server with self-signed SSL

The problem I need to solve I have a web server in a network where the port 25 is blocked for outgoing traffic, and in order to send emails it is mandatory to obtain an account and use ...
2
votes
1answer
200 views

Processing a subscription form with POST method?

I am trying to integrate a ‘subscribe to newsletter’ feature on my wordpress blog Users just need to enter their name and email address, hit subscribe. This is then supposed to send me an email and I ...
0
votes
0answers
15 views

Send emails in batches on an event

I'm trying to send a couple hundred emails to my registered users (from Subscribe2) when a new post is created. However, I'm on Godaddy and my script times out at 2 minutes and never finishes sending ...
0
votes
3answers
243 views

Wp_mail() function not working in Windows and MAC OS

Not getting mails when sent from Windows OS and MAC OS but getting when sent from Linux OS. I tried sending mails from LINUX OS,Windows and MAC OS LINUX sending me the mails as it should do but ...
2
votes
1answer
515 views

wp_mail() is not working in localhost

I'm trying to test wp_mail() in my local. When I var dump wp_mail,I get Boolean false.This is my code $to = "abcd@gmail.com"; $subject = 'my subject'; $message = 'I would like to work ...
0
votes
0answers
105 views

Wp mail does not work when Ajaxed to

I tried to including wp-load, but the wp mail refuses to work when it is called from an ajax hooked function. How can I work around this? Also, on another note, the parameters I sent through AJAX to ...
0
votes
0answers
43 views

Using wp_nonces in email links?

I would love to be able to use nonces in email links (sent out to a list of people via email to subscribe to comment notifications) My idea was to use: $Link = get_site_url() . $url_endpoint . ...
0
votes
1answer
446 views

plugins_loaded action is not working properly

I am trying to send an email to the user after form submission but I get an errorCall to undefined function wp_mail() in C:\xampp\htdocs\wordpress\wp-content\plugins\contact ...
0
votes
0answers
92 views

Change Password URL missing In forgot Password mail

I'm requesting Wordpress for Forgot password. I also got the mail from wordpress site. But the change password url is missing from it. The mail is as below : Someone requested that the password be ...
1
vote
1answer
99 views

On user registration, if welcome mail sent, add post with new user as author

I am trying to create a new post (later will convert it into custom post type), whenever a new user register on the website and if the welcome email was sent succesfully. The problem is that I want to ...
20
votes
3answers
3k views

Sending multipart (text/html) emails via wp_mail() will likely get your domain banned

Summary Because of a bug in WP Core, sending multipart emails (html/text) with wp_mail() (to reduce chance of emails ending up in spam folders) will ironically result with your domain being blocked ...
10
votes
1answer
550 views

Do something after sending email

I want to do something after WordPress sent an email. For example, after sending "Reset Password" email using wp_mail() function.
0
votes
1answer
4k views

How to send an email using wp_mail and using more than one BCC in the header

I have this code part that's responsible for getting the variables from the contact form - and and sending an email to me, and my friends from work. add_action('wp_ajax_nopriv_submit_contact_form', ...
0
votes
0answers
131 views

Welcome email specific to user role

I would like to send an additional welcome email to a specific user role, 'freelancer'. WP would still send its standard welcome email, with login and password, to all user roles. I found the ...
2
votes
1answer
126 views

Comment Email Notification for CPT Comments

I have a WordPress site where users can create new support tickets through submitting a form that posts to a Custom Post Type. I would now like WordPress to email users when there is a comment on the ...
0
votes
1answer
552 views

Sending email to all users

What is the best practice to send an email to a large number of users? I am developing a plugin for the website of an association and one of the things needed is to be able to send an email to all ...
0
votes
1answer
177 views

How to make WordPress emails async

I recently had an issue on my site where emails were failing to send. That was a problem, but the bigger problem was that the failure caused the script to timeout which really put a damper on the user ...
2
votes
1answer
130 views

Send an email when custom post type category is changed

This is the first time I've attempted to write an action hook. My CPT has 4 categories. I'm trying to make WP automatically sends an email notification when the category is changed. By change I ...
0
votes
1answer
714 views

wp_mail sending mail twice!

I can't figure out for the life of me why this is sending twice. It's not in any loop, and I have an if statement checking if isset but nothing I do stops it from sending twice. It's a basic form ...
0
votes
1answer
682 views

How to create a CSV on the fly and send as an attachment using wp_mail?

I'm trying to create a CSV file from a form submission and send that file automatically by email to a specific user. The email itself is sending fine, but I can't get the attachment to go through. Is ...
0
votes
0answers
89 views

wp_mail links are dead

I am trying to make a pseudo-newsletter type plugin which will email that authors of certain posts. The email sends the contents of a textarea with some extra text added to the end of it. I've sent ...
0
votes
1answer
554 views

Why wp_mail() function isn't sending any emails and displaying '0' in Chrome 'Network' response

I'm trying to send emails through wordpress using wp_mail() function and it doesn't seem to work. It's displaying 0 in Chrome 'Network' response with Status Code:200 OK this my code part: ...