Email is not sent through OJS 3.0.2

Hello,

I have configured smtp settings in config.php file. The details are as follows:

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

[email]

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

; SMTP server settings
smtp_server = smtp.gmail.com
smtp_port = 465

; Enable SMTP authentication
Supported mechanisms: ssl, tls
smtp_auth = ssl
smtp_username = *******@gmail.com
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 = ********@gmail.com

; 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

; 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

However, I neither can send email nor do I receive notification when a manuscript is uploaded or any other activity

Hi @joapreditor

As you are using Gmail SMTP you will need enable in google account an option for use this account which you want send emails with OJS.

Please se here a explanation how to to it:
https://productforums.google.com/forum/#!topic/gmail/7H9YBmiT1iQ;context-place=forum/gmail

Regards,
Israel Cefrin
Public Knowledge Project Team

hello @israel.cefrin,
thanks for your suggestion and help. I have enabled the option discussed in the link provided by you in my google account.

Still, I cannot send email through OJS and receive the same

Regards,

Hi @joapreditor

Have you checked your mail log error file? It may shows you what is happening when OJS attempts send emails.

Regards,
Israel Cefrin
Public Knowledge Project Team

hello @israel.cefrin

Thanks for your assistance. Please tell me where can I find email error log.

Regards,

Hi @joapreditor

The default location depends on your linux/unix system, but the most common places are

  • /var/log/maillog
  • /var/log/mail.log
  • /var/adm/maillog
  • /var/adm/syslog/mail.log

Regards,
Israel Cefrin
Public Knowledge Project Team

hello @israel.cefrin
Sorry for late reply. this is the log provided by my service provider. Will this work

2018-03-27 04:31:27 1f0gGd-000N0G-Et <= editor@japtronline.com H=(SanjibBahadur) [103.197.132.14]:49558 P=esmtp S=640 T=“Microsoft Office Outlook Test Message” for editor@japtronline.com
2018-03-27 04:31:27 1f0gGd-000N0G-Et => editor editor@japtronline.com R=virtual_user T=dovecot_virtual_delivery C=“250 2.0.0 editor@japtronline.com mF3RMx/JuVrDqQAAt9SE/g Saved”
2018-03-27 04:44:04 1f0gSq-000cbJ-G4 <= editor@japtronline.com H=(SanjibBahadur) [103.197.132.14]:49621 P=esmtp S=640 T=“Microsoft Office Outlook Test Message” for editor@japtronline.com
2018-03-27 04:44:04 1f0gSq-000cbJ-G4 => editor editor@japtronline.com R=virtual_user T=dovecot_virtual_delivery C=“250 2.0.0 editor@japtronline.com WJfLNRTMuVo7MQIAt9SE/g Saved”
2018-03-27 04:47:13 1f0gVq-000fSn-SW <= japr.editor@gmail.com H=mail-it0-f51.google.com [209.85.214.51]:36373 P=esmtps X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no S=5207 id=CAOLGsCXNw3OxLcgMhrj+iMiiqWRwBkG4_O6RR20H4ApsV==9PA@mail.gmail.com T=“test email” for editor@japtronline.com
2018-03-27 04:47:13 1f0gVq-000fSn-SW => editor editor@japtronline.com R=virtual_user T=dovecot_virtual_delivery C=“250 2.0.0 editor@japtronline.com 0ErHGNHMuVrWcwEAt9SE/g Saved”
2018-03-27 04:47:34 SMTP call from [103.197.132.14]:49699 dropped: too many syntax or protocol errors (last command was “?2?8?\023?\004\001??-\377\001?\001???\024?\022??\017japtronline.com?”)
2018-03-27 04:47:45 1f0gWO-000goA-U7 <= editor@japtronline.com H=(SanjibBahadur) [103.197.132.14]:49712 P=esmtpsa X=TLSv1:AES128-SHA:128 CV=no A=dovecot_login:editor@japtronline.com S=666 T=“Microsoft Office Outlook Test Message” for editor@japtronline.com
2018-03-27 04:47:45 1f0gWO-000goA-U7 => editor editor@japtronline.com R=virtual_user T=dovecot_virtual_delivery C=“250 2.0.0 editor@japtronline.com AIKoEfHMuVp48wAAt9SE/g Saved”
2018-03-27 05:21:07 1f0h2g-000QOy-W7 <= editor@japtronline.com H=(strom.xdnscloud.com) [::1]:47634 P=esmtpa A=dovecot_login:editor@japtronline.com S=653 id=6f826a8e8c7a5a82ce0210e5ece71bb1@japtronline.com T=“mail from support” for we3carestech@gmail.com
2018-03-27 05:21:07 1f0h2g-000QOy-W7 Sender identification U=japtronl D=japtronline.com S=editor@japtronline.com
2018-03-27 05:21:07 1f0h2g-000QOy-W7 SMTP connection outbound 1522128067 1f0h2g-000QOy-W7 japtronline.com we3carestech@gmail.com
2018-03-27 05:23:39 1f0h58-000SIK-1s <= we3carestech@gmail.com H=mail-qt0-f175.google.com [209.85.216.175]:37961 P=esmtps X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no S=4892 id=CAOGc6fhwrrdFVO-hUwnb8w4Detno0=7AYLCP-eKoeeDPNbyfHg@mail.gmail.com T=“Re: mail from support” for editor@japtronline.com
2018-03-27 05:23:39 1f0h58-000SIK-1s => editor editor@japtronline.com R=virtual_user T=dovecot_virtual_delivery C=“250 2.0.0 editor@japtronline.com eHtVG1vVuVpVfAEAt9SE/g Saved”

This is new configuration that I have done in my config.inc.php file
; Use SMTP for sending mail instead of mail()
smtp = On

; SMTP server settings
smtp_server = mail.japtronline.com
smtp_port = 25

; Enable SMTP authentication
Supported mechanisms: ssl, tls
smtp_auth = true
smtp_username = editor@japtronline.com
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 = japr.editor@gmail.com

; 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

; 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

Thanks & regards,

Hi @joapreditor

Please, don’t post passwords on this forum, it is unsafe. I removed from your message but would it be safer if you could change it.

By the way, yout SMTP auth mode is set with TRUE value when it should be ssl or tls. I will quote your log part related to it:

Also, include a comment signal (:wink: on beginning of “Supported mechanisms: ssl, tls”, because it is just an instruction.

Regards,
Israel Cefrin
Public Knowledge Project Team

Hello @israel.cefrin
Still not working. I have changed auth from true to ssl. Please help

Regards,

Hi @joapreditor

Have you checked with your IT staff SMTP port is right?
Please check also mail logs and see what is output as message when you attempt send messages through this server.

Regards,
Israel Cefrin
Public Knowledge Project Team

Hi @israel.cefrin,
Solved the issue of email. Following is the setting that I followed

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

[email]

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

; SMTP server settings
smtp_server = mail.mydomain.com
smtp_port = 587

; Enable SMTP authentication
Supported mechanisms: ssl, tls
smtp_auth = None
smtp_username = email@mydomain.com
smtp_password = YourPassword

; 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 = email@mydomain.com

; 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 = 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

Few things are to kept in mind.

  1. Though my domain is using ssl certificate, I have selected “smtp_auth = None”. Case of None is very case sensitive. NONE or none do not work only None will do.
  2. I have selected port of Tsl i.e. 587. 465 or 25 or any other port didn’t work

Hope others facing the same issue can reply applying these changes

3 Likes