Email Configration Issue in OJS 3.4.0.3

I’m facing issue to configure email for my journal, I already tried to smtp option to configure but it didn’t work, if I use sendmail option so I recieve emails [via] srv948.main-hosting.eu

[email]

; Default method to send emails
; Available options: sendmail, smtp, log, phpmailer
default = smtp

; Path to the sendmail, -bs argument is for using SMTP protocol
;sendmail_path = “/usr/sbin/sendmail -bs”

; Use SMTP for sending mail instead of mail()
smtp = On

; SMTP server settings
smtp_server = smtp.titan.email
smtp_port = 465

; Enable SMTP authentication
; Supported smtp_auth: ssl, tls (see PHPMailer SMTPSecure)
;smtp_auth = ssl
smtp_username = email@abc.com
smtp_password = password

; Enable suppressing SSL/TLS peer verification by SMTP transports
; Note: this is not recommended for security reasons
;smtp_suppress_cert_check = Off

; Allow envelope sender to be specified
; (may not be possible with some server configurations)
;allow_envelope_sender = Off

; Default envelope sender to use if none is specified elsewhere
;default_envelope_sender = no-reply@icrms.org.pk

; Force the default envelope sender (if present)
; This is useful if setting up a site-wide no-reply address
; The reply-to field will be set with the reply-to or from address.
;force_default_envelope_sender = Off

; Force a DMARC compliant from header (RFC5322.From)
; If any of your users have email addresses in domains not under your control
; you may need to set this to be compliant with DMARC policies published by
; those 3rd party domains.
; Setting this will move the users address into the reply-to field and the
; from field wil be rewritten with the default_envelope_sender.
; To use this you must set force_default_enveloper_sender = On and
; default_envelope_sender must be set to a valid address in a domain you own.
; force_dmarc_compliant_from = Off

; The display name to use with a DMARC compliant from header
; By default the DMARC compliant from will have an empty name but this can
; be changed by adding a text here.
; You can use ‘%n’ to insert the users name from the original from header
; and ‘%s’ to insert the localized sitename.
; dmarc_compliant_from_displayname = ‘%n via %s’

; If enabled, email addresses must be validated before login is possible.
require_validation = Off

; Maximum number of days before an unvalidated account expires and is deleted
validation_timeout = 14

Hi @Barech

If your SMTP server has not been otherwise configured, port 465 is for the SSL communication protocol, so you need to enable SSL by removing the semicolon at the beginning of the line,

In my OJS configuration, I also had to suppress the SSL certificate check by the same way (remove the semicolon and set = On);

Lastly, you may also need to try port 587.

If you do not want your emails to go to the spam box or to be rejected altogether, you also have to adjust DKIM, DMARC and SPF settings.

Regards,

1 Like

I am using office365 SMTP. It is sending all emails with the name as Name via Publisher Name.

Is there any way to get rid of this via Publisher Name?

Hi @esciencepress

The email sender information is configured at that line in the config.inc.php

You may change it according to your needs, or may set to a ‘fixed text’.
Regards,

Hi @drugurkocak thank you. The issue was resolved by changing the value %n via %s. Thank you.

Currently all emails are send from the email address used in the SMTP details and default_envelop_sender which are same;

info@domain.org

I have different journals and each editorial office has seperate email. Is is possible that emails be sent from each journal email. My current email settings are here;

; Default method to send emails
; Available options: sendmail, smtp, log, phpmailer
default = smtp

; Path to the sendmail, -bs argument is for using SMTP protocol
sendmail_path = “/usr/sbin/sendmail -bs”

; Use SMTP for sending mail instead of mail()
smtp = On

; SMTP server settings
smtp_server = smtp.office365.com
smtp_port = 587

; Enable SMTP authentication
; Supported smtp_auth: ssl, tls (see PHPMailer SMTPSecure)
smtp_auth = tls
smtp_username = info@domain.org
smtp_password = password

; Enable suppressing SSL/TLS peer verification by SMTP transports
; Note: this is not recommended for security reasons
smtp_suppress_cert_check = Off

; Allow envelope sender to be specified
; (may not be possible with some server configurations)
allow_envelope_sender = On

; Default envelope sender to use if none is specified elsewhere
default_envelope_sender = info@domain.org

; Force the default envelope sender (if present)
; This is useful if setting up a site-wide no-reply address
; The reply-to field will be set with the reply-to or from address.
force_default_envelope_sender = On

; Force a DMARC compliant from header (RFC5322.From)
; If any of your users have email addresses in domains not under your control
; you may need to set this to be compliant with DMARC policies published by
; those 3rd party domains.
; Setting this will move the users address into the reply-to field and the
; from field wil be rewritten with the default_envelope_sender.
; To use this you must set force_default_enveloper_sender = On and
; default_envelope_sender must be set to a valid address in a domain you own.
force_dmarc_compliant_from = On

; The display name to use with a DMARC compliant from header
; By default the DMARC compliant from will have an empty name but this can
; be changed by adding a text here.
; You can use ‘%n’ to insert the users name from the original from header
; and ‘%s’ to insert the localized sitename.
dmarc_compliant_from_displayname = ‘%n’

; If enabled, email addresses must be validated before login is possible.
require_validation = Off

; Maximum number of days before an unvalidated account expires and is deleted
validation_timeout = 14

1 Like

Hi @esciencepress
I have limited information on server administration, but let me try to explain a little as far as I know.
There is a multifactorial combination of DNS server, SSL certificate, SMTP server (mostly Postfix, Exim, Qmail etc).
If you don’t have a dedicated server for a single domain, (which hosts a single domain) there is a main domain, and other addon domains on your server. In order to fight spam, and increase security, some new technologies was introduced such as DKIM, DMARC and SPF.
A SMTP server needs to be configured as sending emails from a "hostname ", and a “domain”.
Nowadays, if a mail server which is configured as “domain-A.com” tries to sends mails from “domain-B.com” (without DKIM, DMARC and SPF settings) , it is perceived as a spam server, and its ip is immediately added to the email block lists.
So, in my experience, it is best to use a single common email address for the email sender address (actually a domain), and insert the journal specific email address to the “reply to” field.
So the from Name via Publisher Name structure is actually a good solution of the OJS developers.
Regards,

Hi @esciencepress
From what I understand, in your OJS setup, there are multiple journals on one site using different domains. As far as I know, the OJS system currently does not have a plug-in that allows you to use a separate SMTP server for each journal.
Regards,

Thank you @drugurkocak but I have multiple journals on the same domain with different editorial office emails.

Journal-1
Email: journal1@domain-A.com

Journal-2
Email: journal2@domain-A.com

In SMPT, I am using info@domain-A.com.

Now the Sender for both journals is as under

Journal-1 info@domain-A.com
Journal-2 info@domain-A.com

While only reply-to address is different.

Hi @esciencepress
Almost all of the e-mails sent by OJS are for informational purposes. But when one of these messages wants to be answered (via reply button), the email program will put the user’s email address to the “TO” field and it will go to the email address of that user.
As far as I know, this is the current solution :))
Regards,

1 Like

@drugurkocak Thank you :slight_smile:

Hi, I have a STARTTLS error on an SMTP server on port 25

My settings

Config