Hi, I've been trying to send an email from my application using the
GroupWise Object API, but I haven't been able to suceed. It only works
when the destinatary mail is already in my contacts. So to fix this, I
changed the code where they had:
// Name to be resolved
bstrName = SysAllocString(TO_OLE_STRING(szTo));
// Add the name(s) to be resolved
pIGWRecipients->AddByDisplayName(bstrName, vTargetType, &pDIGWRecipient);


// Specify the class of message we are sending
bstrClass = SysAllocString(OLESTR("GW.MESSAGE.MAIL"));
// Set class and type to empty
V_VT(&vClass) = VT_BSTR;
V_VT(&vType) = VT_I4;
V_VT(&vVersion) = VT_EMPTY;
V_BSTR(&vClass) = bstrClass;
V_I4(&vType) = egwDraft;

// This is where we get the Message Object to work with
pIGWMessages->Add(vClass, vType, vVersion, &pDIGWMessage);

I've been trying to work this around, and I haven't been able to. I can't
work with vb, it has to be C++, so that is a restriction

Thanks in advance

Andres Rangel
System Engineer
Elctrical Engineer