thank you always.
As the title suggests, I want to send an email with PB2017, but I'm having trouble with an error on Send.
Below is the source (minimum)
------------------------------------------------------------------------------------
OleObject lole_Msg
long rtn
any aaa
lole_Msg=create oleobject
if lole_Msg.ConnectToNewObject("CDO.Message")<0 then
messagebox('OBI','CDO.Message')
destroy lole_msg
return
else
lole_Msg.Configuration.Fields.Item('cdoSMTPServer').Value = "SMTPserver"
lole_Msg.Configuration.Fields.Item('cdoSendUsingMethod').Value = "cdoSendUsingPort"
lole_Msg.Configuration.Fields.Item('cdoSMTPServerPort').Value = 465 //portNo
lole_Msg.Configuration.Fields.Item('cdoSMTPConnectionTimeout').Value = 60 //timeout
lole_Msg.Configuration.Fields.Item('cdoSMTPAuthenticate').Value = "cdoBasic" //SMTPauth
lole_Msg.Configuration.Fields.Item('cdoSMTPUseSSL').Value = True //SSL
lole_Msg.Configuration.Fields.Item('cdoSendUserName').Value = "SMTPUSER" //send userー
lole_Msg.Configuration.Fields.Item('cdoSendPassword').Value = "SMTPPASS" //SEND PASS
//lole_Msg.Configuration.Fields.Item('cdoLanguageCode').Value = 'CdoCharset.cdoShift_JIS'
lole_Msg.Configuration.Fields.Update()
lole_Msg.Fields.Update()
lole_Msg.MimeFormatted = True
lole_Msg.From = "test@bbb.com" //from
lole_Msg.To = "test@aaa.com" //to
lole_Msg.Subject = "abcdefg" //subject
lole_Msg.TextBody = "xxxxxxxxxxxxxxxxx" //body
lole_msg.Send
--------------------------------------------------------------------------------
At the timing of the last Send
Application execution error (R0039)
Application has been interrupted.
Error Access error for external object property send.
An error will appear.
In VBA, it is possible to send an email without an error.
Also, regarding the items of Configuration.Fields.Item
lole_Msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver").value = "SMTP Server"
The way I wrote it above was wrong.
If anyone knows about this error, please guide me.
The cause was that the items had to be written in all lowercase letters!
Thank you for your advice! have a nice day!