Use custom prepared Emails

Hi everybody!
I have OJS 2.4.8.0, i need use two different prepared Emails template for “ADD SECTION EDITOR” and “ADD EDITOR” that for these decisions OJS send the same email template. How i can send two different template email for advise those two roles?

I talk about specifically this:
in “Summary”

Thanks for ant help.

Bye
Tiziano

Hi @Tiziano,

You would need to customize the assignEditor function in classes/submission/editor/EditorAction.inc.php.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec! Thanks for advice, but i do not know well customize functions, you talking about of this part of code?

import(‘classes.mail.ArticleMailTemplate’);
$email = new ArticleMailTemplate($editorSubmission, ‘EDITOR_ASSIGN’);
if ($user->getId() === $sectionEditorId || !$email->isEnabled() || ($send && !$email->hasErrors())) {
HookRegistry::call(‘EditorAction::assignEditor’, array(&$editorSubmission, &$sectionEditor, &$isEditor, &$email));
if ($email->isEnabled() && $user->getId() !== $sectionEditorId) {
$email->send($request);
}

I need help for this. Can you explain how i can fix this problem?
Thanks for help.

Bye
Tiziano

Hi @Tiziano,

Yes, at a glance that looks like the right section. However, I can’t guide you through making modifications in detail – you’ll need some PHP experience for this.

Regards,
Alec Smecher
Public Knowledge Project Team