Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exe won't smtp with wwipstuff - HELP
Message
General information
Forum:
Visual FoxPro
Category:
West Wind Web Connection
Title:
Exe won't smtp with wwipstuff - HELP
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01055718
Message ID:
01055718
Views:
74
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
Next
Reply
Map
View

Click here to load this message in the networking platform