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

learn more… | top users | synonyms

0
votes
1answer
15 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'; ...
2
votes
1answer
958 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
14 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
66 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
5answers
3k views

How to stop the wp_mail function?

I'm using wp_mail filter function. add_filter('wp_mail','check_the_mail_content'); If my condition satisfied then the mail should go, otherwise I need to stop, my function is ...
0
votes
1answer
11 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
1answer
485 views

Wordpress ajax success response

I'm trying to create a contact form in Wordpress using wp_mail and ajax The emial works but I'm having problems with the ajax success reponse. After the email is sent I need to show the user a ...
0
votes
1answer
567 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
0answers
12 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 ...
20
votes
5answers
15k 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 ...
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, ...
7
votes
3answers
231 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 ...
1
vote
2answers
3k views

wp_mail recipient array not sending?

I am using wp_mail to send an email to multiple recipients. my mail function looks like this: wp_mail($group_emails, 'my subject', 'my message', $headers); $group_emails is an array of email ...
0
votes
1answer
18 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
13 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 ...
1
vote
2answers
3k 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
1answer
20 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
24 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
66 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
33 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
636 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
4k 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
56 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
8k 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
70 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
179 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
53 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
46 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
26 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
115 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
59 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
66 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
234 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
85 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
63 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
155 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
166 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
246 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
91 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 ...
0
votes
0answers
32 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
191 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
378 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
219 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
427 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
15k 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 ...