(PowerBuilder) Demonstrates how to call AddPfxSourceData for an Email Object
Demonstrates how to call AddPfxSourceData for an Email Object
integer li_rc
oleobject loo_Fac
oleobject loo_Email
integer li_Success
loo_Fac = create oleobject
// Use "Chilkat_9_5_0.FileAccess" for versions of Chilkat < 10.0.0
li_rc = loo_Fac.ConnectToNewObject("Chilkat.FileAccess")
if li_rc < 0 then
destroy loo_Fac
MessageBox("Error","Connecting to COM object failed")
return
end if
loo_PfxBytes = loo_Fac.ReadEntireFile("qa_data/pfx/some.pfx")
loo_Email = create oleobject
// Use "Chilkat_9_5_0.Email" for versions of Chilkat < 10.0.0
li_rc = loo_Email.ConnectToNewObject("Chilkat.Email")
li_Success = loo_Email.AddPfxSourceData(loo_PfxBytes,"PFX_PASSWORD")
if li_Success <> 1 then
Write-Debug loo_Email.LastErrorText
destroy loo_Fac
destroy loo_Email
return
end if
Write-Debug "Success."
destroy loo_Fac
destroy loo_Email
|