Good way to change the sender email address

Dear @ajnyga,
sorry for taking so long to check, but it’s not me who touch the codes. The answer is no, in that line we have a simple
return ;
is that the problem? Should we test with return true ?
As far as I know, we did not change that file, only the UseGlobalSenderPlugin.inc.php …

Thanks,
Bogi

yeah, that is probably the reason. See my post above Good way to change the sender email address - #5 by ajnyga the plugin only behaves with the current master branch of mail.inc.php file. It uses things that are not available in for example 3.1.1.4.

That line looks like this now https://github.com/pkp/pkp-lib/blob/master/classes/mail/Mail.inc.php#L463
Also there are other changes in that file.

1 Like

Ok, sorry, I did not know this.

How can we install that master branch mail.inc.php ? Just download that file and put it in the old one’s place? Is there anything else to change?

Thanks in advance!

Hi,

Basically just replace the file. But note that I tested that back in December. have not checked if there are any other recent changes to that file. I would advice you test it first carefully.

Btw this is coming as a feature to the next release of OJS, or at least it is planned. So you could just wait for a couple of weeks…

Thanks. In that case, we might prefer to wait, because we are not too good with testing, and we have no test version to play with. When the new version is planned to be made available?

Concerning testing, we always have the problem that the administrators do not want to make a copy of the system and test on that because they don’t want to enable the mail system on the test OJS. Do you know how to set a fake mail system so we could check the emails of OJS without actually sending them?

Thanks again,
Bogi

it is as return true in my file (added it), but still the journal sends two emails instead of one (one from the plugin and one from the original way). I can assure that cos I myself tried doing it and got two emails.
Secondly, one email had sender as global and other one as usual the editors email id himself. I am using OJS 3.1.1.4

The feature is in the forthcoming OJS 3.1.2 that should be out soon, I suggest that you wait for that. I have not got the time to debug the plugin right now and do not have need either in our own installation. I just added the changes directly to the core files myself.

Dear @ajnyga,

we have upgraded our test server to OJS 3.1.2, but we do not see this option to use global sender. Could you show me where can it be set?

Thanks in advance,
Bogi

we have not upgraded to 3.1.2 yet, but see the new config options from the config.TEMPLATE.inc.php file: ojs/config.TEMPLATE.inc.php at stable-3_1_2 · pkp/ojs · GitHub

Thanks you, it works now! :slight_smile:
Is it possible to put a cc or bcc field system-wild? It would be nice for a backup for the Journal Managers to see all the emails without root access and sql queries…

Thanks,
Bogi