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

learn more… | top users | synonyms

0
votes
1answer
173 views

Sends out email to admin with post author

Hello i'm using this : add_action('publish_post', 'send_admin_email'); function send_admin_email($post_id){ $to = 'admin@email.here'; $subject = 'subject'; $message = "Here is ...
0
votes
1answer
452 views

Images in wp_mail not showing

I created a plugin that sends an email: $subject = 'New comment - '.$post_title; ob_start(); include(SUBSCRIBE_USER_BASE_DIR . '/email/message.php'); $message = ob_get_clean(); ...
0
votes
1answer
1k views

why is wp_new_user_notification not working?

i dont like to use a plugin so i made use of user registration custom signup page and its not sending any emails:( at first everything is working then i added some functions to change the from and the ...
0
votes
1answer
298 views

Conditional wp_mail statement on post

I am currently posting from the front end using a similar model as http://voodoopress.com/2011/03/review-of-posting-from-front-end-form/. I want to send an email to certain addresses based on the ...
0
votes
1answer
12 views

Wp_Mail and Contact Form 7

I have a problem. I've used add_filter('wp_mail_from', 'new_mail_from'); add_filter('wp_mail_from_name', 'new_mail_from_name'); function new_mail_from($old) { return 'contact@mysite.hk'; } ...
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
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
32 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
229 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
0answers
88 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
1answer
169 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
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
1answer
294 views

File upload from front-end form (as attachment) not working

I have a front-end form that is supposed to allow the user to upload a CV which is then sent along with the rest of the form as an attachment. To do so I have used wp_handle_upload() like so: if ...
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
0answers
213 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
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
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
3answers
406 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
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
151 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', ...
0
votes
1answer
804 views

wp_mail: An array as $to - multiple emails or single email with all the email ids in it?

If I will use an array of email IDs for $to parameter of wp_mail function, will it send different emails to all those email ids or will send one email with all the email ids as 'to'?
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 ...
0
votes
2answers
3k views

Using wp_mail in functions.php

I have set up a simple mailer before I get the full implementation sorted. I've tried a few email addresses but am not receiving them even though it returns 'true'. I'm using wp_ajax as well if that ...
0
votes
1answer
428 views

wp_mail_from not changing from address

I wish to use the wp_mail_from hook to change the from email address submitted through a form which sends an invitation to a friend by email (I am writing my own plugin to do this). I am using the ...
0
votes
1answer
674 views

wp_mail is sending two emails when used after retrieving session data

I'm using the wp_mail function to send emails in WordPress. Before I run the function, I retrieve a heap of data from a session and some others from a form that was just submitted. For example: ...
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 ...
-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(); ...