Closed somanuell closed 2 years ago
When using the above script with node.exe (and with correct strings for the addresses...) the output is:
Starting... Account Orange Found! Setting Sender to: some.adress@orange.fr oMail.SendUsingAccount seen as null ! Sent!
So, the mail is sent, but not FROM the correct address/account
Hi durs, root cause FOUND!
If you look at the code of PutProperty
in Microsoft's
if (pVar->vt == VT_UNKNOWN || pVar->vt == VT_DISPATCH ||
(pVar->vt & VT_ARRAY) || (pVar->vt & VT_BYREF))
{
HRESULT hr = pDispatch->Invoke(dwDispID, IID_NULL,
LOCALE_USER_DEFAULT, DISPATCH_PROPERTYPUTREF,
That "magic" is missing in your implementation. I added it, and my use case works!
Will submit a PR.
Hi durs, I have a test case where cscript.exe does the work, but winax fails. When setting some property in some object, in node.exe the property is seen as null just after the affectation, but not in cscript.exe
Is there a syntax I should use to set the property's value?
Below, script for reference, the offending code is oMail.SendUsingAccount = oTheAccountToUse;