Support Forum

Newbie editing: sp_email_notifications

25 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

The ‘from’ is set on forum admin > options >email panel.

I explained to you about the use of html email in post 6 of this thread.

If you now have both showing up then I assume you are concatenating your new content onto the original content being passed to your function. You might want to destroy the content being passed in to your function with a $content = ”; as the first statement.

RC Roy Costa
Roy Costa
Member

Thanks – sorry I missed the link on html.  Where is the wp_mail call happening for Simple:Press?  Is there any easy way to change the Subject line? 

MP Mr Papa
Mr Papa
Member

add a new filter on the subject…  use filter ‘sph_email_subject’…

RC Roy Costa
Roy Costa
Member

Thanks – shockingly, I think I figured out how to change the ‘reply to’ by using sph_email_replyto – I presume that’s right?  So I changed the reply-to to be the poster – however, that means if the admin posts, he doesn’t get copied on the post (because I think his email app will see that he is the “reply-to” and thus thinks he’s sending his email and it doesn’t go into the in-box).

So how can I add a “bcc” to an email?

 

RC Roy Costa
Roy Costa
Member

This is what I have – in the sp_functions of my theme

add_filter(‘sph_email_replyto’, ‘my_admin_replyto’, 10, 2);
function my_admin_replyto($replyto, $newpost) {

        $replyto = $newpost[‘posteremail’];

    return $replyto;
}

add_filter(‘sph_email_subject’, ‘roy_email_subject’, 10, 2);
function roy_email_subject($subject, $newpost) {

        $subject = $newpost[’email_prefix’].sp_filter_title_display($newpost[‘topicname’]);

    return $subject;
}

I thought it was working but not anymore – what am I doing wrong?

 

RC Roy Costa
Roy Costa
Member

More info: I thought my_admin_email, my_admin_replyto were arbitrary – they seem to be variables.  So I need to find the right name for the subject line it seems, and my_admin_subject doesn’t seem to do it?

That, and my initial question (how to bcc someone) would be great.  Thanks!

RC Roy Costa
Roy Costa
Member

P.S. (sorry for all the posts) – I don’t think you replied on how to do the breadcrumbs like you have on this forum – going accross with Chevrons, or even just “>” symbols.  Thanks!

MP Mr Papa
Mr Papa
Member

a little confused as to what you are trying to do… so you want replies to go to some other email address than where it came from?

what is email prefix???  its not part of the $newpost array…

to add a bcc, you will need to hook into the wp mail functionality…  we dont make the headers available for editing, but you can via the wp hooks…

see the hook ‘wp_mail’ in which case you can change the headers to add a bcc…  caution, you will get hooked for every email wp sends, so be sure to check that its the email you really want to change…

MP Mr Papa
Mr Papa
Member

breadcrumbs, see:  http://codex.simple-press.com/codex/faq/problem-with-post-edit-buttonow-to/change-breadcrumbs-to-horizontal-rather-than-stagger-down/

or search for our to customize css and images and what not to achieve a look like ours…

RC Roy Costa
Roy Costa
Member

I just decided to (I know it’s not the best way) call wp_mail from within the core file – I’ve made notes so I can re-create the minor changes when I update Simple:Press.  What I was trying to do was change the reply_to among other things – it was just simpler for me to understand this way.

The breadcrumbs change worked – thanks.

One more question (hopefully the last one for a bit) – where in the template or core files are the following done:
1) Unread posts at the bottom of the main forum page – I don’t want to show these for our simple forum

2) The stats at the bottom – again, most of my users won’t need this

Thanks!

MP Mr Papa
Mr Papa
Member

most of the display elements will be in your sp theme… if you dont have one, we strongly urge you to make your own… see:  http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/

you can adjust how things look, remove elements and add elements via your sp theme…

the recent post you can find in the spGroupView.php  template file.. at the bottom…

the stats, since they appear in the bottom of every page, are in template file spFoot.php…