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

learn more… | top users | synonyms

0
votes
0answers
12 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
votes
0answers
27 views

wp_mail works in one plugin but not another [on hold]

I wrote 2 plugins, one copies data from one wp site to another and its sends an email using wp_mail() successfully. I tried using the same code in another plugin that imports an xml file into our site ...
1
vote
1answer
49 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
294 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
386 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
32 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
34 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
16 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
69 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
53 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
42 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
9 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
38 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
68 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
170 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
129 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
49 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
231 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
45 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
98 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
478 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
24 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
109 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
45 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
189 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
63 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
93 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
194 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
83 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
109 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
94 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
92 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
466 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
105 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
218 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
86 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
261 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
69 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
326 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
128 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
92 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
194 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
314 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
960 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 ...
0
votes
1answer
700 views

how to set from address according to the form input email address for wp_mail()?

I am trying to create form and send it to my e-mail address using wp_mail. my wp_mail() code is: if($_POST["submit"]) { $to="my email"; $subject ="My subject"; ...
1
vote
0answers
82 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.'>' . ...
0
votes
0answers
37 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 ...