Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 01-06-2017 06:11:30

htw_simon
Member
From: UK
Registered: 11-20-2007
Posts: 83
Website

Mail Configuration

Does V9 support connecting to SMTP mail servers using SSL (TLS). It uses port 587.

I'm getting this error when I try and connect to the server: An error was encountered sending the mail message. Error Information: Invalid response code received from server

Thanks!

Simon

Offline

 

#2 01-06-2017 08:20:13

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19367
Website

Re: Mail Configuration

Yes, you should have no problem doing this, and I assume your config is off somewhat, causing the error.  The best tip I can give you is to take a look at a remote gmail setup and use that as a basis:

https://kryptronic.com/blog/2014/05/sit … mail-smtp/


Nick Hendler

Offline

 

#3 01-06-2017 10:05:50

htw_simon
Member
From: UK
Registered: 11-20-2007
Posts: 83
Website

Re: Mail Configuration

Thanks for the link. I've tried with and without ssl:// but still can't get it to work.

The details I'm using are:

Hostname: ssl://smtp.office365.com
Port: 587 or 25

I've checked the login, so that's correct, plus I can send using a different PHP script and the same details.

Could it be the TLS causing issues?

Offline

 

#4 01-09-2017 08:17:31

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19367
Website

Re: Mail Configuration

Not sure here.  You're saying you can use this without authentication (user/pass)?  Is the test script you're using perhaps appending the URL with tls://?


Nick Hendler

Offline

 

#5 01-10-2017 08:44:50

htw_simon
Member
From: UK
Registered: 11-20-2007
Posts: 83
Website

Re: Mail Configuration

No, you've got to authenticate. I was just checking with another script that I could connect to the server with a similar script. I'm not trying to link that to your system, just use the in-built connection.

Have you tested the connection to Office365 mail servers before?

Offline

 

#6 01-11-2017 07:45:44

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19367
Website

Re: Mail Configuration

Another K9 client is using Microsoft's online service (Office365 is the name, I think) for mail, and it was a huge pain to set up regarding DNS, etc. but they're using sendmail in K9 to send the mail.  For the script that is working, can you turn on a debug and see how it's connecting?  The K9 mail program is leveraging {private}/private/pear/Mail2/smtp.php to send the mail via SMTP.  You can enable debugging in there if you like.


Nick Hendler

Offline

 

#7 01-11-2017 10:06:56

htw_simon
Member
From: UK
Registered: 11-20-2007
Posts: 83
Website

Re: Mail Configuration

Thanks Nick, all fixed now. I turned on the debug to find it was trying to send from the wrong address - it uses the licence email in the config file rather than the site owner email address I think.

For reference the settings to use Office 365 are:

server: smtp.office365.com (No ssl:// prefix)
port: 587

Offline

 

#8 01-12-2017 13:43:33

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19367
Website

Re: Mail Configuration

Thanks for the post back.


Nick Hendler

Offline

 

#9 11-24-2019 11:47:43

Malindo
Member
From: London
Registered: 01-13-2014
Posts: 79
Website

Re: Mail Configuration

Hi could you tell what error is that and how to resolve it? this happened at step 9 of installation process
Script Execution Error
count(): Parameter must be an array or an object that implements Countable
File: /core-private/pear/Mail/MimePart2.php Line: 301 Error Number: 2

Offline

 

#10 11-25-2019 08:56:58

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19367
Website

Re: Mail Configuration

Malindo wrote:

Hi could you tell what error is that and how to resolve it? this happened at step 9 of installation process
Script Execution Error
count(): Parameter must be an array or an object that implements Countable
File: /core-private/pear/Mail/MimePart2.php Line: 301 Error Number: 2

Odd error.  Which PHP version are you running?  Anything odd with the email address or mail server you're using during registration?  Is this a K9 install?


Nick Hendler

Offline

 

#11 11-28-2019 16:31:21

Malindo
Member
From: London
Registered: 01-13-2014
Posts: 79
Website

Re: Mail Configuration

PHP 7.2 (Current)
Nothing wrong with email (office365) or mail server.
Installation_v8 downlooaded 13/11/2019

Offline

 

#12 12-02-2019 09:19:14

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19367
Website

Re: Mail Configuration

Please open a ticket on this.  I believe there is an issue with PEAR::Mail2 and PHP7.2 which we will need to debug and resolve for you.


Nick Hendler

Offline

 

Board footer