wp_mail() is a wrapper for PHPMailer which is a wrapper for PHP’s mail() function.
0
votes
2answers
20 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
10 views
how can I check if mv_mail is working properly?
I try to use mv_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 mv_mail is working
what can fail
...
0
votes
0answers
7 views
Allow users of custom domain email to post in website
How can i add a custom domain restriction on registration.
I want users of only particular domain to post in my website.
ex : users having bond@xyz.com ,only xyz registered users can post in my ...
0
votes
1answer
22 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
22 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
25 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
47 views
wp_mail: An array as $to - multiple emails or sigle 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
votes
0answers
51 views
Fatal error: Call to undefined function wp_mail() in /home/
I'm writing a plugin that shows the newsletter form.
Whenever i use the wp_mail function in a file it shows the below error.
Error
Fatal error: Call to undefined function wp_mail()
Note: my file ...
0
votes
1answer
79 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
45 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
111 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 ...
0
votes
0answers
30 views
Correct process for updating custom field and sending email on form submit [closed]
I've built a client admin area where I want clients to be able to accept or decline contracts. If they click the accept button it updates a custom field to say it's been accepted, but I can't work out ...
3
votes
1answer
64 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 ...
0
votes
2answers
327 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
56 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
59 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
126 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 ...
2
votes
1answer
667 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?
-3
votes
1answer
72 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();
...
0
votes
1answer
247 views
Fatal error: Call to undefined function wp_mail()
I am using a plugin wordpress-simple-paypal-shopping-cart for my cart requirement. I am trying to send an email through this plugin when some payment is made by using IPN.
My code :
$invoiceProducts ...
3
votes
2answers
157 views
wp_mail function timing out
I have the following function. This is part of a membership-based site. When a post of the type "message" is moved to Publish status, it should send an email to all users who belong (custom user meta) ...
0
votes
1answer
126 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
2answers
864 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
0answers
94 views
wp_new_user_notification() takes 5-10 seconds to run [closed]
I'm writing a simple API endpoint which allows a 3rd party site to create new users. Everything works but the 3rd party site is set up to only wait 5 seconds, and for some reason, when I create a new ...
0
votes
1answer
111 views
Change Mail from and display name with a filter action
I'm attempting to override the from display name and email address using wp_mail function. I am using the hook to modify wp_mail_from with my custom function using ...
2
votes
1answer
198 views
Joining confirmation email
When a super admin adds a network user to a blog via wp-admin/user-new.php where does that confirmation email come from? How do I change? It says incorrectly comes from
Wordpress@example.com
...
0
votes
1answer
228 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
132 views
Validate emails in array using foreach
How do I validate an array of emails from a textbox before sending them to the wp_mail function?
$emails = 'test@test.com;test2@test2.com
email3@email3.com,email4@email4.com, email5.com';
$emails = ...
0
votes
3answers
480 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
...
2
votes
1answer
228 views
How do I override the Message-ID header of wp_mail function?
I have a custom notification function for our comments editor, who prefers to have all comments from one article threaded together in her email client. To achieve this, I'm creating a custom ...
0
votes
1answer
208 views
wp_mail - using a custom field value for $to
I'm trying to pass a custom field value to my functions.php file. I want to replace:
$to = get_bloginfo( 'admin_email' );
to something along the lines of:
$to = get_custom_field('sendto', TRUE);
...
3
votes
1answer
1k views
Using wp_mail with attachments but no attachments received
Ok I give up. Been looking at multiple examples including this one.
I get the email no problem but there are no attachments. Am I missing the content/type of file type? All the examples I've seen ...
3
votes
1answer
1k views
wp_mail and BCC headers
I'm using WP 3.3.1
I am trying to add BCC onto the headers of an email I'm sending out, but the BCC is not being added.
public $from = "sender@example.com";
public $replyTo = "sender@example.com";
...
6
votes
1answer
621 views
What is the advantage of using wp_mail?
What is the advantage of using wp_mail() over mail(). Codex says they're similar, but they seem to be very similar.
0
votes
1answer
282 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 ...
1
vote
3answers
1k views
Need clarification on how to correctly call wp_mail()
I want to call wp_mail() from a non-template php file, but when I do so it fails and I don't understand why. For example, let's say I have a php file that consists of only this:
<?php
echo ...
3
votes
1answer
1k views
wp_mail is undefined
I am writing a plugin that opens up a form to invite people to a website by email and want to use wp_mail().
Whenever I use the wp_mail() function in any file in my plugin folder I always end up ...
1
vote
2answers
466 views
Adding second Email address for WP user notifications
The WP systems sends a lot of mails to authors. There also plugins who use email notifications for authors.
But, let say I have a user, who is managed by two persons (because it's a company, an ...
0
votes
1answer
329 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:
...
1
vote
2answers
387 views
If new comment posted in custom post - send notification to custom email from custom field
I have custom post type "Art masters".
Each post is master's profile.
In their profiles isset custom fiels name "master_email".
I need to send for master email notification every time if new ...
1
vote
1answer
417 views
Email notification via WP_Mail on published custom post type
I've been trying to get an email notification to fire when a new custom post type (in this case, "event"), is published. I've tried a few things and settled down to this simple example that, I ...
0
votes
1answer
793 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 ...
1
vote
1answer
174 views
3 different mail notifications
I'm building a small tracker and need to send mail notifications on specific actions.
Thought-out notifications:
Administrator gets a notification email when a new ticket is published
Author gets a ...
1
vote
1answer
469 views
Do I have to override the wp_mail() pluggable function with writing a plugin?
If I want to override wp_password_change_notification, do I have to write a plugin to do this? It seems to have no effect in functions.php of my theme.
The only thing I need to do is change the ...
3
votes
1answer
3k 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 ...
2
votes
1answer
315 views
Using wp_mail - verify that email was sent?
When using wp_mail, is there any way to verify that the email was sent correctly?
0
votes
1answer
236 views
If/elseif statement within wp_mail function
I need to know what is wrong with my if statement here:
//EMAIL ADMIN BASED ON PROBLEM_TYPE
function new_post_creation_email() {
global $post;
$postid = $post->ID;
$problem_type = ...
0
votes
1answer
242 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 ...
1
vote
1answer
2k views
wp_mail not recognizing cc and bcc headers
I am using WordPress 3.1.3
I am getting following notices when I use wp_mail with cc and bcc headers.
Notice: Undefined variable: cc in ...
1
vote
2answers
1k views
wp_mail script with jquery post
need to send an email from a page when a form is submitted.
Thought i'd use jquery post but not really sure where to start. Would i use wp_mail? And if so how could it be called ?
Sorry if that ...
