MailConnect returns Error 05


John Dowbiggin
 

Hi All

 

I am adding some email functionality to an app in UniPaas 1.9i and all has been going fine and my apps have been sending emails with attachments as they should.  Then, suddenly, for no apparent reason, my MailConnect is timing out and returning error code -5.

 

I;ve tried, rebooting laptop, router to no avail.

 

What does error -5 mean and what is a possible solution.

 

I haven’t changed and mail settings because they are all set in logical names.

 

Regards

 

John


Steven Blank
 

John,

I've no experience with the MailConnect() function, nor with any of uniPaaS' built-in email functions. That said, I noticed a function MailError() that appears to me to be a good first step, that is, pass that (-5) error code to MailError() and reap a returned string message that may (or may not) assist in your diagnosis.

Steven G. Blank
SGBlank Consulting


On 4/30/2022 9:17 AM, John Dowbiggin wrote:

Hi All

 

I am adding some email functionality to an app in UniPaas 1.9i and all has been going fine and my apps have been sending emails with attachments as they should.  Then, suddenly, for no apparent reason, my MailConnect is timing out and returning error code -5.

 

I;ve tried, rebooting laptop, router to no avail.

 

What does error -5 mean and what is a possible solution.

 

I haven’t changed and mail settings because they are all set in logical names.

 

Regards

 

John



John Dowbiggin
 

Hi Steve

 

I have actually built in MailError to the routine and it tells me that error – 5 is server timed out.

 

Using the example in Online Samples, I tried and succession of things:

1: Left Mail Server blank – got Error Code – 5 Connection Timed Out

2: Put in spurious Mail Server. If I pit in a valid format address I get error -5, but if I just put in any old string I get ‘The address is not valid’ with error code -100

3: Put in correct server address without port leave user blank and get ‘There was no response from the server’ error code -12

4:Put in correct server address and username, leave password blank, get ‘There was no response from the server ‘ error code -12

5: Correct Server and username but incorrect password, get ‘The password is invalid’ Error code -41

6: Put in all entries correct, get ‘There was no response from the server’ Error Code -12.  NB Yester day this was giving error code -5!

7: Tried appending ports :25 and :26 to end of server, got errors -12 and -5 repectively.

 

Sorry I’ve been so laborious but I’m trying to forestall Have you tried…. Questions.

 

Bear in mind this was working 2 days ago, has anyone got any suggestions.

 

I’m going to connect the service provider to see if they have changed anything

 

Regards

 

John

 

From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Steven Blank
Sent: 30 April 2022 21:45
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] MailConnect returns Error 05

 

John,

I've no experience with the MailConnect() function, nor with any of uniPaaS' built-in email functions. That said, I noticed a function MailError() that appears to me to be a good first step, that is, pass that (-5) error code to MailError() and reap a returned string message that may (or may not) assist in your diagnosis.

Steven G. Blank

SGBlank Consulting

On 4/30/2022 9:17 AM, John Dowbiggin wrote:

Hi All

 

I am adding some email functionality to an app in UniPaas 1.9i and all has been going fine and my apps have been sending emails with attachments as they should.  Then, suddenly, for no apparent reason, my MailConnect is timing out and returning error code -5.

 

I;ve tried, rebooting laptop, router to no avail.

 

What does error -5 mean and what is a possible solution.

 

I haven’t changed and mail settings because they are all set in logical names.

 

Regards

 

John

 


Charles Coe
 

John,
I've seen similar behavior with email from email providers.  Has your provider disabled basic authentication?  

Based on your comment on using port 25 and 26, my best guess would be your email service is now blocking these ports.  Most I work with have forced move to TLS 1.2 at a minimum.

Try using ports 587 (which is default TLS) or 465 - but your connection will need to use TLS - and I don't think UP1.9 supports TLS 1.2 best I can recall. 

Another thing you can try is a command line utility called SWithMail (tbare.com - free).  I've used it to sort out these kind of issues outside of magic to figure out what was wrong.
Good luck,
Charles

--
Charles Coe, CPA, MCSE

New Orleans, Louisiana


John Dowbiggin
 

Hi Charles

 

I tried all the ports you suggested, assuming the way you specify the port is MailConnect(1,mail.dowbiggin.net:465.john@...,password) amd no more success.

 

I will try the SWithmail route tomorrow.

 

RegaRDS

 

John

 

From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Charles Coe via groups.io
Sent: 01 May 2022 23:00
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] MailConnect returns Error 05

 

John,
I've seen similar behavior with email from email providers.  Has your provider disabled basic authentication?  

Based on your comment on using port 25 and 26, my best guess would be your email service is now blocking these ports.  Most I work with have forced move to TLS 1.2 at a minimum.

Try using ports 587 (which is default TLS) or 465 - but your connection will need to use TLS - and I don't think UP1.9 supports TLS 1.2 best I can recall. 

Another thing you can try is a command line utility called SWithMail (tbare.com - free).  I've used it to sort out these kind of issues outside of magic to figure out what was wrong.
Good luck,
Charles

--
Charles Coe, CPA, MCSE

New Orleans, Louisiana