Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #6062 > unrolled thread

CDOSys.dll and VO keyword

Started by"Francesco F." <francescangeli.f.remove@remove.gmail.com>
First post2013-10-11 12:09 +0200
Last post2013-10-11 16:01 +0200
Articles 10 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  CDOSys.dll and VO keyword "Francesco F." <francescangeli.f.remove@remove.gmail.com> - 2013-10-11 12:09 +0200
    Re: CDOSys.dll and VO keyword Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2013-10-11 12:41 +0200
      Re: CDOSys.dll and VO keyword "Francesco F." <francescangeli.f.remove@remove.gmail.com> - 2013-10-11 15:29 +0200
      Re: CDOSys.dll and VO keyword "Francesco F." <francescangeli.f.remove@remove.gmail.com> - 2013-10-11 15:37 +0200
        Re: CDOSys.dll and VO keyword Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2013-10-11 16:35 +0200
          Re: CDOSys.dll and VO keyword "Francesco F." <francescangeli.f.remove@remove.gmail.com> - 2013-10-11 19:55 +0200
    Re: CDOSys.dll and VO keyword Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2013-10-11 12:34 +0100
      Re: CDOSys.dll and VO keyword "Francesco F." <francescangeli.f.remove@remove.gmail.com> - 2013-10-11 15:31 +0200
      Re: CDOSys.dll and VO keyword "Francesco F." <francescangeli.f.remove@remove.gmail.com> - 2013-10-11 15:39 +0200
    Re: CDOSys.dll and VO keyword "Francesco F." <francescangeli.f.remove@remove.gmail.com> - 2013-10-11 16:01 +0200

#6062 — CDOSys.dll and VO keyword

From"Francesco F." <francescangeli.f.remove@remove.gmail.com>
Date2013-10-11 12:09 +0200
SubjectCDOSys.dll and VO keyword
Message-ID<l38ipb$l66$1@news.albasani.net>
Hi all,
here I'm again asking for help.
I'm tryng to sending emails from VO without making use of default PC 
mailer(Outlook, Thunderbird etc.) that creates more problems rather than 
solve them.
All goes fine with an external VBScript calling CDO, but, due to MS$ 
security obsession, the user must undergo every time the security 
alert... a pain! I'm getting a lot of complaints from customers.
Now I'm testing CDOsys.dll that seems promising, but I'm not able to 
compile because of a statement required from CDO.
Example:
---------------------------------------------------------------
LOCAL objMessage AS OBJECT
LOCAL objConfiguration AS OBJECT

..... other stuff

objMessage := OLEAutoObject{"CDO.Message"}
objConfiguration := objMessage:Configuration

objConfiguration:Fields:[Item, 
"http://schemas.microsoft.com/cdo/configuration/sendusing"] := 2

//Name or IP OF Remote SMTP Server
objConfiguration:Fields:[Item, 
"http://schemas.microsoft.com/cdo/configuration/smtpserver"] := 
"smtp.gmail.com"

........ other stuff

objMessage:Subject := "Messaggio di prova"
objMessage:From := "<foo.go@gmail.com>"

objMessage:TO := "oof.go@tiscali.it"
//--- here I'm trapped from :TO <<<<<<<<<<<<---------------------------

objMessage:TextBody = "Messaggio di prova. Ciao, Franco"
objMessage:Send
objMessage:Destroy()
---------------------------------------------------------------
"To" is a property of Message Class in CDO and, obviously, I can't 
change it.

Hou could I circumvent that :To ?

Has someone of you made use of CDO in this way?

TIA,
Francesco






[toc] | [next] | [standalone]


#6063

FromKarl Faller <mail_withoutthat_@_drei-f_andthat_.de>
Date2013-10-11 12:41 +0200
Message-ID<tblf59lfo290j9cqm7sdnpg5641vqa41fm@4ax.com>
In reply to#6062
Francesco,
>objMessage:TO := "oof.go@tiscali.it"
>//--- here I'm trapped from :TO <<<<<<<<<<<<---------------------------
>
>objMessage:TextBody = "Messaggio di prova. Ciao, Franco"
>objMessage:Send
>objMessage:Destroy()
>---------------------------------------------------------------
>"To" is a property of Message Class in CDO and, obviously, I can't 
>change it.
you could try 
objMessage:@@TO 
that's the way Vulcan escapes reserved words, i can't remember if the
same syntax works for VO...

Karl

[toc] | [prev] | [next] | [standalone]


#6068

From"Francesco F." <francescangeli.f.remove@remove.gmail.com>
Date2013-10-11 15:29 +0200
Message-ID<l38ugk$c6d$1@news.albasani.net>
In reply to#6063
Tnx Karl,
I'll try soon...

Francesco

Il 11/10/2013 12:41, Karl Faller ha scritto:
> Francesco,
>> objMessage:TO := "oof.go@tiscali.it"
>> //--- here I'm trapped from :TO <<<<<<<<<<<<---------------------------
>>
>> objMessage:TextBody = "Messaggio di prova. Ciao, Franco"
>> objMessage:Send
>> objMessage:Destroy()
>> ---------------------------------------------------------------
>> "To" is a property of Message Class in CDO and, obviously, I can't
>> change it.
> you could try
> objMessage:@@TO
> that's the way Vulcan escapes reserved words, i can't remember if the
> same syntax works for VO...
>
> Karl
>

[toc] | [prev] | [next] | [standalone]


#6070

From"Francesco F." <francescangeli.f.remove@remove.gmail.com>
Date2013-10-11 15:37 +0200
Message-ID<l38uv5$d6f$1@news.albasani.net>
In reply to#6063
Oh you lucky Vulcaneers....
VO doesn't like @@.
Thanks anyway,
Francesco



Il 11/10/2013 12:41, Karl Faller ha scritto:
> Francesco,
>> objMessage:TO := "oof.go@tiscali.it"
>> //--- here I'm trapped from :TO <<<<<<<<<<<<---------------------------
>>
>> objMessage:TextBody = "Messaggio di prova. Ciao, Franco"
>> objMessage:Send
>> objMessage:Destroy()
>> ---------------------------------------------------------------
>> "To" is a property of Message Class in CDO and, obviously, I can't
>> change it.
> you could try
> objMessage:@@TO
> that's the way Vulcan escapes reserved words, i can't remember if the
> same syntax works for VO...
>
> Karl
>

[toc] | [prev] | [next] | [standalone]


#6075

FromKarl Faller <mail_withoutthat_@_drei-f_andthat_.de>
Date2013-10-11 16:35 +0200
Message-ID<s23g591dsar199a5i73lb019155oue7ld9@4ax.com>
In reply to#6070
Francesco,
could it be, that you are not in 2.8? Because what's new 2.8 states:
...
Visual Objects now uses the same escape characters (@@) as Vulcan.NET
to escape reserved words.  At points in the source code of the System
Classes we have already used this to avoid problems when compiling
this source code with Vulcan.NET. For example:
....

but glad you got it working nevertheless.

Karl



>Oh you lucky Vulcaneers....
>VO doesn't like @@.
>Thanks anyway,
>Francesco
>
>
>
>Il 11/10/2013 12:41, Karl Faller ha scritto:
>> Francesco,
>>> objMessage:TO := "oof.go@tiscali.it"
>>> //--- here I'm trapped from :TO <<<<<<<<<<<<---------------------------
>>>
>>> objMessage:TextBody = "Messaggio di prova. Ciao, Franco"
>>> objMessage:Send
>>> objMessage:Destroy()
>>> ---------------------------------------------------------------
>>> "To" is a property of Message Class in CDO and, obviously, I can't
>>> change it.
>> you could try
>> objMessage:@@TO
>> that's the way Vulcan escapes reserved words, i can't remember if the
>> same syntax works for VO...
>>
>> Karl
>>

[toc] | [prev] | [next] | [standalone]


#6079

From"Francesco F." <francescangeli.f.remove@remove.gmail.com>
Date2013-10-11 19:55 +0200
Message-ID<l39e2v$dcm$1@news.albasani.net>
In reply to#6075
You're right, I'm on 2.7b, but I don't mind to upgrade at moment...
Bye,
Francesco

Il 11/10/2013 16:35, Karl Faller ha scritto:
> Francesco,
> could it be, that you are not in 2.8? Because what's new 2.8 states:
> ...
> Visual Objects now uses the same escape characters (@@) as Vulcan.NET
> to escape reserved words.  At points in the source code of the System
> Classes we have already used this to avoid problems when compiling
> this source code with Vulcan.NET. For example:
> ....
>
> but glad you got it working nevertheless.
>
> Karl
>
>
>
>> Oh you lucky Vulcaneers....
>> VO doesn't like @@.
>> Thanks anyway,
>> Francesco
>>
>>
>>
>> Il 11/10/2013 12:41, Karl Faller ha scritto:
>>> Francesco,
>>>> objMessage:TO := "oof.go@tiscali.it"
>>>> //--- here I'm trapped from :TO <<<<<<<<<<<<---------------------------
>>>>
>>>> objMessage:TextBody = "Messaggio di prova. Ciao, Franco"
>>>> objMessage:Send
>>>> objMessage:Destroy()
>>>> ---------------------------------------------------------------
>>>> "To" is a property of Message Class in CDO and, obviously, I can't
>>>> change it.
>>> you could try
>>> objMessage:@@TO
>>> that's the way Vulcan escapes reserved words, i can't remember if the
>>> same syntax works for VO...
>>>
>>> Karl
>>>

[toc] | [prev] | [next] | [standalone]


#6065

FromMalcolm G <malcolm-news2012delete@delete.jobstream.com>
Date2013-10-11 12:34 +0100
Message-ID<snR5u.2649$aJ5.1996@fx09.am4>
In reply to#6062
> "To" is a property of Message Class in CDO and, obviously, I can't 
> change it.


I would consider
ivarput(objMessage,#TO,"new value")
or even
ivarput(objMessage,string2symbol("TO"),"new value")

[toc] | [prev] | [next] | [standalone]


#6069

From"Francesco F." <francescangeli.f.remove@remove.gmail.com>
Date2013-10-11 15:31 +0200
Message-ID<l38uje$c6d$2@news.albasani.net>
In reply to#6065
Thanks Malcom,
I didn't know these 2 ways... I'll try.

Francesco

Il 11/10/2013 13:34, Malcolm G ha scritto:
>> "To" is a property of Message Class in CDO and, obviously, I can't
>> change it.
>
>
> I would consider
> ivarput(objMessage,#TO,"new value")
> or even
> ivarput(objMessage,string2symbol("TO"),"new value")
>

[toc] | [prev] | [next] | [standalone]


#6071

From"Francesco F." <francescangeli.f.remove@remove.gmail.com>
Date2013-10-11 15:39 +0200
Message-ID<l38v3b$d6f$2@news.albasani.net>
In reply to#6065
It seems VO can understand the 1st one; OK, now I can keep on testing CDO.
Thanks,
Francesco

Il 11/10/2013 13:34, Malcolm G ha scritto:
>> "To" is a property of Message Class in CDO and, obviously, I can't
>> change it.
>
>
> I would consider
> ivarput(objMessage,#TO,"new value")
> or even
> ivarput(objMessage,string2symbol("TO"),"new value")
>

[toc] | [prev] | [next] | [standalone]


#6073

From"Francesco F." <francescangeli.f.remove@remove.gmail.com>
Date2013-10-11 16:01 +0200
Message-ID<l390co$g9h$1@news.albasani.net>
In reply to#6062
Ok guys,
sometimes the life worth living !
It's incredible (at least for me) but at 2nd try I reached the goal, all 
is working good.

Thank you CDO and thank you who helped me.
If anyone is interested to, here is the working function (not so much 
readable, please reindent):
-----------------------------------------------------------------------------
FUNCTION CDOSendMail(cFrom AS STRING, cTo AS STRING, cSmtp AS STRING, 
cUserID AS STRING, cPwd AS STRING, dPort AS DWORD, lSSL AS LOGIC, 
cSubject AS STRING, cBody AS STRING) AS LOGIC
LOCAL objMessage AS OBJECT
LOCAL objConfiguration AS OBJECT
LOCAL cdoSendUsingPickup AS DWORD
LOCAL cdoSendUsingPort AS DWORD
LOCAL cdoAnonymous AS DWORD
LOCAL cdoBasic AS DWORD
LOCAL cdoNTLM AS DWORD

cdoSendUsingPickup := 1 //Send message USING the LOCAL SMTP service 
pickup directory
cdoSendUsingPort := 2   //Send the message USING the network (SMTP over 
the network)
cdoAnonymous := 0 	//DO not authenticate
cdoBasic := 1 		//basic (clear-TEXT) authentication
cdoNTLM := 2 		//NTLM

objMessage := OLEAutoObject{"CDO.Message"}
objConfiguration := objMessage:Configuration

objConfiguration:Fields:[Item, 
"http://schemas.microsoft.com/cdo/configuration/sendusing"] := 2
//Name or IP OF Remote SMTP Server
objConfiguration:Fields:[Item, 
"http://schemas.microsoft.com/cdo/configuration/smtpserver"] := cSmtp
//Type OF authentication, NONE, Basic (Base64 encoded), NTLM
objConfiguration:Fields:[Item, 
"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] := 
cdoBasic
//objMessage:Configuration:Fields:[Item, 
"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] := NONE
//Your UserID on the SMTP server
objConfiguration:Fields:[Item, 
"http://schemas.microsoft.com/cdo/configuration/sendusername"] := cUserID
//Your password on the SMTP server
objConfiguration:Fields:[Item, 
"http://schemas.microsoft.com/cdo/configuration/sendpassword"] := cPwd
//Server port (typically 25)
objConfiguration:Fields:[Item, 
"http://schemas.microsoft.com/cdo/configuration/smtpserverport"] := dPort
//Use SSL FOR the connection (FALSE or TRUE)
objConfiguration:Fields:[Item, 
"http://schemas.microsoft.com/cdo/configuration/smtpusessl"] := lSSL
//Connection Timeout IN Seconds (the maximum time CDO will try TO 
establish a connection TO the SMTP server)
objConfiguration:Fields:[Item, 
"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"] 
:= 60
objConfiguration:Fields:Update()

objMessage:Subject := cSubject
objMessage:From := cFrom
IVarPut(objMessage,#TO,cTo)

objMessage:TextBody := cBody
objMessage:Send()
objMessage:Destroy()

RETURN TRUE
-----------------------------------------------------------------------------
Of course it's assumed CDOsys.dll present in Windows\System32, I've not 
investigated yet, but I presume that dll is present in Win versions from 
Win 7 onwards, I don't know the earlier ones.

TNX again,
Francesco







Il 11/10/2013 12:09, Francesco F. ha scritto:
> Hi all,
> here I'm again asking for help.
> I'm tryng to sending emails from VO without making use of default PC
> mailer(Outlook, Thunderbird etc.) that creates more problems rather than
> solve them.
> All goes fine with an external VBScript calling CDO, but, due to MS$
> security obsession, the user must undergo every time the security
> alert... a pain! I'm getting a lot of complaints from customers.
> Now I'm testing CDOsys.dll that seems promising, but I'm not able to
> compile because of a statement required from CDO.
> Example:
> ---------------------------------------------------------------
> LOCAL objMessage AS OBJECT
> LOCAL objConfiguration AS OBJECT
>
> ..... other stuff
>
> objMessage := OLEAutoObject{"CDO.Message"}
> objConfiguration := objMessage:Configuration
>
> objConfiguration:Fields:[Item,
> "http://schemas.microsoft.com/cdo/configuration/sendusing"] := 2
>
> //Name or IP OF Remote SMTP Server
> objConfiguration:Fields:[Item,
> "http://schemas.microsoft.com/cdo/configuration/smtpserver"] :=
> "smtp.gmail.com"
>
> ........ other stuff
>
> objMessage:Subject := "Messaggio di prova"
> objMessage:From := "<foo.go@gmail.com>"
>
> objMessage:TO := "oof.go@tiscali.it"
> //--- here I'm trapped from :TO <<<<<<<<<<<<---------------------------
>
> objMessage:TextBody = "Messaggio di prova. Ciao, Franco"
> objMessage:Send
> objMessage:Destroy()
> ---------------------------------------------------------------
> "To" is a property of Message Class in CDO and, obviously, I can't
> change it.
>
> Hou could I circumvent that :To ?
>
> Has someone of you made use of CDO in this way?
>
> TIA,
> Francesco
>
>
>
>
>
>
>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web