SMTP loses attachments w/ Vista

SMTP loses attachments w/ Vista

Postby TimStone » Sat Aug 25, 2007 8: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby driessen » Mon Aug 27, 2007 9: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

SMTP / Vista

Postby TimStone » Mon Aug 27, 2007 5: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby Antonio Linares » Mon Aug 27, 2007 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby James Bott » Mon Aug 27, 2007 6: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

SMTP

Postby TimStone » Mon Aug 27, 2007 7: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby Antonio Linares » Mon Aug 27, 2007 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Gale FORd » Mon Aug 27, 2007 8: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/
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

The same but different

Postby TimStone » 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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

SMTP

Postby AlexSchaft » Tue Aug 28, 2007 3: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
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 93 guests