Bad Email Dreams ...

User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Bad Email Dreams ...

Post by TimStone »

James,

First, its great to see a post from you. It has been a long time. I tried emailing directly a couple of times ...

To answer your question, I have Cox Internet here. I have no problem with any email, either SMTP, or CDO. I also can use my own MasterLink host, and post through that server without a problem. Thus, I cannot make any of the email methods fail.

I setup a SMTP server on one of my hosted systems, and it works fine with the alternate port.

Apparently some ISPs are doing a lot of blocking, and they are pretty much pushing web mail ! Quest in AZ is one of the more problematic. The request goes to the server, but we never receive back the response. This becomes very frustrating for my clients.

Apparently the problem exists with SSL requirements ( and TSL ). I have looked at 3rd party packages to see if this can be added. As was also pointed out here, more and more servers are requiring SSL and it is not supported with our current software.

Five Win has done a lot, but I think the one significant weakness is in the area of communications. XML has been there for years, but the implementation of it in this program is hit and miss ( minimal ). SQL essentially requires 3rd party drivers, yet it is the standard database today. The internet, asynchronous communications, and data sharing are all the primary focus of today's apps, yet we don't do much there.

To be competitive in 2013, all of these capabilities will need to be met in the development tools.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Bad Email Dreams ...

Post by James Bott »

Tim,

While I don't disagree with you about the need for better communications capabilities within FW/Harbour, I am not sure that those are your current problems.

So far you have only told me that you are able to use SMTP on your servers--you have not said that you have tested any of the client's problem servers.

I note that Quest is a dial up service which can present other problems such as are they connected, etc. Also there is no mention of SSL at all in their setup instructions:

http://www.qwest.net/help/email.html

So, I don't think SSL is the problem with them.

Regards,
James
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Bad Email Dreams ...

Post by TimStone »

James,

Sorry, this has gone on for a long time.

No, none of these are dial up. They are all ISP's and some of them have farmed the email service to other companies, ie. Yahoo. The service is either DSL or Cable.

The sequence is quite simple. The process always dies on the response. This means that the SMTP in FWH makes a call for a connection, and apparently submits the email, but never gets a confirmation. This is where the process dies.

The full code is here in other emails. Also, other people have noted similar problems, and they have gone to 3rd party communications packages to get past it.

Most newer services require SSL or TSL. Thus, without that, we can't communicate. For example, I could probably get all of my clients to sign up for a Microsoft Office 365 account ... the benefits are amazing, and Exchange Email can be had for $4 / month. Any business can afford that. However, it also requires TSL for an SMTP connection.

I think you will find most providers do require that now. Its been provided for years.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
reinaldocrespo
Posts: 918
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Bad Email Dreams ...

Post by reinaldocrespo »

Tim/James;

Hi.

There is an easy way to reproduce the problem Tim has been trying to explain all along on this thread. Create a gmail account. Configure the newly created email account on your email client on your pc. Note that you will have a choice of ports to use. You will be able to send and receive emails using the gmail account with your choice of e-mail client (I use iMac's Mail 4.6 -works great).

Now try to use the very same gmail mail server to deliver emails from a fwh application and you will soon learn that it becomes impossible unless you can communicate over a secure socket connection using ssl authentication. Anyone who can figure out how to send emails using a Gmail from a fwh application should be able to solve the problem that Tim has been trying to call the attention to.

There are still hosting companies providing their own smtp server with user-name + password authentication, but I'm afraid they are soon becoming extinct. It used to be that ISPs blocked port 25 to avoid spamming over their SMTP servers. Eventually every mail service will be over ssl. It is a matter of time.



Reinaldo.
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Bad Email Dreams ...

Post by James Bott »

Reinaldo & Tim,

Oh, I am quite aware of the SSL issue. However, it was unclear to me from reading this thread that any of the problems Tim was having had anything to do with SSL. From my experience most problems are because clients don't know how to setup the SMTP server ports, etc. so I was just trying to point this out.

Yes, we badly need SSL capability. There has been some discussions about this in the Spanish FW/Harbour forum some time back. There is a email class that supposedly has SSL capability, however, it requires OpenSSL to be installed on every computer that will be sending mail. This is not a feasible solution.

All the commercial libraries I have seen are about US$300 and up. This is kind of steep, however this may be the only solution.

Regards,
James
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Bad Email Dreams ...

Post by TimStone »

James,

I generally go online to do the setup if someone has a problem. I check their alternate ports myself from their ISP's website.

It is a significant issue. I started doing some study and work with Visual Studio 2012 ( the beta versions , and finally the full version ) last year and that has acquainted me with a very active Microsoft development community. Communication is a major focus on all new software development, and without it we are going to be at a strong disadvantage.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
Randal
Posts: 250
Joined: Mon Oct 24, 2005 8:04 pm

Re: Bad Email Dreams ...

Post by Randal »

TimStone wrote:Randal,

I downloaded today the Catalyst trial version. I saw your DLL listing elsewhere.

Could you provide us with a sample of how you implemented this DLL ? Also you reference the LIB calls. Did you link in the LIB's that are included into your build ? I've got a build with xHarbour that uses Peles C, and one with MSVC 2010 which I know is supposed to be compatible with Catalyst.

In your notes you indicate you set this up for SSL. Their samples are a bit limited for what I'm trying to discover.

Your guidance would be greatly appreciated. Sadly many of the servers today want SSL and our TSMTP protocol in FWH does not support it.

Tim
Tim:

Sorry for the late reply. I haven't been here in a while.

No, I don't link any libs I just load the library and call the functions.

You have to first load the library and initialize it before calling any functions. I use the smtp and mime functions.

hSmtp := LoadLibrary("CSMTPAV7.dll")
// Must initialize first. Should return true
lSmtpInit := SmtpInitialize(CSTOOLS7_LICENSE_KEY)
IF ! (lSmtpInit)
Msginfo( "Unable to initialize Smtp library.")
ENDIF

// Load Mime library
hMime := LoadLibrary("CSMSGAV7.dll")
lMimeInit := MimeInitialize(CSTOOLS7_LICENSE_KEY)
IF !(lMimeInit)
Msginfo( "Unable to initialize Email library.")
ENDIF

Some email providers require an SSL connection and others don't, some require authentication, others don't. You have to allow the user to specify these settings.

Basically you establish a connection with the required parameters

hClient := SmtpConnect( cServer, nPort, nTimeOut, SMTP_OPTION_EXTENDED+SMTP_OPTION_SECURE,"",0)

and then authenticate if necessary

IF ( SmtpAuthenticate(hClient, SMTP_AUTH_DEFAULT, cUser, cPassword) ) = -1

compose the message

hMessage := MimeComposeMessage(cFrom, cTo, cCC, cSubject, cMessage, , MIME_CHARSET_DEFAULT, MIME_ENCODING_DEFAULT )

send the message

nReturn := SmtpSendMessage( hClient, cFrom, cTo, cExpFile, len(cMessageText), SMTP_MESSAGE_FILE )

My implementation of this library is highly customized to fit our need so I don't have a generic class I can give you however, I hope this gives you some idea of where to start and if you have any questions let me know.

Our email functions work with all the major internet providers and web based email like gmail, yahoo, and hotmail(live). Currently we are only sending email and not processing incoming mail.

Thanks,
Randal
User avatar
don lowenstein
Posts: 196
Joined: Mon Oct 17, 2005 9:09 pm
Contact:

Re: Bad Email Dreams ...

Post by don lowenstein »

Randal,

i've downloaded the Socket Tools library demo. I can't seem to communicate with cshtpav7.dll.

I don't have a license key. here is my code. every time I call the DLL function I get a return value of 0. makes me think I'm not finding the function or something.

do you have any tips since you've been successful with this tool library.


LOCAL RETVAL := .f.
LOCAL LICENSEKEY := NIL // due to no license key for demo = not sure how to pass NULL

PRIVATE HDLL
M->HDLL := LOADLIBRARY( M->CDLLNAME )
// returns handle of 1349517312

RETVAL := HttpInitialize( @LICENSEKEY )
//RETVAL comes back as NIL.



DLL FUNCTION HttpInitialize( cLicense AS LPSTR, ;
InitParms AS LPSTR ) ;
AS BOOL ;
PASCAL FROM 'HttpInitialize' ;
LIB M->HDLL // STATIC VAR TO HOLD handle of the loaded dll.
Don Lowenstein
www.laapc.com
User avatar
don lowenstein
Posts: 196
Joined: Mon Oct 17, 2005 9:09 pm
Contact:

Re: Bad Email Dreams ...

Post by don lowenstein »

I have defined cdllname as

M->CDLLNAME := 'cshtpav7.dll' // socket tools library
Don Lowenstein
www.laapc.com
Post Reply