Can't establish protocol - trying to send email from C6

I am trying to send email from a C6 app. Whenever it runs I get an immediate error - "Error Creating Protocol (server name) Socket 587 nErr: 11004.

It does the same no matter what I use for the server name (isp or name).

I am using the Clarion extensions (Global Document Handling for the app, and Document Send Extension for the procedure), but I don’t really know how they work. I haven’t found anything detailing that or what all data fields are available, or what is actually sent to the server.

Of particular concern is if I am sending my userid and password for authentication.

This is the code I have so far:

eMail.DefaultServer = ECON:DefaultServer
eMail.DefaultPort = ECON:ServerPort
eMail.Sender = clip(ECON:SenderAddress)
if clip(ECON:FromHeaderName) = ‘’ then
eMail.From = ‘<<’ & clip(ECON:FromHeaderAddress) & ‘>’
else
eMail.From = ‘"’ & clip(ECON:FromHeaderName) & ‘" <<’ & clip(ECON:FromHeaderAddress) & ‘>’
end
eMail.SenderDomain = ECON:SenderDomain
Addresses.AddRecipient(ECON:RecipientAddress, ECON:RecipientName, SendTo, SMTP,)
Message.Description = ECON:Subject
Message.AddBody(clip(ECON:BodyText) & ‘<13,10,13,10>’)
Message.TextOnly = True ! Drop all MIME headers and encoding.
Message.Send()

Please let me know if you have any suggestions! Thanks!