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

learn more… | top users | synonyms

0
votes
3answers
650 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
139 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 = ...
0
votes
2answers
237 views

How to apply the “retrieve_password_message” filter?

I would like to change the body of the password reset email that WP sends out with something more friendly. I am trying to use the "retrieve_password_message" filter but I am messing it up. Can ...
0
votes
2answers
81 views

Send email from Wordpress

What's the best way to send a email from Wordpress after a certain action. I'm working on a site where users can submit ideas and then other users can comment on them. I would like to send emails to ...
0
votes
2answers
2k 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 ...
2
votes
1answer
74 views

Adding an Attachment to Contact Form Using wp_mail

Would anyone be kind enough to explain to me how to attach an uploaded file to an email generated using wp_mail? I've built the form but all the questions I can find online refer to attaching a ...
1
vote
1answer
73 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
75 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
56 views

automatic send email at custom time

I want to send an automatic email every day at 10:00 I tried this code $timeN = date('H:i'); $timeS = date('10:00'); if ($timeS == $timeN) { $to = get_option('admin_email'); $nfrom = "my ...
0
votes
1answer
111 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
166 views

html mail sended with wp_mail shows plain

I have a invoice.html that i want to send i use the following function to replace some things in the html foreach($variables as $key => $value){ $template = str_replace('{{ '.$key.' }}', ...
0
votes
1answer
86 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
377 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
114 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
128 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
894 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
461 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
244 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
160 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
41 views

wp_mail 200 response but no mail sent

I'm trying to send email from WP using ajax to validate the form and wp_mail to send the mail. The form is a basic form with id names on the fields The js validtion looks like this ...
1
vote
0answers
35 views

Using wordpress templating for html emails

Im working on a plugin that needs to send out an email after a form submission. Im using wp_mail for this, and it works perfectly fine. My problem is that in my code the html is generated by a bunch ...
1
vote
0answers
13 views

Emailing passwords: Setup installed on home server using XAMPP

I've just delved into the WP world and all in all it's going quite well. I have a server at home that I'm using to host the sites. All is working fine except the password emails are not being sent ...
1
vote
0answers
39 views

wp_mail not sending when attachment

I'm searching for an hour and my problem is this : I have the following code : //This is an absolute path $attachments = array( $path ); $headers = 'From: My Name <'.$email_expediteur.'>' . ...
1
vote
0answers
74 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 ...
1
vote
0answers
48 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
56 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
157 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
208 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
9 views

Send attachments via wp_mail from temporary folder

Is it possible to send attachment via wp_mail, using temporary file, instad of uploading them to any actual folder on server? For example: <input type="file" name="file"> $attachment[] = ...
0
votes
0answers
44 views

wp_mail() header From is not working

I created a contact form for my website which works fine except for one thing. The From header is not working correctly. Instead of using the $contact_name it uses my domain name as the name. I have ...
0
votes
0answers
37 views

wp_mail() inside AJAX handler never returns

We have an AJAX handler called by jQuery.ajax() that takes a document stored on the server and mails it to the user. At the bottom there is a call to wp_mail like so: $status_wpmail = ...
0
votes
0answers
24 views

Wordpress email templates

I have a custom plugin which needs to send custom emails to users in specific cases. At the moment i have the email content embedded in within the plugin codebase which makes updating the text a ...
0
votes
0answers
23 views

wp_mail function not dispatching emails from plugin

I am working on a plugin that needs to dispatch an email to the user after they submit a form. I have tried quite a few different things but none of them are working. I have also tested from my local ...
0
votes
0answers
29 views

How to send mail from 7 days before to an expiry date?

My task is to send mail to all users before seven days to an expiry date. I have Expiry date like: $expiry_date = date('Y-m-d H:i:s', $new_date); // 1/08/2015 //7 days before $seven_days_before = ...
0
votes
0answers
54 views

Different Name and Email for wp_mail_from and wp_mail_from_name

I want to make the email and Name dynamic.Everything works fine.But I can't able to get the name and email for each doctors.I have attached my code which I have tried.please help Thanks in Advance. ...
0
votes
0answers
36 views

wp_mail recipient

I am new at this and seeking help, I'm really need a light at the end of the tunnel, so if you can help me, please do it! I will be very grateful! The question is, what do I do to when someone fills ...
0
votes
0answers
20 views

Email post content

I have this function in functions.php to send an email when a new post is published. How can I add the content of the post as the message in the email. function authorNotification($post_id) { ...
0
votes
0answers
69 views

How can I replace Email addresses with BitMessage Addresses througout wordpress?

BitMessage (bitmessage.org) is a peer-to-peer email system kind of based on BitTorrent. By itself, this software and its' messages are not compatible with email, so in order to send an email to a ...
0
votes
0answers
52 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
465 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
400 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
180 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
95 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', ...