problem in ojs 2.4.8: the application is sending e-mail with the sender’s name with the same addressee.
I found that the code MailTemplate.inc had some changes from the previous one. As shown below:
version 2.4.8
function send ($ clearAttachments = true) {
if (isset ($ this-> journal)) {
// If {$ templateSignature} and / or {$ templateHeader}
// Exist in the body of the message, replace with Them
// The journal signature; otherwise just pre / append
// Them. This is here to accomodate MIME-encoded
// Messages or other cases where the signature can not
// Just be appended.
$ Header = $ this-> Journal-> GetSetting ( ‘emailHeader’);
if (strstr ($ this-> getBody () ‘{$ templateHeader}’) === false) {
$ This-> setBody ($ header “\ n” $ this-> getBody ()…);
} Else {
$ This-> setBody (str_replace ( ‘{$ templateHeader}’, $ header, $ this-> getBody ()));
}
$ Signature = $ this-> Journal-> GetSetting ( ‘emailSignature’);
if (strstr ($ this-> getBody () ‘{$ templateSignature}’) === false) {
$ This-> setBody ($ this-> getBody () “\ n” $ signature…);
} Else {
$ This-> setBody (str_replace ( ‘{$ templateSignature}’, $ signature, $ this-> getBody ()));
}
version 2.4.4_1
function send ($ clearAttachments = true) {
if (isset ($ this-> journal)) {
// If {$ templateSignature} exists in the body of the
// Message, replace it with the journal signature;
// Otherwise just append it. This is here to
// Accomodate MIME-encoded messages or other cases
// Where the signature can not just be appended.
$ SearchString = ‘{$ templateSignature}’;
if (strstr ($ this-> getBody (), $ searchString) === false) {
$ This-> setBody (… $ This-> getBody () “\ n” $ this-> Journal-> GetSetting ( ‘emailSignature’));
} Else {
$ This-> setBody (str_replace ($ searchString, $ this-> Journal-> GetSetting ( ‘emailSignature’), $ this-> getBody ()));
}
$ EnvelopeSender = $ this-> Journal-> GetSetting ( ‘envelopeSender’);
if (empty ($ envelopeSender) && Config :: getVar ( ‘email’, ‘allow_envelope_sender!’)) $ this-> setEnvelopeSender ($ envelopeSender);
}
return parent :: send ($ clearAttachments);
}
}
I wonder if replacing the changes in version 2.4.8 by 2.4.4_1 this can solve the problem?