Support Forum
And I should add - I don't have any other functions that would conflict, as far as I know. I also tried changing the code to use my specific personal email and that didn't work either...
add_filter('sph_email_replyto', 'my_reply_to', 99, 2); function my_reply_to($reply, $newpost) { $reply = 'MY OWN EMAIL'; return $reply; }
Visit Cruise Talk Central and Mr Papa's World
re filter and other plugins... oh, okay, I thought you were using our html email plugin based on a different topic... which uses the same filter as does a couple of our other plugins...
Visit Cruise Talk Central and Mr Papa's World
I dug into this a bit more - that is, what are wp and sp actually doing here.. and despite the name, we/they are not really updating the reply-to header for emails... what is actually being done is updating the from email address...
so, if code all correct, then its possible that your host is rejecting an email that is not from your server domain...
I have opened up an enhancement ticket to see if we can actually work with wp to adjust the reply-to header of emails rather than the from address...
Visit Cruise Talk Central and Mr Papa's World
If this is indeed your problem, you might try getting around it this way:
add_filter('sph_admin_email_addresses', 'my_add_replyto_filter'); function my_add_replyto_filter($dummy) { add_filter('wp_mail', 'my_replyto'); return $dummy; } add_filter('sph_new_post_notifications', 'my_remove_replyto_filter'); function my_remove_replyto_filter($dummy) { remove_filter('wp_mail', 'my_replyto'); return $dummy; } function my_replyto($atts) { $atts['headers'] = 'email@domain.com'; return $atts; }
this would add a new filter to the wp mail arguments when we are getting ready to send post notifications.. this filter would modify the wp headers to add the reply-to header... the third filter then removes the wp mail filter when we are done sneding notifications...
have to say, untested... 🙂
Visit Cruise Talk Central and Mr Papa's World
actually, you wanted the poster, so maybe this hacky fix...
add_filter('sph_admin_email_addresses', 'my_add_replyto_filter'); function my_add_replyto_filter($dummy) { add_filter('wp_mail', 'my_replyto'); return $dummy; } add_filter('sph_new_post_notifications', 'my_remove_replyto_filter'); function my_remove_replyto_filter($dummy) { remove_filter('wp_mail', 'my_replyto'); return $dummy; } function my_replyto($atts) { global $spGlobals; $atts['headers'][] = 'reply-to: '.$spGlobals['replyToAddress']; return $atts; } add_filter('sph_email_replyto', 'my_reply_to', 99, 2); function my_reply_to($reply, $newpost) { global $spGlobals; $spGlobals['replyToAddress'] = $newpost['posteremail']; return $reply; }
still untested
Visit Cruise Talk Central and Mr Papa's World
please be sure to check my last.. I did a couple of edits about the same time you posted...
Visit Cruise Talk Central and Mr Papa's World
are you sure it was my latest? the one with reply-to: as a string?
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)