Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Email sent in prg but not app(or exe)
Message
De
31/03/2009 11:44:31
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Titre:
Email sent in prg but not app(or exe)
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01392400
Message ID:
01392400
Vues:
110
i have the following prg which runs fine and sends out the email
once I compile it into an .app and DO update_blackberry.app

it does not send the email (I get
"-3 - Couldn't connect to server: pop.state.ct.us")
but run as a prg the smtp server works just fine ?????


can anybody shed some light on this for me PLEASE!
lcMessage=[]

IF lnNumRows > 0

	SELECT ccPrint
	SCAN
		IF NOT EMPTY(ccPrint.insuser_id)
			SELECT sys_user
			x5 = LOOKUP(username,ccPrint.insuser_id,user_id,'user_id')
			REPLACE f3 WITH x5 IN ccPrint
		ENDIF
		ldDateFrom	= ConvertTime2AmPm( ccPrint.STARTDATE,.T.)
		lcStat		= LEFT(ccPrint.f2,1)
		lcSpeakStat	= LEFT(ccPrint.fl,4)
		TEXT TO lCMessage NOSHOW TEXTMERGE ADDITIVE
					<b><i><<m.ldDateFrom >></i>   [<<lcStat>>]  [<<lcSpeakStat>>]</b><br>
					<<ccPrint.activity)>><br>
					<<ccPrint.LocName>><br>
					<<STRTRAN(ccPrint.LOCATION,CRLF,", ")>><br>
					<<ccPrint.Contacts>><br><hr>
		ENDTEXT

	ENDSCAN

	* \\send email to user
	SET CLASSLIB TO E:\vAPPTest\wwIPstuff\wwIPSTUFF.vcx
	oMail=CREATEOBJECT("wwIPStuff")
	oMail.cMailServer	= "pop.state.ct.us"
	oMail.cSenderEmail	= "peter.cortiel@ct.gov"
	oMail.cSenderName	= "PAC"
	oMail.cRecipient= _csendto
	oMail.cCCLIST='peter.cortiel@ct.gov'
	oMail.cSubject="Subject"
	oMail.cMessage="Treasury Connections - Auto"
	
	WITH oMail
		.cUsername = "cortielp" 
		.cPassword='1kkkebd77#$4'
		.cSubject=TEXTMERGE([Treasury Connection: <<lddate1>> to <<ldDate2>> ] )
		.cMessage=lcMessage
		.cContentType=[text/html]
		IF .SendMail()
			STRTOFILE(crlf+"Email Sent"+TRANSFORM(DATETIME())+[sent to ]+oMail.cRecipient ,lcLogFile ,1)
		ELSE
			STRTOFILE(crlf+"!!!!!!!!!!!!!!!!!!!!!!!!!!!" ,lcLogFile ,1)
			STRTOFILE(crlf+.cErrorMsg ,lcLogFile ,1)
			STRTOFILE(crlf+"Email NOT Sent"+TRANSFORM(DATETIME()) ,lcLogFile ,1)
			STRTOFILE(crlf+"!!!!!!!!!!!!!!!!!!!!!!!!!!!" ,lcLogFile ,1)

		ENDIF
	ENDWITH
	* \\end email
ENDIF
STRTOFILE(crlf+[done ]+TRANSFORM(DATETIME())+[================] ,lcLogFile ,1)
Peter Cortiel
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform