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

learn more… | top users | synonyms

0
votes
1answer
497 views

How to allow specific extensions and file size to wp_mail attachment?

I am trying to create a form with an attachment option that will be sent to an email when the form is submitted on a wordpress site. My codes work fine and it sends email in a HTMKL table format to ...
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
21 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 : ...
1
vote
3answers
1k views

Not sure how to debug: Send specific users an email when posts are published

I've got the following code, which is supposed to run when a new post is published for the first time, check if a custom field 'specific_users' has data (this uses Advanced Custom Fields), and if so, ...
0
votes
1answer
18 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 ...
2
votes
1answer
647 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 ...
0
votes
1answer
519 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 ...
1
vote
3answers
3k views

Check to check if wp_mail is working properly?

I'm trying to use wp_mail (testing on local machine) but no mail is received. The php.ini has smtp_port = 25 set and the php mail() is working so far. how can I check if wp_mail is working what can ...
0
votes
1answer
29 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.
1
vote
2answers
7k views

wp_mail() is not working on server

I am breaking my head from last 1 hour but not getting any idea that what's going wrong with my code... I am developing my own plugin and I am using wp_mail() function for sending mail in that but ...
0
votes
1answer
37 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 ...
1
vote
1answer
145 views

Using wp_schedule_event to send emails including links

I'm trying to write a simple plugin using wp_schedule_event to send emails. The first example below works fine, but in the second (where I try to include a url within the email) nothing happens. Why? ...
3
votes
1answer
43 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
42 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
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 ...
1
vote
1answer
2k views

Reset Password - change from name and email address

When the password reset goes out, the name is 'WordPress' and the from address is wordpress@domain.com. I need to change these to the company name. I'm running WordPress 3.8 multisite and have done ...
0
votes
0answers
37 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
2answers
148 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
60 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
31 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
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
1answer
2k views

how to set from address according to the form input email address for wp_mail()?

I am trying to create form and send it to my e-mail address using wp_mail. my wp_mail() code is: if($_POST["submit"]) { $to="my email"; $subject ="My subject"; ...
0
votes
0answers
112 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 ...
2
votes
1answer
224 views

wp_mail isn't making the from header correctly

So I've got a couple of different plugins which I'm attempting to change the from address of the email header. I've tried using the filters, but it's simply sending the email as the admin user ...
0
votes
0answers
82 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 ...
0
votes
1answer
3k views

resend user login & password with custom button

How would you resend the login & password to a user who has forgotten his password? In this case they don't want to go to the "password" forgotten page. Additional Q: Mass re-sending of ...
18
votes
5answers
14k views

Why won't wp_mail() let me set the From: header when plain old PHP mail() will?

When I use wp_mail( $to, $subject, $message, $headers ) (with values in place, of course), the email gets sent with a from name and email that isn't set anywhere I can find (not even in PHP or Apache ...
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 ...
19
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 ...
2
votes
1answer
159 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
305 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 ...
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
3answers
159 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 ...
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 ...
2
votes
1answer
257 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 ...
5
votes
3answers
13k views

Is there a way to send HTML formatted emails with Wordpress' wp_mail function?

Is there an action_hook or something similar that could help me achieve this? I tried adding markup in a PHP string variable and just fired off an email with the wp_mail function like so: $email_to ...
0
votes
0answers
91 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
257 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
107 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 ...
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 ...
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
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
94 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
440 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 ...