Tagged Questions

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

learn more… | top users | synonyms

0
votes
1answer
15 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
44 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
33 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
62 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
28 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
76 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"> ...
0
votes
0answers
30 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
57 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 ...
1
vote
0answers
26 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
30 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
41 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
22 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
71 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 ...
0
votes
2answers
156 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
11 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
48 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
35 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
20 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
26 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
47 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
34 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
101 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
267 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
61 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
72 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
20 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
78 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 ...
0
votes
0answers
63 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
40 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 ...
1
vote
1answer
115 views

Unable to override pluggable function wp_mail

A couple of days ago, my wordpress blog hosted on openshift suddenly stopped sending me mails and notifications. Until now I'd never bothered how wordpress handled mail sending since they always ...
0
votes
1answer
142 views

html mail sended with wp_mail shows plain

I have a invoice.html that i want to send i use the following function to replace some things in the html foreach($variables as $key => $value){ $template = str_replace('{{ '.$key.' }}', ...
0
votes
2answers
498 views

wp_mail attachment not working

Hello I am trying to send mail with some attachment using with wordpress wp_mail functionality but I am not getting attachment in my mailbox. Can you please check my bellow code and guide me where I ...
0
votes
1answer
105 views

Wp_Mail and Contact Form 7

I have a problem. I've used add_filter('wp_mail_from', 'new_mail_from'); add_filter('wp_mail_from_name', 'new_mail_from_name'); function new_mail_from($old) { return 'contact@mysite.hk'; } ...
1
vote
1answer
73 views

Mail function is not working

My mail function is not working. When I submit form it says mail sent. But not receiving. I tried echo if the mail sent. It is also working. What is the issue here? Anything with mail function ? ...
1
vote
0answers
47 views

Using wp_schedule_event to send emails including links

I'm trying to write a simple plugin using wp_schedule_event to send emails. The first example below works fine, but in the second (where I try to include a url within the email) nothing happens. Why? ...
1
vote
0answers
56 views

Trying to get author'email for sending email from single.php page in wordpress?

I am trying to get author's email in order to send a email form single.php page in WordPress. Actually I would like to get output in quotes in order to send email with wp_mail function. Right?? Here ...
0
votes
0answers
49 views

wp_trash_post retrashes already trashed comments?

I have a few mail- and update_user_meta functions that fires when a post, comment or child comment gets thrashed. So when I trash a comment with trash_comment, a mail get sent to the author: "Hey, ...
0
votes
1answer
80 views

Add a hook to wp_mail() to track Google Analytics Event

I hope you'll be able to help me on this one: I'm trying to trigger a GA event for every email sent via a Wordpress site. My idea was to add the following code to my child theme's functions.php ...
0
votes
1answer
691 views

Custom Contact Form Not Sending (but not giving error)

hope things are going well. I'm attempting to add a custom contact form to a section of home page. I came across a custom contact form at https://gist.github.com/hansspiess/6815875. I implemented the ...
0
votes
1answer
343 views

Only single mail function is working from double mail functions one after another on wordpress

I am having a html form in my wordpress page and i have call action on my form. The file which is calling an action is saved in the root of wordpress directory. sending-mail.php I have two mail ...
0
votes
1answer
156 views

send email to all registered users when post expires

I have a function which, when a post is published inside a CPT after three days the page is redirected to another URL/PERMALINK. This is the code: add_action('template_redirect', ...
0
votes
2answers
2k views

wp_mail() is not working on server

i am breaking my head from last 1 hour but not getting any idea that what's going wrong with my code... i am developing my own plugin and i am using wp_mail() function for sending mail in that but ...
0
votes
1answer
111 views

upload file with front-end submission and forward the data in an email

I have an email set up using wp_mail that forwards my front-end submission data as well as posting it to the dashboard. The part that I am having trouble with is forwarding the attachment file with ...
0
votes
2answers
803 views

wp_mail recipient array not sending?

I am using wp_mail to send an email to multiple recipients. my mail function looks like this: wp_mail($group_emails, 'my subject', 'my message', $headers); $group_emails is an array of email ...
0
votes
0answers
440 views

Problem using wp_mail function

I have a form whose message is composed from multiple input fields when submitted. I got this form working as simple php document but when I'm trying to use the form within a wordpress page it doesn't ...
0
votes
1answer
896 views

Reset Password - change from name and email address

When the password reset goes out, the name is 'WordPress' and the from address is wordpress@domain.com. I need to change these to the company name. I'm running WordPress 3.8 multisite and have done ...
0
votes
0answers
37 views

how to invoke mail with additional parameters

My mailserver doesn't send me WordPress notifications. My hoster says that to have the php function mail(,,,,) working I need to set the fifth parameter (additional parameter) equal to -f ...
0
votes
1answer
117 views

How can I format email notification after registration?

I saw already this answer. And it helped me to make unique mail. It's great. But how to format some text using HTML? For example to work with tags <b> <i> <font color="red"> ...
0
votes
1answer
965 views

File upload from front-end form (as attachment) not working

I have a front-end form that is supposed to allow the user to upload a CV which is then sent along with the rest of the form as an attachment. To do so I have used wp_handle_upload() like so: if ...
0
votes
1answer
247 views

WooCommerce wp_mail attachment not working dynamically

I have edited function send() to attach the file in woo commerce plugin when, I am use the attachment file path statically it work's but when, I put it on dynamically attachment source not able send ...