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

learn more… | top users | synonyms

0
votes
3answers
407 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, ...
1
vote
2answers
87 views

Why is my get_post_meta always empty

I made this action hook which will send an email to the users every time a new post in the custom post type "events" is made. function email_members($post_id) { global $wpdb; $usersarray = ...
1
vote
1answer
21 views

Mail function is not working

My mail function is not working. When I submit form it says mail sent. But not receiving. I tried echo if the mail sent. It is also working. What is the issue here? Anything with mail function ? ...
0
votes
1answer
28 views

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

I hope you'll be able to help me on this one: I'm trying to trigger a GA event for every email sent via a Wordpress site. My idea was to add the following code to my child theme's functions.php ...
0
votes
1answer
97 views

Custom Contact Form Not Sending (but not giving error)

hope things are going well. I'm attempting to add a custom contact form to a section of home page. I came across a custom contact form at https://gist.github.com/hansspiess/6815875. I implemented the ...
0
votes
1answer
33 views

Only single mail function is working from double mail functions one after another on wordpress

I am having a html form in my wordpress page and i have call action on my form. The file which is calling an action is saved in the root of wordpress directory. sending-mail.php I have two mail ...
0
votes
1answer
40 views

send email to all registered users when post expires

I have a function which, when a post is published inside a CPT after three days the page is redirected to another URL/PERMALINK. This is the code: add_action('template_redirect', ...
0
votes
1answer
231 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
64 views

upload file with front-end submission and forward the data in an email

I have an email set up using wp_mail that forwards my front-end submission data as well as posting it to the dashboard. The part that I am having trouble with is forwarding the attachment file with ...
0
votes
1answer
166 views

WooCommerce wp_mail attachment not working dynamically

I have edited function send() to attach the file in woo commerce plugin when, I am use the attachment file path statically it work's but when, I put it on dynamically attachment source not able send ...
0
votes
1answer
97 views

get_post_meta is always empty when I use wp_mail

I made this action hook which will send an email to the users every time a new post in the custom post type "events" is made. function email_members($post_id) { global $wpdb; $usersarray = ...
0
votes
1answer
295 views

send bulk emails without timeout

I am developing a plugin that sends emails out to users. I am having difficulty in finding the most performance enhanced way to send these emails out and prevent a server timeout. In other words, I ...
0
votes
1answer
209 views

wp_mail - using a custom field value

Can this work? I want to send a email when a post is published to the recipient, that is called in custom field. EDIT I changed the code to another example I found. function ...
-3
votes
1answer
128 views

Not receiving mail using wordpress function

I'm not receiving emails when using the following function. Is there another method that works or that I can test? <?php $data = ob_get_clean(); ...
1
vote
0answers
6 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? ...
1
vote
0answers
28 views

Trying to get author'email for sending email from single.php page in wordpress?

I am trying to get author's email in order to send a email form single.php page in WordPress. Actually I would like to get output in quotes in order to send email with wp_mail function. Right?? Here ...
1
vote
0answers
101 views

Google Apps SMTP for WP MultiSite?

How can you force WordPress MultiSite to send all emails via a Google Apps SMTP server? I have attempted to use Easy WP SMPTP, however that does not work exactly as I'd hoped, not to mention it fails ...
1
vote
0answers
152 views

wp_mail works with add_action('save_post', …) but not an ajax action

I have two actions. One is after saving a post, so add_action('save_post', 'on_any_post'); I have a second action triggered via AJAX, so add_action( 'wp_ajax_nopriv_saveTaskPriority', ...
0
votes
0answers
24 views

wp_trash_post retrashes already trashed comments?

I have a few mail- and update_user_meta functions that fires when a post, comment or child comment gets thrashed. So when I trash a comment with trash_comment, a mail get sent to the author: "Hey, ...
0
votes
0answers
89 views

Problem using wp_mail function

I have a form whose message is composed from multiple input fields when submitted. I got this form working as simple php document but when I'm trying to use the form within a wordpress page it doesn't ...
0
votes
0answers
22 views

how to invoke mail with additional parameters

My mailserver doesn't send me WordPress notifications. My hoster says that to have the php function mail(,,,,) working I need to set the fifth parameter (additional parameter) equal to -f ...
0
votes
0answers
141 views

Using wp_cron with wp_mail to send bulk email

I am working on a custom plugin to send recurring invoices on the 1st of every month. So far, the plugin is working pretty well. It creates new invoices for each user based on their order and does ...
0
votes
0answers
214 views

Email attachment not working using wp_mail function

I am trying to send email with attachment but, I am not getting any attachment but I am getting the email bellow is the function ,I have used in function.php and I am trying to attach a zip file fro ...
0
votes
0answers
158 views

How to add attachment in woo commerce send mail function

I am using woo-commerce plugin. After the checkout process, I am sending a mail to customer, it's working good but also, I want to attach the product image into the mail. I am not getting any idea how ...
0
votes
0answers
55 views

SMTP server configure- dynamic sender

I am using Mandrill SMTP server and always the "sender" is my mail which I added in Mandrill. I want that the "From" mail would be dynamically set for the user who sends the message, so the receiver ...
0
votes
0answers
9 views

Mail sending randomly fails

I'm having a troublesome problem here. I set up a event subscription plugin that should send a confirmation mail at the end of the subcription process. Here's the code: wp_mail( $data['email'], ...
0
votes
0answers
224 views

wp_insert_user email confirmation

I'm creating a new user once they leave a comment, i am doing this with wp_insert_user function create_comment_user($comment_ID){ global $wpdb; $comment = get_comment($comment_ID, ARRAY_A); ...
0
votes
0answers
579 views

how can I check if wp_mail is working properly?

I try 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 fail ...
0
votes
0answers
153 views

Verify Registration email on local host windows 7 xampp

I am very new to word press development. I have set up xampp and successfully installed wordpress on my localhost with my admin account. I need to create a registration for the users to register in my ...
0
votes
0answers
64 views

Wordpress email notification using address with plus sign

So I've managed to change mail_from used by WP to send e.g. new comment notifications by adding filters like that: add_filter('wp_mail_from_name', 'get_name'); add_filter('wp_mail_from', ...