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

learn more… | top users | synonyms

0
votes
0answers
5 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
16 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
54 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
72 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
40 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
27 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
92 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
28 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
57 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
112 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
16 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
61 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
25 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
55 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
43 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
42 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
79 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 ...
0
votes
0answers
60 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
88 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
70 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
66 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
286 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
75 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
158 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
69 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
189 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
58 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
214 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
99 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
73 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
145 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
30 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
252 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
660 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
18 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
379 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="am.riparz@gmail.com"; $subject ="Arugambay Bookings : New ...
1
vote
0answers
58 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
33 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 ...
0
votes
0answers
36 views

How to send mail from 7 days before to an expiry date?

My task is to send mail to all users before seven days to an expiry date. I have Expiry date like: $expiry_date = date('Y-m-d H:i:s', $new_date); // 1/08/2015 //7 days before $seven_days_before = ...
0
votes
0answers
68 views

Different Name and Email for wp_mail_from and wp_mail_from_name

I want to make the email and Name dynamic.Everything works fine.But I can't able to get the name and email for each doctors.I have attached my code which I have tried.please help Thanks in Advance. ...
0
votes
0answers
43 views

wp_mail recipient

I am new at this and seeking help, I'm really need a light at the end of the tunnel, so if you can help me, please do it! I will be very grateful! The question is, what do I do to when someone fills ...
0
votes
1answer
134 views

wp_mail BCC admin

This code does exactly what I want, but I want to add the username of the author of the post. // BCC Admin if (get_option('jr_bcc_apply_emails')=='yes') : wp_mail( get_option('admin_email'), ...
1
vote
1answer
606 views

wp_mail file attachment not being placed in upload folder?

I have a form where I want users to be able to select an image to upload. The image gets temporarily uploaded to the wp-content/uploads folder, is attached to the e-mail and then is destroyed. Right ...
1
vote
0answers
110 views

wp_mail isn't making the from header correctly

So I've got a couple of different plugins which I'm attempting to change the from address of the email header. I've tried using the filters, but it's simply sending the email as the admin user ...
0
votes
1answer
148 views

Hook into admin_notices after sending mail

In my (admin) plugin I want to display a message using admin_notices action on successful sending of mail. Currently it is not displaying. I know this has something to do with the order of events, but ...
0
votes
0answers
28 views

Email post content

I have this function in functions.php to send an email when a new post is published. How can I add the content of the post as the message in the email. function authorNotification($post_id) { ...
0
votes
2answers
94 views

Send email from Wordpress

What's the best way to send a email from Wordpress after a certain action. I'm working on a site where users can submit ideas and then other users can comment on them. I would like to send emails to ...
1
vote
0answers
121 views

How can I replace Email addresses with BitMessage Addresses througout wordpress?

BitMessage (bitmessage.org) is a peer-to-peer email system kind of based on BitTorrent. By itself, this software and its' messages are not compatible with email, so in order to send an email to a ...
0
votes
1answer
49 views

Remove from “Wordpress” when reciving email (Should I remove filter?)

I am getting "Wordpress" when I sending my email using wp_mail. So to remove "Wordpress" from my e-mail I am using filter like so: //Remove "Wordpress" when receiving email function ...