Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exe won't smtp with wwipstuff - HELP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Titre:
Exe won't smtp with wwipstuff - HELP
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01055718
Message ID:
01055718
Vues:
75
We're using Rick Strahl's wwIPstuff utility to send smtp email. When I run my project within the VFP environment (from the command window), the email sends with no problems. However, when I compile the project into an .exe, the code doesn't crash but I continually get an error that the smtp object can not connect to the server.

Here's my code.
lcTempPath = justpath(sys(16))
SET CLASSLIB TO (lcTempPath + [wwIPStuff]) ADDITIVE
SET PROCEDURE TO (lcTempPath + [wwUTILS]) ADDITIVE 

TRY
	*--- Send Email Notification
	oSMTP = CREATEOBJECT("wwIPStuff")
	oSMTP.cMailServer = "smtp.domain.net"
	oSMTP.cUserName = "test_user"
	oSMTP.cPassword = "password"

	WITH oSMTP
		.cSenderName = "USER"
		.cSenderEmail = "user@domain.org"
		.cRecipient = settings.emaillist
		.cSubject = [Test Email]
		.cMessage = [This is just a test message.]
	ENDWITH
	
	IF ! oSMTP.SendMail()
		WAIT WINDOW [Mail not sent: ] + oSMTP.cErrorMsg NOWAIT 
	ELSE 
		WAIT WINDOW NOWAIT "Sending email notification."
	ENDIF 

	* Disconnect From STMP Server
	oSMTP = .NULL.
CATCH
	WAIT WINDOW NOWAIT "Email message could not be sent."
ENDTRY
From the .exe, I always see the wait window with the error message. When I run from the command window, I see the Sending Email message.

Any ideas on what the difference is?

Thanks for your help.

Rodd
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform