FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour SMTP loses attachments w/ Vista
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
SMTP loses attachments w/ Vista
Posted: Sat Aug 25, 2007 08:42 PM

I use the tSMTP class modified by Louis Krause through June 2005. I also use the corresponding tSocket class.

I use it to send emails with 1) and error.log ( text ) file, or 2) a generated PDF. In both cases, the program passes the path and file name in the array ( aSendFiles ), and the email is sent from this computer and received at the other mail server.

The program works fine with Windows XP.

However, with Windows Vista, in both cases, the attachments contain no data. A clean PDF or .log file on this computer arrives as a 85 to 92 byte file when received by the addressee.

Has anyone dealt with a similar issue and found a solution ? When building the email, I identify the correct file to attach ( displayed via an alert ) and the SMTP file indicates no problems in the log.

I'm using the latest xHarbour beta and FWH 7.07, on Vista Ultimate.

I did try substituting the actual file transfer code from the 7.07 FWH tSMTP class ( slightly different layout ) but there is no difference in the result.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
SMTP loses attachments w/ Vista
Posted: Mon Aug 27, 2007 09:37 AM

Tim,

I experienced the same problem in Windows XP Prof. To my opinion it has nothing to do with Windows Vista.

To my opinion the solution has to be found somewhere else.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
SMTP / Vista
Posted: Mon Aug 27, 2007 05:15 PM

I have both Vista Ultimate, and XP Professional computers and I have tested this issue on both with the exact same program. It works fine in XP and not Vista.

I have narrowed it down to the file transmission for attachments. It transmits the name of the file, but not the file itself ( only a shell of less than 100 bytes ).

In researching this globally, it appears that all previous versions of windows had support for an SMTP server that was included and could be installed. It would appear that they may have reduced SMTP functionality in Vista as a whole, but all email programs can send attachments, so it would appear that there is some change in the API calls required ( or maybe I have no idea what I'm talking about ... ).

Antonio, you are using VISTA ... are you using SMTP for outgoing emails, or do you have a different methodology

Thanks

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
SMTP loses attachments w/ Vista
Posted: Mon Aug 27, 2007 06:01 PM

Tim,

We don't use that code, so we can just suggest to place several traces into it (you may use FWH LogFile( cNameFile, { val1, ..., valN } ) ) and check where the error may come from

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
SMTP loses attachments w/ Vista
Posted: Mon Aug 27, 2007 06:39 PM

Tim,

To find out if it is indeed the OS, I would try sending SMTP mail using some other SMTP utility program.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
SMTP
Posted: Mon Aug 27, 2007 07:25 PM

Antonio ... what code do you use for sending emails from within a program ? FiveWin has its SMTP class, of which this is derived, but the same result occurs with the SMTP class provided with 7.07

James ... Outlook uses a POP/SMTP protocal and works. However, logic would say "if abc.exe works on machine A, but not on machine B, and the only difference is the OS, then there must be something different about B's OS". Also, there are some discussions on the internet tech resources about SMTP and Vista, which state that Microsoft used to provide an SMTP server, but removed it from Vista. That leads me to believe they have somehow changed their methodology relative to SMTP.

Of course, if someone uses FWH SMTP and can send email from a Vista computer, that would be very nice to know.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
SMTP loses attachments w/ Vista
Posted: Mon Aug 27, 2007 07:52 PM

Tim,

> what code do you use for sending emails from within a program ?

We don't send emails from our xbase applications

PHP does it ok for our needs

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
SMTP loses attachments w/ Vista
Posted: Mon Aug 27, 2007 08:59 PM

I have given up on the smtp class. It is too slow and I could not get it to work reliably with the security and anti-spam features used by our email servers.

I use a product from OstroSoft. It is free, very fast, and always seems to work. http://www.ostrosoft.com/

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
SMTP loses attachments w/ Vista
Posted: Mon Aug 27, 2007 10:16 PM

Tim,

>Outlook uses a POP/SMTP protocal and works.

OK, then it seems SMTP is working under Vista.

>However, logic would say "if abc.exe works on machine A, but not on machine B, and the only difference is the OS, then there must be something different about B's OS".

The key is in your statement "the only difference is the OS." This is very hard to determine. It could be a firewall issue, virus scanner issue, some kind of unknown malware, etc.

Also, are you sending it to the same SMTP server and to the same email address on both machines? Are the attachments the same? I am guessing that you thought of all this, but you didn't mention it.

>Also, there are some discussions on the internet tech resources about SMTP and Vista, which state that Microsoft used to provide an SMTP server, but removed it from Vista. That leads me to believe they have somehow changed their methodology relative to SMTP.

OK, I am confused about this. The SMTP server is not on the local machine, it is in a remote location, so you don't need to have an SMTP server on the local machine.

Have you contacted Luis about this problem? If it is a Vista problem, he probably already knows about it and may have already solved it.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
The same but different
Posted: Mon Aug 27, 2007 10:51 PM

I use the same anti-virus/malware/etc. program on both computers. They are on the network and both use the same SMTP server. Everything is identical.

I don't have contact info for Louis

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
SMTP loses attachments w/ Vista
Posted: Mon Aug 27, 2007 11:13 PM

Tim,

Luis email on these forums is:

luis_krause@hotmail.com

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
SMTP loses attachments w/ Vista
Posted: Tue Aug 28, 2007 12:28 AM

Tim,

This software might be helpful.

"SMTP Diagnostics is a program that assists with troubleshooting problems that can occur with outgoing mail (SMTP). You can send a test message, with or without attachment(s), and view the protocol messages exchanged between your computer and the mail server."

http://www.whitepeaksoftware.com/smtp-diagnostics.aspx

Also, have you tried taking your firewall down just to do a test send?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
SMTP loses attachments w/ Vista
Posted: Tue Aug 28, 2007 12:34 AM

OK, SMTP Diagnostics may not be all that helpful. After reading more about it, the test emails are sent from the SMTP Diagnostics program. I previously had the impression that it just recorded the session between your email software and the SMTP server. Apparently this is not the case.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
SMTP loses attachments w/ Vista
Posted: Tue Aug 28, 2007 12:50 AM

It's been quite awhile since I worked on email, but I just remembered that you can turn on debugging in the socket class. You will have to add the following lines to the TSMTP class and recompile it. Put these in the New() method after the socket has been defined.

oSocket:lDebug:=.t.
oSocket:cLogFile:="socket.log"

Then send you email and see what you get. It may give a clue.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 172
Joined: Fri Oct 07, 2005 01:29 PM
SMTP
Posted: Tue Aug 28, 2007 03:35 AM

Hi,

FYI, I can send mail via smtp without any problems. Admittedly we've modified the tsmtp class a bit for picking up errors in creation of the attachment temp files (pre-process the array of files to their own unique file names in the user's temp folder, and send those)

Alex