Sending email is not working in ojs 2.4.8

Grettings

I’ve the same problem, but my log error is the following “OJS SMTPMailer: Did not receive expected 250”. The OJS installation is new with only one journal and all have the same email.

Help me please

I have get the same problem with email in OJS 2.4.8 and I have fixed the problem with following ways:

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

; SMTP server settings
> smtp_server = “mail.yourdomain.com
> smtp_port = 26

; 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 = “xxxx@yourdomain.com
> smtp_password = “yourpassword”

For see your port on your domain/website, you can see in Cpanel > Email Account > Mail Client Manual Setting.

Hope this help you.
Thanks.

Hello all,

Is there a way to send individual messages?
We noticed that if there’s one user with wrong email address, the message is not sent to anyone in the list.
This prevents a basic notification of all authors and editorial team, but it’s not really an email problem, it’s how OJS or SMTP handles messaging probably.
We cannot be sure if authors are filling information correctly as coauthors are not actual users.
This “problem” should not prevent using the system and notifying those with correct email address.

When a single email message is sent to multiple recipients, it is typically best practice to treat this as a single entity - it either sends to all, or to none. To change this, you would need to edit the code, probably in the Mail::send() function:

I’d be primarily curious as to how the invalid addresses are getting into the system. I wouldn’t expect the sending to fail with a properly formatted (but wrong) email address, but I would expect the sending to potentially fail with a malformed email address. On the other hand, I wouldn’t expect OJS to allow the input of a malformed email address.

Hello @ctgraham,

The wrong email addresses are mistyped by authors submitting articles. Coauthor emails are wrongly typed and they prevent communication with all authors if one is misspelled.
For example, there was a @gmail.com| typed in… hard to see sometimes… since coauthors are not registered users (at least in OJS 2.x), we are unable to verify this information.
Maybe adding some kind of email verification first would force a metadata check of some sort…

Are you able to reproduce the ability of an author to add a malformed email address (like someone@gmail.com| or address@gmail,com? If so, where specifically is this possible (and what entry did you use)?

I tried this as an author and as an editor in 2.4.8 and was unable to get a malformed email address to save in the metadata.

Hello @ctgraham,

It wasn’t a special character… I looked up the email history and the error was a com @gmail.comj instead of com @gmail.com.

Hmmmm… Interesting. So, it seems that your MTA (Mail Transit Authority) may be doing extra validation of the email domains (or even the whole email address?) in the process of accepting the messages. If the MTA finds an email domain that cannot be routed, it rejects the entire message.

Changing the code to send messages individually might be an option, but the recipient would lose any context of who else received the message and wouldn’t be able to reply-all to the group.

You might check with your SMTP provider whether this can be turned off.

Assuming it the provider cannot or will not turn this off, for an MTA such as yours, you might instead want to validate the domains of email addresses are valid with checkdnsrr():
https://www.php.net/manual/en/function.checkdnsrr.php
Doing this at the time of collecting the email addresses would presumably catch most of the errors. Doing this at the time of sending the message would require deciding what you want to do with the bad addresses.

1 Like

I also have your problem, how did you solve it?