Emails not being sent - Open Conference Systems (OCS)

Dear all

We are using Open Conference Systems 2.3.6.0 and we managed to install it and everything works well. However, no emails can be sent out. Do you perhaps now what might be wrong or where email settings can be changed?

Thank you.

Kind regards
Jako

Hi Jako,

Is there anything in your server’s mail log? You may need to ask your system administrator. Otherwise, what are your email settings in your OCS config.inc.php file? Please do not post any valid user credentials.

Best
Jason

Jason

I used the following. I have checked with the system administrator everything is fine on their side and the settings seem in order for them.

See the config.inc.php settings below.

Kind regards
Jako

;;;;;;;;;;;;;;;;;;
; Email Settings ;
;;;;;;;;;;;;;;;;;;

[email]

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

; SMTP server settings
smtp_server = mail..com
smtp_port = 465

; Enable SMTP authentication
; Supported mechanisms: PLAIN, LOGIN, CRAM-MD5, and DIGEST-MD5
smtp_auth = PLAIN
smtp_username = “@”
smtp_password = “”

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

; Enable attachments in the various “Send Email” pages.
; (Disabling here will not disable attachments on features that
; require them, e.g. attachment-based reviews)
enable_attachments = On

; Amount of time required between attempts to send non-editorial emails
; in seconds. This can be used to help prevent email relaying via OCS.
time_between_emails = 3600

; Maximum number of recipients that can be included in a single email
; (either as To:, Cc:, or Bcc: addresses) for a non-priveleged user
max_recipients = 10

; 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 @Jako_Olivier

I already see a typo in your SMTP server value. You’ve got two periods in the domain name.

If “mail.com” really is the SMP server you should be using (that sounds a little vague to me - that’s doesn’t sound like a mail server), they probably have documentation to guide you.

Cheers,
Jason

Jason, that happened because I removed the actual server name with the word “[ r e m o v e ]” (without spaces in my case) and this interface decided to actually remove the text. So the server is correct on my side. According to the server administrator everything is working on their side and the details are correct. Something must be wrong either with OCS or my settings.

Hi @Jako_Olivier

So, if you’re using SMTP to send mail, there’s probably nothing in your server logs that your system administrator can see, because PHP will try to make the connection from the code directly to the other mail server. You could probably add some debugging statements to the OCS mailer code so there are things in Apache’s error log, or at least verify that you are in fact able to connect to the other mail server on the appropriate port to start with.

OCS 2.3.6 is so old I’m not entirely sure what else to suggest beyond looking at the SMTP documentation for the mail server you are trying to use. They may not allow PLAIN authentication, for example.

Best
Jason

Thank you very much. Any recommendations on what code could be used?

Kind regards
Jako

Hi Jako,

Code for what, exactly? I’m not sure I understand your question.

Cheers,
Jason

You mentioned “debugging statements” in your previous comments. Any ideas?

Well, if you’ve a developer handy you can use the error_log() PHP method in the lib/pkp/classes/mail/SMTPMailer.inc.php class file and pepper the file with debugging statements. Messages output through error_log will end up in Apache’s error log. The obvious place in that file is the mail() and connect() functions which do most of the heavy lifting.

Cheers,
Jason

I seem to be getting this error in the error log:

[Wed May 12 05:13:46 2021] [error] mod_fcgid: stderr: OJS SMTPMailer: Did not receive expected 250 or 251

Is this perhaps the same issue as noted here: fix test for null reply-to address by jnugent · Pull Request #1182 · pkp/pkp-lib · GitHub ? How can one add that patch?

Thank you.

Don’t worry - I solved the problem using a Gmail address in the end.