OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



office365 SMTP Mail Problem

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

office365 SMTP Mail Problem

Postby tcakmak » Thu Mar 13, 2014 2:50 am

Hi everyone,

I can't configure office365 SMTP settings. I've tried all combinations tls://smtp.office365.com, port 25 smtp_auth = PLAIN, LOGIN, TLS, CRAM-MD5 and DIGEST-MD5 but does not work. What can i do? How configure office365 smtp?

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

; SMTP server settings
smtp_server = "smtp.office365.com"
smtp_port = "587"

; Enable SMTP authentication
; Supported mechanisms: PLAIN, LOGIN, CRAM-MD5, and DIGEST-MD5
smtp_auth = LOGIN
smtp_username = "dergi@ted.org.tr"
smtp_password = "XXXX"

; 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 = "dergi@ted.org.tr"

Regards
tcakmak
 
Posts: 5
Joined: Mon Feb 27, 2012 1:51 pm

Re: office365 SMTP Mail Problem

Postby asmecher » Thu Mar 13, 2014 9:15 am

Hi tcakmak,

What version of OJS are you using?

What does your server support, e.g. unencrypted SMTP, SMTP via TLS, SMTP via SSL, etc., and on what port? See e.g. https://www.fastmail.fm/help/technology ... rttls.html for a description of the different kinds.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: office365 SMTP Mail Problem

Postby tcakmak » Thu Mar 13, 2014 11:04 am

Hi asmecher,

OJS version is 2.4.2. Postfix is installed on server. office365 smtp encryted TLS 587 Port.

Regards
tcakmak
 
Posts: 5
Joined: Mon Feb 27, 2012 1:51 pm

Re: office365 SMTP Mail Problem

Postby asmecher » Thu Mar 13, 2014 11:09 am

Hi tcakmak,

If you have postfix locally and are able to use that, it'll be easier to configure; just turn off "smtp" entirely.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: office365 SMTP Mail Problem

Postby tcakmak » Thu Mar 13, 2014 11:13 am

Hi asmecher,

Server uses postfix. I don't know how to turn off smtp on postfix. Thanks.

Regards.
tcakmak
 
Posts: 5
Joined: Mon Feb 27, 2012 1:51 pm

Re: office365 SMTP Mail Problem

Postby asmecher » Thu Mar 13, 2014 11:48 am

Hi tcakmak,

To get OJS to use Postfix to deliver email, you need to turn off SMTP in the OJS config.inc.php configuration file.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: office365 SMTP Mail Problem

Postby hblancoca » Thu Sep 04, 2014 10:39 am

Hi,
Exist any other way to configure SMTPMailer.php class to support TLS? somelike (viewtopic.php?f=3&t=11086)

Humberto,
Last edited by hblancoca on Thu Sep 04, 2014 11:00 am, edited 1 time in total.
hblancoca
 
Posts: 4
Joined: Sat Mar 29, 2014 11:29 am

Re: office365 SMTP Mail Problem

Postby asmecher » Thu Sep 04, 2014 10:53 am

Hi Humberto,

Yes -- see e.g. this post.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: office365 SMTP Mail Problem

Postby hblancoca » Thu Oct 02, 2014 7:12 am

HI for all,
I reviewed the way that ojs use to send email, and i see that ojs in many cases impersonate the email sending like another user, many institutions do not permit the relay or do not permite impersonate messages because uses mechanism that try to review spf records and tag the emails like spam.
I think that one method can be modify smtp code to send email like the user in configuration file (config.inc.php) and add an field [reply to] with the data of the user that send email.

You know o think in another way to solve that?

Thanks!
hblancoca
 
Posts: 4
Joined: Sat Mar 29, 2014 11:29 am

Re: office365 SMTP Mail Problem

Postby asmecher » Thu Oct 02, 2014 8:55 am

Hi hblancoca,

See the patches and description available in this bug entry.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: office365 SMTP Mail Problem

Postby erajabi » Thu Feb 05, 2015 12:24 pm

Hi all,

I chased this topic and the other similar topics, but still the server does not send email. The config is the following:

smtp = On
smtp_server = "tls://smtp.office365.com"
smtp_port = 587
smtp_auth = "PLAIN"
smtp_username = "******"
smtp_password = "*****"

The server uses TLS and the OJS version is 2.4.2.
Could you please help?

Thanks!
erajabi
 
Posts: 25
Joined: Thu Sep 05, 2013 8:18 am

Re: office365 SMTP Mail Problem

Postby asmecher » Thu Feb 05, 2015 1:59 pm

Hi erajabi,

There are a few changes to the SMTP mail sending code that have been released since OJS 2.4.2, so first I'd suggest upgrading to the most recent release. Unfortunately we can't help debug specific SMTP configurations.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: office365 SMTP Mail Problem

Postby erajabi » Thu Feb 05, 2015 9:13 pm

Hi Alec,

Thanks for your reply.
You mean I should tell the administrator to apply the patch from 2.4.2 to 2.4.5 ?

Regards,
Enayat
erajabi
 
Posts: 25
Joined: Thu Sep 05, 2013 8:18 am

Re: office365 SMTP Mail Problem

Postby asmecher » Thu Feb 05, 2015 11:11 pm

Hi Enayat,

See docs/UPGRADE for complete upgrade instructions.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: office365 SMTP Mail Problem

Postby erajabi » Mon Feb 09, 2015 6:54 am

Hi Alec,

Now the system has been upgraded to 2.4.5, but it still does not send emails. I could catch the error log as follows:

ojs2 has produced an error Message: WARNING: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number In file: /home/USER1/OJS/ojs-2.4.2/lib/pkp/classes/mail/SMTPMailer.inc.php At line: 165 Stacktrace: Server info: OS: Linux PHP Version: 5.3.17 Apache Version: Apache/2.2.29 (Linux/SUSE) DB Driver: mysql DB server version: 5.5.33-log
ojs2 has produced an error Message: WARNING: fsockopen(): Failed to enable crypto In file: /home/USER1/OJS/ojs-2.4.2/lib/pkp/classes/mail/SMTPMailer.inc.php At line: 165 Stacktrace: Server info: OS: Linux PHP Version: 5.3.17 Apache Version: Apache/2.2.29 (Linux/SUSE) DB Driver: mysql DB server version: 5.5.33-log
ojs2 has produced an error Message: WARNING: fsockopen(): unable to connect to tls://smtp.office365.com:587 (Unknown error) In file: /home/USER1/OJS/ojs-2.4.2/lib/pkp/classes/mail/SMTPMailer.inc.php At line: 165 Stacktrace: Server info: OS: Linux PHP Version: 5.3.17 Apache Version: Apache/2.2.29 (Linux/SUSE) DB Driver: mysql DB server version: 5.5.33-log
There was an error sending this email. Please check your PHP error log for more information.


Could you please tell me what is going wrong here?

Code: Select all
smtp = On
smtp_server = tls://smtp.office365.com
smtp_port = 587
smtp_auth = PLAIN
smtp_username = *******
smtp_password = *********


Enayat
erajabi
 
Posts: 25
Joined: Thu Sep 05, 2013 8:18 am

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 6 guests