Add bcc field to mail forms


I am trying to add bcc: field to mail forms (e.g Unassign Reviewer form). I can add input form field in templates, and than find appropriate handler, but I can’t find where form data is passed to mail object.

Also I have found addBcc and setBcc methods in mail class.

Can you give me some hints to make this work?

Hi @Dragoljub_Djordjevic,

The classes that implement email sending/templates (from child class to parent class) are:


The “Unassign Reviewer” form is implemented in lib/pkp/controllers/grid/users/reviewer/form/, which extends lib/pkp/controllers/grid/users/reviewer/form/

You’ll see the actual mapping from one of our objects to the PHPMailer in

Alec Smecher
Public Knowledge Project Team

Made it, thank you :wink:

Hi @Dragoljub_Djordjevic,

Great! If this is something you think would be useful to the community, consider sending back a pull request… This feature has been requested by the community. Add recipient control on email forms · Issue #743 · pkp/pkp-lib · GitHub

Alec Smecher
Public Knowledge Project Team

Well, I think it should be modified to comply ojs standards. I’ll just leave a hint here, for Email reviewer form. Other forms can be easily modified in similar way.

In file lib/pkp/templates/controllers/grid/users/reviewer/form/emailReviewerForm.tpl


<input style = "width: 50%" type="email" name="ccAddress" value="" placeholder="Cc:">
<input style="margin-top: 5px; margin-bottom: 15px; width:50%" type="email" name="bccAddress" value="" placeholder="Bcc:">

after field
(this should be rewritten in smarty style and get rid of inline css)

In file lib/pkp/controllers/grid/users/reviewer/form/
on line 42 modify function readInputData()

function readInputData() {

and in same file, function execute($submission) add


after line

$email->setReplyTo($fromUser->getEmail(), $fromUser->getFullName());

That should be it.