I want to wish all of my readers a happy and brilliant NEW YEAR!
vor 2 Jahren
Blog around Microsoft Dynamics AX formerly known as Microsoft Business Solutions Axapta formerly known as Damgaard Axapta.
Whenever you initialize the sysmailer class, put InteropPermission.assert() before new SysMailer(). When you look into SysMailer.new() method, you may find that the COM c = new COM(' CDO .Message') is not in the scope of interopPermission.assert(). (I thought it should be a code defect) So alternatively, you can restructure the codes in SysMailer.New() as below:And that's just what I want to achieve with my blog: to get to know people and to help each other. So again: THANX A LOT, FRED !
void new(/* COM c = new COM(' CDO .Message')*/)
{
COM cdoConfig;
COM c;
InteropPermission permission = new InteropPermission(InteropKind::ComInterop);
;
permission.assert();
c = new COM('CDO .Message');
_COM = c;
//BP Deviation Documented
if (_COM.configuration() == null)
{
…