New answers tagged email
Thanks guys! I was debugging an contact-form-7 error. This helped me a lot. It appeared that the sender was a (persons) name and not an emailadress, alltough we were using the wpmail() -> mail() it did sent out the mail but reported a false to the CF-7 plugin, showing an error to the visitor who filled in the form.
If and when you are using wp_mail(), then you can just set Reply-To for the $headers parameter. Exemplary usage below: $to = "firstname.lastname@example.org"; $subject = "Using Reply-To with wp_mail"; $message = "This is an example for using Reply-To with wp_mail."; $headers = array( 'Reply-To' => "Name Name <email@example.com>" ); $attachments = ...
you could use this filter: comment_notification_headers for reference: https://core.trac.wordpress.org/browser/tags/4.1/src/wp-includes/pluggable.php#L1434 line: 1434 and 1471
What you need to do is to modify the code that sends the email to the author and in it set the "reply-to" header of the email, pass it as part of the headers parameters to wp-mail. Your code should be something like (adapted from the php mail function documentation). $to = 'firstname.lastname@example.org'; $subject = 'new comment'; $message = 'hello'; $headers = ...
There are many WordPress plugins that let you manage your email subscription. But overall this is not recommended, mainly because it creates a heavy load on the server. What will inevitably create a problem with the hosting service. In my experience, it is advisable to work with professional external services. For various reasons among which I highlight: ...
Top 50 recent answers are included