SMTPSend problems on Mac
Doug Easterbrook
doug at artsman.com
Thu Dec 18 09:41:06 EST 2014
hi bob.
a couple of thoughts for you... when doing smtpsend, we there is a 'status proc' parameter.. eg, in this example '$cinst.$stsproc'
SMTPSend (pSMTPserver,pFrom,TOlist,pSubject,ref,CClist,BCClist,pName,'$cinst.$stsproc',pPriority,headerList,pSMTPuserId,pSMTPpassword,pUSE_SSL,pVerify_SSL) Returns status
where $stsproc look like this -- it appends #S1 to a variable. at the end of the request, you can look at iSMTPconversation to see everything that went on.
Calculate iSMTPconversation as con(iSMTPconversation,#S1)
so, a connection time out could be SMTP didn't connect -- or it could be that SMTP did connect -- but along the way in the conversation, something took too long, or you got some weird situation occur.
what did we find out at times ... a couple of years ago, exchange servers seemed to check the spam content of an email using some web service and we saw variability in the response of a server right close by to be from 1 second to 30 seconds. if exchange wasn't doing exactly that -- it may have been purposely delaying response to email clients -- as part of the spam measure.
the status that comes back, we ended up having to do really strange things like actually checking the conversation ... beacuse exchange servers were sending an RSET ... and omnis was not dealing with it.
If status<>0
If status=-522
Breakpoint
; V91600 OMNIS bug with exchange: check to see if it actually went. crops up randomly -- usually first time in sending for a while
; V91600 actually got it with my email server that sent. so check postfix response as well
Calculate pos as pos('RSET',iSMTPconversation)
If pos
Calculate temp as mid(iSMTPconversation,pos) ;; look and see what is after the RSET
If pos('queued mail for delivery',low(temp))|pos('ok: queued as',low(temp))>0|pos('accepted for delivery',low(temp))>0
Breakpoint
Calculate status as 0
End If
The other thing that could be getting you is the whole SSL email vs TLS encryption, etc. I can't exactly recall which one -- but I know that omnis 5.2.3 doesn't handle all cases of cryptography when connecting to servers. I really don't think that is the issue, but could play a factor.
do check the SMTP conversation. it is very useful tool.
Ultimately, we ended up creating a worker process to put mail into a database table and then use a python worker to take those and send them out using python. since we did that, we no longer have to respond to customers and email problems that are related to SMTP servers and SMTP send ... SMTP send is a little out of step with the requirements and actions of current servers and thats a problem (as you are finding out).
Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 536-1205 Fax (403) 536-1210
> On Dec 18, 2014, at 7:04 AM, Bob Fiering <bob at maxolution.nl> wrote:
>
> Hi,
>
> I have a customer with strange problems when trying to send mail in Omnis 5.2.3 on OSX.
> When entering the credentials for their account i got errors like
> -1034 Connection time out. Sometimes even -10060 Socket error: Connection timed out
>
> When entering gmail smtp settings settings smtp.gmail.com <http://smtp.gmail.com/> with the user authentication settings, verify true and SSL true, everything is running fine.
> But their own mail account (running at a web/mail server provider) gives problems.
> I tried to add portnumbers like 587 or 465 to their smtp server address but no luck.
> The same error -1034.
>
> Anyone any idea.
> I tried to use for their email account the gmail smtp server but then their own email addess is replaced by the gmail address from the authentication when a customer gets the mail.
>
> Anyone an idea what is happening here and how to solve it?
>
> Thanks,
>
> Bob_____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list