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

learn more… | top users | synonyms

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'; } ...
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 ? ...
1
vote
0answers
5 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 ...
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
2answers
244 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
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
172 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
54 views

How can I format email notification after registration?

I saw already this answer. And it helped me to make unique mail. It's great. But how to format some text using HTML? For example to work with tags <b> <i> <font color="red"> ...
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 ...
1
vote
1answer
60 views

Email all subscribers when i do an action

I've created this function: function email_subscribed_users($event) { $users = get_users('role=subscriber'); foreach ($users as $user) { $accepted = get_user_meta($user->ID, ...
0
votes
1answer
83 views

Email sent from WordPress has html tags

Instead of: Hello, Thank you dfasdfasdfasdf asdf asdf asdfas dfs Please, feelasdf asdf asdf I am getting something like this in the email that arrives to my mailbox: <p>Hello,</p> ...
1
vote
1answer
31 views

Website needs to be opened for wp_mail to work

I have a custom post type Events. In that post type, I can schedule events with a date and time. Whenever I publish an event, it will automatically send an email to the users 2 days before the event. ...
1
vote
2answers
242 views

wp_mail - Remove sitename from email subject

Can some one tell me how to remove site name from email subject. As of now my email subject looks like this [sitename] - Subject goes here I want it to look like this Subject goes here I ...
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 ...
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 = ...
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'], ...
1
vote
1answer
331 views

Error when requesting password reset email - wp authentication

I get the following error whenever a user tries to request a password reset email: The e-mail could not be sent. Possible reason: your host may have disabled the mail() function. As per ...
0
votes
1answer
94 views

Help with filter for wp_notify_moderator()

I have a case where I have multiple Administrators. Not all of them want to be notified per email when there was a comment posted or is held for moderation. The Settings > Discussion page only ...
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
1answer
436 views

wp_mail strips out the link url from the anchor tag in mail content

When the email content contains a link with url like: mobileappname://accesstoken#w34rdgtsrt5v6m, <a href="mobileappname://accesstoken#w34rdgtsrt5v6m">Click</a> wp_mail function removing ...
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 ...
0
votes
1answer
282 views

wp_mail very slow

I have a question about the wp_mail() function. Right now I'm having the following button to send e-mail with: echo '<input type="submit" name="send_button" value="verzenden" id="'.$post_id.'" ...
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
1answer
177 views

Send email for confirmation during user registration

I am very new to WP.How does a confirmation mail is sent during user registration.Is there any services being worked out here. is this a free service using php for any plugin.
0
votes
0answers
152 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
805 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'?
1
vote
1answer
610 views

Mail not sent when I set HTML headers

$subject = get_the_title(); $sender_name = get_bloginfo('name'); $blog_url = get_bloginfo('url'); $to = 'myemail@mydomainname.com'; $subject = 'the subject'; $message = 'hello'; $headers = ...
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
2answers
1k views

Include HTML template file in wp mail

I'm using wp mail to send an html email. But there's quite a lot of html code in the email, so rather than including all the code in my wp mail function, is it possible to have the code in a separate ...
3
votes
1answer
232 views

Different wp_mail_from and wp_mail_from_name for specific situations

I'm wondering how to create differents wp_mail_from and wp_mail_from_name for specific actions that use the built-in mail system in Wordpress. For example, when a new comment comes, notify the user ...
2
votes
3answers
8k views

Wordpress refuses to send mail, “…your host may have disabled the mail() function”

I recently implemented a comment area on my website and tried to get the email notification functionality to work. It doesn't seem to want to send email notifications when new comments are made. Just ...
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
1answer
132 views

How to get post meta in functions?

I set an email button in functions php. The email is sent when clicking on a front-end update post button. The problem is: the email is sent but I can't get the post title to appear in the post. 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 ...
4
votes
2answers
4k views

What's the easiest way to setup SMTP settings programmatically?

Assume we have blank WP site and we want to setup SMTP settings programmatically in our plugin or theme. What's the easiest way to do it without changing core files?