Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Email sent in prg but not app(or exe)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01392400
Message ID:
01392634
Vues:
57
Hi, Peter. A few things to check.

First, make sure you can PING pop.state.ct.us before you run the application.

Second, it may be that the POP server is set to require 'pickup before send' for security reasons. Is it possible you have Outlook running while you are testing the prg, but not when you are running the compiled program?

Third, I do not see the variable _cSendTo populated in your code - I presume it's there somewhere.

Fourth, you may get some useful information if you test the smtp connection using Telnet. Be sure to do this in the same environment which is used with your running applicaton (probably without Outlook running). Sample here: http://www.netadmintools.com/art276.html

HTH

>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)
>
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform