Peter Cushing wrote:
> Hi MB,
>
> Not sure about the two spaces but I have a test program that I use and keep
> changing until it works, then paste this into my real program (see below).
> As my code is set up you will not get two spaces together. I used to use -f
> and -i together but then wanted something different with -replyto
> Have you got the syntax.txt that comes with the DLL?
> You will need to make sure paths are delimited. See the attach bit below.
>
> HTH
>
> Peter
>
>
> cEmailto='[EMAIL PROTECTED]'
> cCCto=''
> cBCCto=''
> lcResult = "FAILED"
> cEmailSubject='this is the subject of a test email'
> *cEmailFrom='operasystem'
> cEmailFrom='[EMAIL PROTECTED]'
> cAttach='my long file name.doc,and another long name.txt'
>
> cEmailbody='this is the body'
> lcFile='xtradata.dir' && does not get sent
>
> * now sort out attachments as maybe more than one.
> cTemp1=''
> cTemp2=''
> IF !EMPTY(cAttach)
> IF ',' $ cAttach
> DO while ',' $ cAttach
> * get first part of string
> cTemp1 = SUBSTR(cAttach,1,AT(',',cAttach)-1)
> * add to new string
> cTemp2 = cTemp2 + [ -attach ] + '"'+cTemp1+'"'
> * chop this off original string
> cAttach = SUBSTR(cAttach,AT(',',cAttach)+1)
> ENDDO
> * do last entry
> cTemp2 = cTemp2 + [ -attach ] + '"'+cAttach+'"'
> cAttach = cTemp2
> ELSE
> cAttach = [ -attach ] + '"'+cAttach+'"'
> ENDIF
> ENDIF
>
>
> lcSend = lcFile + ;
> IIF(EMPTY(cEmailto),'',[ -to ] + Chr(34) + AllTrim(cEmailTo) + Chr(34))
> + ;
> IIF(EMPTY(cCCto),'',[ -cc ] + Chr(34) + AllTrim(cCCTo) + Chr(34)) + ;
> IIF(EMPTY(cBCCto),'',[ -bcc ] + Chr(34) + AllTrim(cBCCTo) + Chr(34)) + ;
> [ -subject ] + Chr(34) + AllTrim(cEmailSubject) + Chr(34) + ;
> [ -f [EMAIL PROTECTED] + ;
> [ -replyto ] + Chr(34) + AllTrim(cEmailFrom) + Chr(34) + ;
> [ -server 192.168.0.9] + ;
> [ -body ] + Chr(34) + AllTrim(cEmailBody) + Chr(34) + ;
> [ -u ] + Chr(34) + "myusername" + Chr(34) + ;
> [ -pw ] + Chr(34) + "mypassword" + Chr(34) + ;
> cAttach
>
> Declare Integer Send In system\blat.DLL STRING blatstring
>
> lcSendCmd = "Send(lcSend)"
>
> If &lcSendCmd == 0
> WAIT WINDOW "Success"
> ELSE
> WAIT WINDOW "Failed to Send"
> ENDIF
>
Excellent...THANK YOU!
--
Michael J. Babcock, MCP
MB Software Solutions, LLC
http://mbsoftwaresolutions.com
http://fabmate.com
"Work smarter, not harder, with MBSS custom software solutions!"
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.