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

learn more… | top users | synonyms

0
votes
1answer
13 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
15 views

wp_mail encode ’ in ’ 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
17 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
28 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
34 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
42 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
22 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
22 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
40 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
0answers
36 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
33 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
39 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
58 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
29 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
146 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
69 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
108 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
23 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
301 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
157 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
157 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
246 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
89 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
31 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
250 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
80 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
89 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 ...
18
votes
2answers
2k 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
503 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
1k 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
105 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 ...
0
votes
0answers
18 views

wpmail in conditional statement in theme template

I am using a theme which uses PostRelations to create courses, lessons and plans. A plan can be set for a certain period such as a month, year etc. The plan expires when this period is over. I am ...
2
votes
1answer
93 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
431 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
124 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 ...
0
votes
0answers
25 views

wp_mail inserting gaps into code at random

Guys I wanted to know if anyone else out there has come across any problems with wp_mail breaking email code. I've noticed it happening in some of my notifications for a while but tended not to ...
0
votes
0answers
62 views

How to stop email from sending when updating and publishing pages not posts

I have a function that sends out emails when a new post is published or updated and is working great until today I realized that it also sends emails when publishing or updating pages whihc is a real ...
2
votes
1answer
112 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
531 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
500 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
76 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
421 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: ...
0
votes
0answers
102 views

wp_mail usage problems

I am trying to include and make use of Wordpress' wp_mail() function within my functions.php file to send email out from a contact form on the front-end. However, no matter what I try I keep getting ...
0
votes
0answers
171 views

Help with contact form

Ok, first of all, this is going to be a huge amount of code. Sorry for that. I am not finding a way to make this contact form on my theme work. Here is the form itself: <!-- Contact Section ...
1
vote
3answers
2k views

Change Default wp_mail From, Without Affecting Gravity Forms

I have a question about changing the default sender From name/email on default wp_mail notifications (e.g., Lost Password response), but WITHOUT it messing up notifications being passed on by Gravity ...
0
votes
0answers
46 views

wp_mail_from: different from address each time

I have a form. Where user gives their name and email address. The I use the custom plugin to send the mail. The requirement is I need to send the mail on behalf of the user who signed. Now in wp_mail ...
1
vote
2answers
263 views

How to send mail to subscribers using wp_mail

I'm just starting out with making plugins and I'm trying to make a simple one that will mail a notification to subcribers whenever i make a new post so far i have add_action( 'publish_post', ...
0
votes
0answers
99 views

Attached file are broken wp_mail

On my local when I use the wp_mail() with attached files it works, but when I'm on prod it doesn't. The file I receive in the email is a .dat file. I read that it's because there is a transmission ...
2
votes
1answer
628 views

Can I configure WordPress to use postfix without a plugin?

I am developing a WordPress site on a vagrant box and have installed postfix in order to test email notifications. At this guest OS (Ubuntu) level, I am able to end a test email: echo "Test mail ...