Ojs2.4.8-2, how set email

I want send email by ojs. (Not gmail) Can anybody help me where and how to set mail successful? I am a OJS novice. Please provide me more details about this. I’m looking forward to hearing from you. Thank you very much.

Hi @boluo21,

By default, mail in OJS is sent through PHP’s built-in mail facility.

On Windows PHP needs to be configured to send email through a SMTP server (running either on the same machine or on another machine).

On other platforms such as Linux and Mac OS X, PHP will sent mail using the local sendmail client, so a local MTA such as Sendmail or Postfix must be running and configured to allow outgoing mail.

See http://www.php.net/mail for more details on configuring PHP’s mail functionality.

OJS can also be configured to use an SMTP server as specified in config.inc.php, either with or without authentication.

Best,
Amanda Stevens
Public Knowledge Project Team

Thanks for your promptly reply. It is helpful for me. My server is CentOS7.4, php5.6.37, apache2.4 and OJS 2.4.8-2
Below is my set in config.inc.php:
;;;;;;;;;;;;;;;;;;
; Email Settings ;
;;;;;;;;;;;;;;;;;;

[email]

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

; SMTP server settings
smtp_server = smtp.mxhixxx.com
smtp_port = 25

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

; Enable SMTP authentication
; Supported mechanisms: PLAIN, LOGIN, CRAM-MD5, and DIGEST-MD5
smtp_auth = PLAIN
smtp_username = irl@ideasXXXX.org         
smtp_password = XXXX

Please help me to check it and whether I need change the part in config.TEMPLATE.inc.php as this.

another question is port =465 Is it right below?

smtp_server = ssl://smtp.mxhixxxx.com
smtp_port = 465

Whether I need change defult 25 in config.TEMPLATE.inc.php and SMTPMailer.inc.php to 465?

I want add more email for editors, should i add performatted below in which file?

; Enable SMTP authentication
; Supported mechanisms: PLAIN, LOGIN, CRAM-MD5, and DIGEST-MD5
smtp_auth = PLAIN
smtp_username = irl@ideasXXXX.org         
smtp_password = XXXX

; Enable SMTP authentication
; Supported mechanisms: PLAIN, LOGIN, CRAM-MD5, and DIGEST-MD5
smtp_auth = PLAIN
smtp_username = ier@ideasXXXX.org         
smtp_password = XXXX

Thank you for tolerating my bad English and bad code

Hi @boluo21,

You should have the same port specified in your config file and your SMTPMailler file. Try changing that and seeing if you can send mail. If not, there are some more troubleshooting suggestions here: https://pkp.sfu.ca/wiki/index.php?title=PKP_Frequently_Asked_Questions#Emails_sent_out_by_the_system_are_never_received.

Best,
Amanda Stevens
Public Knowledge Project Team