Hello.
I installed two OJS3.1 systems for different purposes (different companies, domains and emails) on one server, one of them does not send emails.
I do not know if this works.
Please advise.
Thank you very much.
I received errors “SMTP connect() failed.”, “SMTP: data not accepted” while try email sending.
Hi @mujiec,
If you’re sure the config.inc.php
email configuration area is the same in both installs, then I’d suggest checking your mail server’s logs to see why some messages are being rejected.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi,
I have problem with email on OJS 3 too. Been reading some of the related thread in the forum but couldn’t find cases like mine (or I just don’t understand the discussion).
We migrated our journal to a new machine and upgraded from 2.3.7 to 2.4.8 and then to 3.1.1-2. The mail system was working fine in the old machine and version 2.3.7. My email setting is as below:
; Use SMTP for sending mail instead of mail()
smtp = On
; SMTP server settings
smtp_server = 172.16.3.228
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 =
; smtp_username =
; smtp_password =
; 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 = my_address@my_host.com
; 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 OJS.
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
The setup was the same as in the old machine. We are using the university’s mail server. Every time I tried to send email through OJS, I will get SMTP connect() failed
in the PHP error log.
I contacted the IT Dept regarding my problem, they said that they have set to allow my IP in the relay SMTP server. I pinged the IP, no problem. Used telnet with the IP and port, no problem.
Tried changing to google SMTP, same error message. But I did receive an email from google stating that they blocked a sign-in attempt on my account.
I am stucked now. I have no idea what else should I try. Any advice on things I should try or ask my IT department?
Thanks.
-Aiman-
It can happen that your server/address is for some reason blocked by spam filters. However, it is useful to check do you have properly set DKIM on your server.
Hi @blstzus
And what about authentication mechanism? I believe you university mail server has one.
Also I’d check mail logs
Hi @Vitaliy, No authentication required. In the old machine, no authentications too. Asked my IT dept, they said not needed too.
I forgot to mention my machine setup.
Old machine hosts OJS 2.3.7 running ubuntu 10.04.
New machine currently hosting OJS 3.1.1 running ubuntu 18.04, apache2.4.29, PHP5.6.37.
Any additional advice?
Sorry, I am not really good when it comes to servers stuffs.
When you say check mail logs, where should I check? In my machine or in the SMTP server?
Thanks.
If the entered data for connection is correct, your connection attempts should be logged on the server-side (the one, where mail-server is configured). The path to it depends on the server’s operating system. I suppose the lines of interest are those from MTA. The default log location on Ubuntu is /var/log/mail.log
.
Also, I suggest you to check troubleshooting page for PHPMailer.
Vitaliy,
Thanks for the suggestions. I will talk to the IT Department.
For the meantime, do you think that since I receive an email from google that a login was blocked by them (the moment I change the server to gmail) means that the PHPMailer is working fine?
Thanks
Probably yes, working fine. And I’ve never encountered any problems with PHPMailer before.