Questions tagged [email]

It is possible to send email from WordPress using the built in `wp_mail` function. Several filters and hooks are available for additional options. There are plugins for extensive functionality, such as sending bulk mail like newsletters.

Filter by
Sorted by
Tagged with
0
votes
2answers
647 views

How to disable all WordPress emails modularly and programatically?

I want to modularly disable emails sent out by WordPress so I can replace them with my own custom emails when necessary. I tried googling for a list of filter hooks, but couldn't find anything as ...
0
votes
0answers
39 views

Problem with email function

I have a function that sends a notification to my subscribers when publish_post is triggered. However, when I click “publish”, WP stays on the admin page processing all 1095 emails. Below is my ...
1
vote
1answer
28 views

Reject Comments Based on Author Email

I know that I can't guarantee emails are valid without signups, but I noticed a problematic user wanting to troll was using @example.com email addresses. How might I maintain a blacklist of such ...
0
votes
0answers
22 views

How to gets users EMAIL by their USERNAME

If I have a users username, is it possible to take that and echo their email address instead? I have a field in Gravity Forms that has the assigned user to that job. I have added some code that echos ...
0
votes
1answer
3k views

Getting 400 Error: redirect_uri_mismatch when trying to grant permission to Gmail SMTP plugin

I am trying to add Google SMTP plugin to my wordpress website. I have installed plugin, then went to Google Developer Console created new project, added Gmail API, added Credentials. Now this step ...
1
vote
1answer
359 views

Woocommerce email template customization [closed]

I have the latest version(3.3.4) of woocommerce and I'm trying to customise the email templates that come with it. Tried following this tutorial, but the version I am using doesn't seem to contain ...
-1
votes
1answer
32 views

i want to send email on custom post field (job_status == 2) but it is not working

add_action('updated_post_meta', 'send_email_on_job_complete',10,4); function send_email_on_job_complete($meta_id, $post_id, $meta_key, $meta_value) { $post_type = get_post_type($post_id); if("...
1
vote
1answer
55 views

wordpress do not let user registered with info@ email and other reserved emails to get registered by users

Does wordpress do not let user registered with info@ email and other reserved emails to get registered by users? how to fix this...? when ever user are trying to register with info@something.tld ...
0
votes
1answer
168 views

Filter wp_mail based on content type

I can current filter the content type of the wp_mail function: add_filter( 'wp_mail_content_type', function( $content_type ) { return 'text/html'; }); And I can filter the message content ...
0
votes
2answers
2k views

Custom Welcome Email | WordPress

I want to replace the following message when creating a user in the dashboard as an administrator: Username: xxx To set your password, visit the following address: https://development.xxx.com/wp-...
0
votes
1answer
55 views

SMTP not working for Comments Email Notifications

The problem is that I'm not receiving wordpress emails except the ones generated by sucuri plugin. I want admin to receive email notification on every new comment and post updates. Previously, my ...
1
vote
2answers
4k views

How to add line breaks to $email['body'] when using auto_core_update_email hook

I am using the auto_core_update_email hook to modify the auto update email sent by WordPress. However I cannot figure out how to add line breaks to the email body. Here's my code: function ...
0
votes
0answers
76 views

How to Enable registration email for a custom user role?

I have created a custom user role that named as Teacher. add_role('teacher', 'Trainer', array( 'read' => true, 'edit_posts' => false, ...
0
votes
0answers
114 views

wordpress wp mail not changing sender mail

im using wp_mail to create contact page my email var is $subject = 'hello'; $html = 'message here'; $admin_email = 'admin@yahoo.com'; $email = 'email@yahoo.com'; $headers = array('Content-Type: text/...
1
vote
2answers
297 views

How to translate WordPress Emails?

I'm running a multilingual site, and I want the emails sent to the user to be in their language. The scheme I already have is the following: The website determines the user's country through their IP....
0
votes
1answer
638 views

Pass return-path additional parameter in wp_mail

Our server is currently automatically setting the return path as {serverusername@serverhostname.tld}. When sending an email in PHP, I can override this by doing the following: $return = '<bounce@...
0
votes
2answers
2k views

Preventing WooCommerce email sending only on particular conditions

By importing orders from Amazon in WooCommerce and creating WooCommerce orders programmatically, emails for new order or order status changing are sent. Is it possible to prevent this email sending ...
1
vote
1answer
237 views

Email Bounce Address

I'm having a little issue with my SMTP. I use a plugin WP MAIL to manage the email configurations as it makes it easy to run in/outgoing emails without leaving unsent or stuck mails. Everything is ...
0
votes
1answer
447 views

Is Postfix required for WordPress contact forms in general?

If I remember correctly, I could get data from ContactForm7, for example, into my personal Gmail account, without doing apt-get install postfix -y, though I might be wrong and I did install it. I don'...
1
vote
1answer
1k views

Woocommerce: Prevent sending of email when order is “Completed”

How can I prevent an email being sent when the order is marked as Completed?
0
votes
2answers
1k views

Auto create file and send it via wp_mail()

I am getting dynamic content on page load and sending it via mail using wp_mail(). Right now all contents going in body section of email but I want it to store in .doc(MS word) file and then send that ...
1
vote
2answers
107 views

Generate an Email address from that of the Post Author

In a theme I'm developing I would like to have a button with a mailto: href so that it when a user clicks on it, it generates the email address dependent on the post author. I've managed to get it so ...
0
votes
1answer
778 views

Send default WooCommerce email when switching from custom order status

I have implemented custom order status on-review and now I need to send WooCommerce default on-hold email when switching order statuses from on-review to on-hold. In order to do this, I have to add ...
1
vote
2answers
4k views

How to Change WooCommerce new order email?

I'm new to WooCommerce and I have had a request to make a minor change to the new order email which I have managed to find the template, but I am not sure which line I should change. At the moment ...
1
vote
1answer
143 views

WooCommerce: Email Notifications

How can I append text to the WooCommerce email messages without overriding the existing templates. Ideally I want to add different messages to each email, without overriding the default templates. I'...
1
vote
2answers
106 views

Right practice to edit WP reset password email

Since I'm pretty new to WordPress, I would like to know what is the right way to edit the WP reset password email. I would like to change the message. I see that I need to edit the ...
0
votes
1answer
48 views

What is the way to hook all wordpress email

I have a wordpress site that have plugins: Contact form 7, WP Mail SMTP Plugin by Mail Bank, Spartpost...All of these plugins are able to send out email by anyway (wp_mail, smtp, http api)... I am ...
0
votes
2answers
22 views

Sending email via function in page or setting up the action properly in another page

Questions Assuming that I wanted to put all the code in a custom page like page-contact.php how can I structure my code so I can receive email? the code works in other PHP projects, but getting an ...
0
votes
1answer
320 views

how to add custom reviews button in woocommerce order complete generated mail

this is possible in woocommerce order complete generated mail...? i m Adding a review button in order complete generated mail for review about product ..it means after checkout process then send to ...
0
votes
0answers
32 views

Plugin sending emails to external addresses, not internal

I've set up a website on companyname.co.uk. I understand often a website may not be set up correctly to send emails, however Contact Form 7 is successfully sending emails to info@companyname.co.uk. ...
-2
votes
1answer
21 views

Look for one plugin which could send notification to any email when post publish

when publish one post, I need to send notification to one special email, not admin, not author, not users, just one new email address.
0
votes
0answers
182 views

How to add coupon expiry date into the followup emails?

I have a woocommerce website. On that website, I am using Followup email plugin for sending emails to customers. From the plugin, I send a coupon code to customer by using {coupon_code} Email ...
0
votes
1answer
377 views

Get value from an input field and pass into update_meta_data as $meta_value

I am building a woocommerce site and I have some input fields the on the product page. one is for recipient email (its for a gift car). Everything works, and the recipient email is saved on the order, ...
1
vote
3answers
5k views

How do i send mail with custom Form Data using WordPress

I have a custom HTML form with input types and checkboxes. When I submit this form I want to send a mail will all the form details from the same php. How do I send the email from WordPress? I am ...
0
votes
1answer
1k views

difference between sanitize_email ,FILTER_VALIDATE_EMAIL and input email type in html5

what is the difference between using: HTML 5 <input type="mail"> (it validate user email input without any JavaScript or any other code. 2.PHP filter_var($email, FILTER_SANITIZE_EMAIL); ...
1
vote
1answer
89 views

WordPress unable to send mail

I am unable to get email functioning in WP 4.8. I have WordPress running on a Bitnami LAMP stack. All modules/plugins/themes/languages are up to date. I have an SMTP host that is effectively an ...
0
votes
1answer
38 views

WordPress Emails & Contact Forms [closed]

I have a WordPress website and I am not receiving emails that are being submitted using contact forms. I have tried several contact form plugins, I even tried a custom contact form I coded myself with ...
0
votes
1answer
421 views

woocommerce email template detect email recipient

in woocommerce email template is it possible to detect email recipient example if email recipient is admin or email email@domain.com or if recipient is customer tried if is_admin if is shop ...
1
vote
1answer
112 views

How can I pass get_the_author_meta('user_email') through the REST API?

In my plugin if I hard code an email address in my function with either wp_mail() or mail() I can get my form to work: function email_form($ip_address, $agent, $referrer, $email, $name, $message) { ...
0
votes
0answers
33 views

Cron job emails blank

Was just wondering if anyone could throw some advice my way? I have a site setup on SiteGround and have turned off the internal WordPress cron as this was hitting the server resources fairly hard. I ...
0
votes
1answer
243 views

Error using wp_mail inside custom function

I have this function that sends various emails for me: function tps_send_email($emailTo, $subject, $content) { //Allow HTML in email function tps_set_html_email_content_type() { ...
0
votes
0answers
692 views

WordPress isn't sending welcome email with the password reset

So I have been debugging the code: $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n"; $message .= __('To set your password, visit the following address:') . "\r\n\r\n"; $...
1
vote
1answer
2k views

How can I get users email (and additional data) from the rest API?

How can I get the email adress from the users by using the REST API? I'm authenticating with nonce, and it seems to be working since I can do POST requests and change stuff. Do I have to add something ...
0
votes
0answers
614 views

Correctly configure SPF/DMARC record to work with WordPress

Backstory: I'm currently using WPEngine as my hosting provider, gsuite to host email and aweber for my email lists. Aweber advises me to create an spf record to reduce the potential for being seen as ...
0
votes
1answer
49 views

When admin approves a registered user, I don't want to send a notification email to users

When admin approves/unapproves a user, WordPress automatically sends an email about the change. Here I want to PREVENT it, I DON'T want to send these emails, is there any snippet to add in functions....
0
votes
1answer
73 views

WordPress: Add custom add_filter for custom functions

I am coping with the scenario where I need to filter content of my custom function. My function is used for sending emails but I need to filter it just like wp_mail hook do. Here is my function: ...
1
vote
1answer
60 views

When admin changes a password for a registered user, I don't want to send a password change email to users

I need to change/generate passwords for the registered users, but should not send an email to them regarding this. Admin will tell the password to them later. these members are registered on the old ...
0
votes
1answer
477 views

Wordpress does not send email confirmation to newly registered users

This issue came to my notice when i saw new users trying to reset their password, when I asked them why they're doing this, they told me no email was sent to them after registering on site. My ...
0
votes
0answers
12 views

Change the WordPress from address [duplicate]

I've taken over a site, and have found the from address for the emails (eg password reminders) are coming from the wrong address. How can I change the from address to the correct email? The ...
1
vote
1answer
440 views

Woocommerce HTML email option unavailable

I am attempting to create HTML emails in woocommerce. I currently only have the plain text email option available. I have added the following to functions.php on my theme: function ...