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

learn more… | top users | synonyms

1
vote
1answer
13 views

wp_mail() is not working in localhost

I'm trying to test wp_mail() in my local. When I var dump wp_mail,I get Boolean false.This is my code $to = "abcd@gmail.com"; $subject = 'my subject'; $message = 'I would like to work ...
0
votes
0answers
30 views

Wp mail does not work when Ajaxed to

I tried to including wp-load, but the wp mail refuses to work when it is called from an ajax hooked function. How can I work around this? Also, on another note, the parameters I sent through AJAX to ...
0
votes
0answers
11 views

Using wp_nonces in email links?

I would love to be able to use nonces in email links (sent out to a list of people via email to subscribe to comment notifications) My idea was to use: $Link = get_site_url() . $url_endpoint . ...
0
votes
1answer
30 views

plugins_loaded action is not working properly

I am trying to send an email to the user after form submission but I get an errorCall to undefined function wp_mail() in C:\xampp\htdocs\wordpress\wp-content\plugins\contact ...
0
votes
0answers
13 views

Change Password URL missing In forgot Password mail

I'm requesting Wordpress for Forgot password. I also got the mail from wordpress site. But the change password url is missing from it. The mail is as below : Someone requested that the password be ...
1
vote
1answer
56 views

On user registration, if welcome mail sent, add post with new user as author

I am trying to create a new post (later will convert it into custom post type), whenever a new user register on the website and if the welcome email was sent succesfully. The problem is that I want to ...
15
votes
2answers
363 views

Sending multipart (text/html) emails via wp_mail() will likely get your domain banned

Summary Because of a bug in WP Core, sending multipart emails (html/text) with wp_mail() (to reduce chance of emails ending up in spam folders) will ironically result with your domain being blocked ...
10
votes
1answer
404 views

Do something after sending email

I want to do something after WordPress sent an email. For example, after sending "Reset Password" email using wp_mail() function.
0
votes
1answer
43 views

How to send an email using wp_mail and using more than one BCC in the header

I have this code part that's responsible for getting the variables from the contact form - and and sending an email to me, and my friends from work. add_action('wp_ajax_nopriv_submit_contact_form', ...
0
votes
0answers
43 views

Welcome email specific to user role

I would like to send an additional welcome email to a specific user role, 'freelancer'. WP would still send its standard welcome email, with login and password, to all user roles. I found the ...
0
votes
0answers
17 views

wpmail in conditional statement in theme template

I am using a theme which uses PostRelations to create courses, lessons and plans. A plan can be set for a certain period such as a month, year etc. The plan expires when this period is over. I am ...
2
votes
1answer
70 views

Comment Email Notification for CPT Comments

I have a WordPress site where users can create new support tickets through submitting a form that posts to a Custom Post Type. I would now like WordPress to email users when there is a comment on the ...
0
votes
1answer
72 views

Sending email to all users

What is the best practice to send an email to a large number of users? I am developing a plugin for the website of an association and one of the things needed is to be able to send an email to all ...
0
votes
1answer
50 views

How to make WordPress emails async

I recently had an issue on my site where emails were failing to send. That was a problem, but the bigger problem was that the failure caused the script to timeout which really put a damper on the user ...
0
votes
0answers
14 views

wp_mail inserting gaps into code at random

Guys I wanted to know if anyone else out there has come across any problems with wp_mail breaking email code. I've noticed it happening in some of my notifications for a while but tended not to ...
0
votes
0answers
43 views

How to stop email from sending when updating and publishing pages not posts

I have a function that sends out emails when a new post is published or updated and is working great until today I realized that it also sends emails when publishing or updating pages whihc is a real ...
2
votes
1answer
72 views

Send an email when custom post type category is changed

This is the first time I've attempted to write an action hook. My CPT has 4 categories. I'm trying to make WP automatically sends an email notification when the category is changed. By change I ...
0
votes
1answer
212 views

wp_mail sending mail twice!

I can't figure out for the life of me why this is sending twice. It's not in any loop, and I have an if statement checking if isset but nothing I do stops it from sending twice. It's a basic form ...
0
votes
1answer
160 views

How to create a CSV on the fly and send as an attachment using wp_mail?

I'm trying to create a CSV file from a form submission and send that file automatically by email to a specific user. The email itself is sending fine, but I can't get the attachment to go through. Is ...
0
votes
0answers
54 views

wp_mail links are dead

I am trying to make a pseudo-newsletter type plugin which will email that authors of certain posts. The email sends the contents of a textarea with some extra text added to the end of it. I've sent ...
0
votes
1answer
268 views

Why wp_mail() function isn't sending any emails and displaying '0' in Chrome 'Network' response

I'm trying to send emails through wordpress using wp_mail() function and it doesn't seem to work. It's displaying 0 in Chrome 'Network' response with Status Code:200 OK this my code part: ...
0
votes
0answers
55 views

wp_mail usage problems

I am trying to include and make use of Wordpress' wp_mail() function within my functions.php file to send email out from a contact form on the front-end. However, no matter what I try I keep getting ...
0
votes
0answers
104 views

Help with contact form

Ok, first of all, this is going to be a huge amount of code. Sorry for that. I am not finding a way to make this contact form on my theme work. Here is the form itself: <!-- Contact Section ...
1
vote
3answers
586 views

Change Default wp_mail From, Without Affecting Gravity Forms

I have a question about changing the default sender From name/email on default wp_mail notifications (e.g., Lost Password response), but WITHOUT it messing up notifications being passed on by Gravity ...
0
votes
0answers
25 views

wp_mail_from: different from address each time

I have a form. Where user gives their name and email address. The I use the custom plugin to send the mail. The requirement is I need to send the mail on behalf of the user who signed. Now in wp_mail ...
1
vote
2answers
127 views

How to send mail to subscribers using wp_mail

I'm just starting out with making plugins and I'm trying to make a simple one that will mail a notification to subcribers whenever i make a new post so far i have add_action( 'publish_post', ...
0
votes
0answers
55 views

Attached file are broken wp_mail

On my local when I use the wp_mail() with attached files it works, but when I'm on prod it doesn't. The file I receive in the email is a .dat file. I read that it's because there is a transmission ...
1
vote
1answer
230 views

Can I configure WordPress to use postfix without a plugin?

I am developing a WordPress site on a vagrant box and have installed postfix in order to test email notifications. At this guest OS (Ubuntu) level, I am able to end a test email: echo "Test mail ...
0
votes
1answer
68 views

wp_mail sending old content from post

I have a wp_mail function that sends out emails everytime a post is posted or updated, however the content that is being sent is always one post behind. So if I update the content the email sends the ...
0
votes
1answer
114 views

How to Configure SMTP on wordpress Cant Send Email

I am Currently working on a project in which my only problem is SENDING an email from site to Gmaill yahoo etc. I want to configure the SMTP so I can make Independent Email Sending. My problem is ...
0
votes
1answer
207 views

wp_mail() won't send mail when it's a variable, only when hard coded

I have coded a "follow post" script to which I wanna add the functionality of sending the user an email if a post they have followed has been updated. My script only sends an email if I hardcode an ...
0
votes
0answers
9 views

Contact form not working in wordpress [duplicate]

I am creating a wordpress theme for my website in which there is a contact form in index.php. For my contact form i am using following code. However, it's not working as expected. It's working fine in ...
1
vote
0answers
88 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
3answers
114 views

Different Webhost and using Google Mail server: Is there a better way than SMTP?

Currently my situation is the following: I am using Wordpress which handles a few things mail related: Registration forms that send a notification and contact form that send a message. However, ...
0
votes
2answers
98 views

What is the most efficient way of implementing a notification system? [closed]

I am about to start implementing a notification system for my site and would like to know what performance measures I need to take into account before developing it. I need to make this for a large ...
0
votes
1answer
100 views

How to send language string in email message body

I am using wp_mail() function to sending email. I have one static string "Hello Admin". My clients wants convert this string to language string. So it possible to convert static string to language ...
2
votes
1answer
528 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 ...
0
votes
0answers
109 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
1answer
237 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 ...
1
vote
0answers
92 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 ...
0
votes
2answers
279 views

Contact form - ajax, wp_mail

I'm trying to create a simple contact form using jQuery to validate the form and AJAX to pass it to PHP and WP wp_mail() to send it. I have a simple form like this. <form role="form"> ...
1
vote
0answers
74 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
1answer
344 views

How to send email in wordpress with more than one attachments

In my plugin, there is a contact us form through which users can upload multiple files and it will be uploaded into wp-contents/uploads/2014/10 folder. Uploading is working, but now I need to send ...
3
votes
2answers
144 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
1answer
98 views

Email Post Attachment on wp_insert_post Action

I have a frontend form that uses wp_insert_post() to programmatically insert posts into the site with "pending" status. I'm also using insert_attachment() to attach the submitted file to the post. ...
0
votes
1answer
207 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
0answers
31 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
1answer
328 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 ...
1
vote
2answers
1k 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 ...
1
vote
0answers
21 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 ...