Hi! Help me plz ;( I can’t figure out why the email_log table (in bd) has entries like “Array” user@email.com. Why is “Array” written instead of the name? And prompt please where the file is located which forms this email.
Hi @Eugene.B
Hmmm… What OJS version are you using? Did you make any code changes in your installation? Is the from_address always like this or just for some users and some e-mail templates?
It looks like the name is an array instead of string
Best,
Bozana
Perhaps the code change was because I had to administer a site to another person. OJS Version 3.0.2. I can not find the file that is responsible for this I think that the names in different languages are stored in one array
Please upgrade to 3.1.0-1 since OJS 3.02 had various issues.
Hi @Eugene.B
How do you mean “the names in different languages are stored in one array” ? – In OJS the names are only in one language per default – did you maybe make any changes on that? – That could be the reason.
The function setFrom() here pkp-lib/Mail.inc.php at ojs-3_0_2-0 · pkp/pkp-lib · GitHub expects a name to be a string. You can maybe see where in the code the function is called.
Here, for example, the user->getFullName() is used: pkp-lib/MailTemplate.inc.php at ojs-3_0_2-0 · pkp/pkp-lib · GitHub, and that function is implemented here: pkp-lib/Identity.inc.php at ojs-3_0_2-0 · pkp/pkp-lib · GitHub.
For automatic e-mails usually the context->getSetting('contactName')
is used.
Maybe it is easier to find the place in the code that is wrong by following those e-mail template examples you noticed are wrong…
Best,
Bozana
Thanks for the answer! Could you please tell me how to change the title of the letter?
I beg your pardon. Signature that is at the bottom of the email.
(Sorry for my English )
Hi @Eugene.B
Different e-mail templates have different signature at their bottom, e.g. principalContactSignature, editorialContactSignature or subscriptionContactSignature.
The principalContactSignatureis assigned here pkp-lib/MailTemplate.inc.php at ojs-3_0_2-0 · pkp/pkp-lib · GitHub and the other two are assigned at different places in the code, whenever the e-mail template is called.
The editorialContactSignature is the journal contact i.e. $context->getSetting('contactName')
when the e-mail is send automatically from the system. The journal contact name is entered in Settings > Journal > Contact > Principal Contact > Name and saved in the DB table journal_settings.
Else, if a user sends the e-mail, it is the user contact signature i.e. $user->getContactSignature()
, that is defined/implemented here: pkp-lib/PKPUser.inc.php at ojs-3_0_2-0 · pkp/pkp-lib · GitHub.
Hope that helps…
Best,
Bozana