The error message appears whenever we attempt to send a email from inside CRM. I have cut and paste the error message that would have been sent to Microsoft
Microsoft Dynamics 365 Error Report Contents
<CrmScriptErrorReport>
<ReportVersion>1.0</ReportVersion>
<ScriptErrorDetails>
<Message>Unable to get property 'firstChild' of undefined or null reference</Message>
<ExceptionNumber>-2146823281</ExceptionNumber>
<Line>0</Line>
<URL>/form/page.aspx?appid=cbc050b0-cf87-e711-80fd-5065f38bb4d1&lcid=1033&themeId=1e3e2c50-d99e-e711-8103-5065f38b0191&tstamp=1004028&updateTimeStamp=636416010110134583&userts=131505614782580928&ver=1602530628#appid=cbc050b0-cf87-e711-80fd-5065f38bb4d1&etc=4202&extraqs=%3fetc%3d4202%26partyid%3d%257b45870421-5B92-E711-8102-C4346BDC42D1%257d%26partyname%3dSean%2520Latty%26partytype%3d4%26regardingobjectid%3d%257b45870421-5B92-E711-8102-C4346BDC42D1%257d%26regardingobjectidname%3dSean%2520Latty%26regardingobjecttypecode%3dlead&pagemode=iframe&pagetype=entityrecord&counter=1506092488599</URL>
<PageURL>/form/page.aspx?appid=cbc050b0-cf87-e711-80fd-5065f38bb4d1&lcid=1033&themeId=1e3e2c50-d99e-e711-8103-5065f38b0191&tstamp=1004028&updateTimeStamp=636416010110134583&userts=131505614782580928&ver=1602530628#appid=cbc050b0-cf87-e711-80fd-5065f38bb4d1&etc=4202&extraqs=%3fetc%3d4202%26partyid%3d%257b45870421-5B92-E711-8102-C4346BDC42D1%257d%26partyname%3dSean%2520Latty%26partytype%3d4%26regardingobjectid%3d%257b45870421-5B92-E711-8102-C4346BDC42D1%257d%26regardingobjectidname%3dSean%2520Latty%26regardingobjecttypecode%3dlead&pagemode=iframe&pagetype=entityrecord&counter=1506092488599</PageURL>
<Function>anonymous($p0,$p1,$p2,$p3,$p4){var$v_0=[],$v_1="SE"+$p0.toString(),$v_2=this._eventSubscribers[$v_1];if(!IsNull($v_2))for(var$v_3=0;$v_3<$v_2.length;$v_3++){var$v_4=$v_2[$v_3].trim();if($p3&&($p2&&$v_4===$p2.get_id()))continue;var$v_5=$find($v_4);if($v_5&</Function>
<FunctionRaw>function($p0,$p1,$p2,$p3,$p4){var $v_0=[],$v_1="SE"+$p0.toString(),$v_2=this._eventSubscribers[$v_1];if(!IsNull($v_2))for(var $v_3=0;$v_3<$v_2.length;$v_3++){var $v_4=$v_2[$v_3].trim();if($p3&&($p2&&$v_4===$p2.get_id()))continue;var $v_5=$find($v_4);if($v</FunctionRaw>
<CallStack>
<Function>anonymous($p0,$p1,$p2,$p3,$p4){var$v_0=[],$v_1="SE"+$p0.toString(),$v_2=this._eventSubscribers[$v_1];if(!IsNull($v_2))for(var$v_3=0;$v_3<$v_2.length;$v_3++){var$v_4=$v_2[$v_3].trim();if($p3&&($p2&&$v_4===$p2.get_id()))continue;var$v_5=$find($v_4);if($v_5&&(!IsNull(Mscrm.PageManager.get_instance())&&!Mscrm.PageManager.get_isUnloading()))try{var$v_6=$v_5.handleEvent($p0,$p1,$p2);$v_0[$v_0.length]=$v_6}catch($v_7){catchError($v_7.message,window.location.href,0,true,$p4,$v_7.number)}}return$v_0}</Function>
<Function>anonymous(eventCode,parameters,sourceComponent,sourceEventManagerId){var$v_0=[],$v_1;$v_1=this.$7z_1(eventCode,parameters,sourceComponent,false,arguments.caller);$v_0=$v_0.concat($v_1);$v_1=this.$7y_1(eventCode,parameters,sourceComponent,sourceEventManagerId,false);$v_0=$v_0.concat($v_1);return$v_0}</Function>
<Function>anonymous($p0,$p1,$p2,$p3,$p4){var$v_0=[];if(!IsNull(this.$3U_1))for(var$v_1=0;$v_1<this.$3U_1.length;$v_1++){var$v_2=this.$3U_1[$v_1].trim();if($p4&&$v_2===$p3)continue;var$v_3=$find($v_2);if($v_3&&!IsNull(Mscrm.PageManager.get_instance())&&!Mscrm.PageManager.get_isUnloading()){var$v_4=$v_3.propogateEvent($p0,$p1,$p2,this.get_id());$v_0=$v_0.concat($v_4)}}if(!IsNull(this.$1v_1)){var$$dict_F=this.$1v_1;for(var$$key_Gin$$dict_F){var$v_5={key:$$key_G,value:$$dict_F[$$key_G]},$v_6=$v_5.key;if($p4&&$v_6===$p3)continue;var$v_7=$v_5.value;try{var$v_8=$v_7.propogateEvent($p0,$p1,$p2,this.get_id());$v_0=$v_0.concat($v_8)}catch($$e_E){}}}return$v_0}</Function>
<Function>anonymous(eventCode,parameters,sourceComponent){var$v_0=false;try{if(window.location.href.toUpperCase().indexOf("OUTLOOK://")>=0)$v_0=true}catch($$e_4){return[]}if(IsNull(this.$m_1))this.$5F_1++;var$v_1=[],$v_2;try{switch(eventCode){case0:if(!IsNull(this.$1v_1)){var$v_4=this.get_id()+"hastcemid=",$$dict_9=this.$1v_1;for(var$$key_Ain$$dict_9){var$v_5={key:$$key_A,value:$$dict_9[$$key_A]};$v_4+=$v_5.key+","}alert($v_4)}break}var$v_3=arguments.caller;$v_2=this.$7z_1(eventCode,parameters,sourceComponent,true,$v_3);$v_1=$v_1.concat($v_2);$v_2=this.$7y_1(eventCode,parameters,sourceComponent,this.get_id(),false);$v_1=$v_1.concat($v_2);if(!$v_0&&!IsNull(this.$m_1)){$v_2=this.$m_1.bubbleEvent(eventCode,parameters,sourceComponent,this.$2Y_1?this.$2g_1:this.get_id(),$v_3);$v_1=$v_1.concat($v_2)}}catch($v_6){catchError($v_6.message,window.location.href,0,true,null,$v_6.number)}finally{if(IsNull(this.$m_1))this.$5F_1--}return$v_1}</Function>
<Function>anonymous(eventCode,parameters){returnthis.get_eventManager().raiseEvent(eventCode,parameters,this)}</Function>
<Function>anonymous($p0,$p1){var$v_0=false,$v_1=newMscrm.Performance.PerformanceStopwatch("LoadCommandBarData");$v_1.start();try{if(IsNull($p0)||$p0.$3K_2||CUI.ScriptUtility.isNullOrUndefined($p0.get_isDisposed())||$p0.get_isDisposed()){$v_0=true;return}this.$B_3&&!this.$B_3._disposed&&!this.$B_3.$2x_2&&this.$B4_3(this.$B_3);this.$Fx_3();this.$26_3=[];$p0.$5d_2="commandContainer"+Mscrm.RibbonManager.$AL++;$p0.$2Q_2=this;var$v_2=document.createElement("div");$v_2.id=$p0.$5d_2;try{this.$B_3=!$p0.get_isEmpty()?$p0:this.$1N_3}catch($$e_5){this.$B_3=this.$1N_3}if(!IsNull(this.$39_3)){Mscrm.Utilities.destroyElement(this.$39_3);this.$39_3=null}this.$CT_3();this.get_element().appendChild($v_2);if(!$p0.get_$4D_3()){this.get_element().style.height="62px";if($p1&&!isNullOrEmptyString($p1["uri"])){var$v_7=$p1["uri"].toString(),$v_8=newRegExp(".*WopiFrame.aspx.*");if(!$v_7.search($v_8))this.get_element().style.height="38px"}}elsethis.get_element().style.height="43px";this.$39_3=$v_2;this.get_element().setAttribute("currentRibbonElement",$v_2.id);var$v_3=newMscrm.CommandBarBuildOptions($p0);$v_3.$7E_0=$p0.get_$Jc_2();$v_3.$2f_0=this.get_numberOfButtonsForDisplay();$v_3.$u_0=this.get_availableWidth();var$v_4=newMscrm.CommandBarBuilder($v_3,$v_2);$p0.$S_3=$v_4;$v_4.buildCommandBar($p0);var$v_5=false;if(!$p0.get_$4D_3()&&!this.$2w_3&&!this.$Hg_3($v_2)){this.get_element().style.display="none";$v_5=true}else{if(isNullOrEmptyString(this.get_element().style.display)||this.get_element().style.display==="none")$v_5=true;this.get_element().style.display="block";$v_2.style.display="inline";if($p0===this.$1N_3&&Mscrm.Utilities.getContentUrl(null).isTurboFormUrl())this.get_element().style.display="none";elseif(Mscrm.PerceivedCommandBarHelper.hasPerceivedCommandBar())this.get_element().style.visibility="hidden";elsethis.get_element().style.visibility="visible"}this.$CY_3();this.$EX_3();this.$6u_3=true;if(!this.$40_3){this.$40_3=true;if(Mscrm.Utilities.getContentUrl(null).isTurboFormUrl())this.$B7_3();elsethis.$3z_3=window.setTimeout(this.$$d_$B7_3,100)}var$v_6=$get("perceivedRibbonId");if(!IsNull($v_6)){if($get("crmTopBar")){$get("crmTopBar").style.visibility="visible";if(this.get_hideCommandBar())for(var$v_9=$get("crmTopBar").getElementsByTagName("A"),$v_A=0;$v_A<$v_9.length;$v_A++)$v_9[$v_A].setAttribute("tabindex","-1")}$v_6.style.visibility="hidden";$v_6.innerHTML="<div/>"}$v_5&&this.raiseEvent(20,null);this.raiseEvent(74,null)}finally{if(!$v_0){this.$CY_3();executeFunctionDeferred(this.$$d_$Iq_3,true,false)}}$v_1.stop()}</Function>
<Function>anonymous($p0,$p1){try{if($p0.get_isDisposed())return;this.$De_3($p0,$p1)}catch($v_0){if($v_0.number!==-2146823277)throw$v_0}}</Function>
<Function>anonymous($p0,$p1){if(!isInstanceOfTypeAcrossFrames($p0,Mscrm.CommandBarData))return;if($p0.get_$97_2()&&IsNull(this.$1N_3)){this.$1N_3=$p0;return}if(!IsNull($p1)&&!IsNull($p1["sourceUri"])&&$p1["sourceUri"].toString().toLowerCase().indexOf("/form/page.aspx")>0){this.$CB_3();this.$Df_3($p0,$p1)}elsethis.loadCommandBarDataAsync($p0,$p1)}</Function>
<Function>anonymous(eventCode,parameters,sourceComponent){switch(eventCode){case35:if(!IsNull(sourceComponent)){var$v_0=sourceComponent;if(!$v_0.get_$1u_2()){var$v_1=$v_0;(!$v_1.get_isEmpty()||$v_1.get_$6S_2()==="HomePageGrid")&&this.$HP_3($v_1,parameters)}else{var$v_2=$v_0,$v_3=this.$2w_3&&$v_2.get_$4D_3()&&!this.$Hl_3(parameters)||!this.$2w_3&&!$v_2.get_$4D_3();$v_3&&this.$HJ_3($v_2,parameters)}}break;case36:if(!IsNull(sourceComponent)){var$v_4=sourceComponent;if(!$v_4.get_$1u_2())this.$HQ_3(sourceComponent);else{var$v_5=$v_4,$v_6=this.$2w_3&&$v_5.get_$4D_3()||!this.$2w_3&&!$v_5.get_$4D_3();$v_6&&this.$B4_3($v_5)}}break;case9:this.$HM_3(sourceComponent,parameters);break;case29:this.$HN_3(sourceComponent);break;case32:this.$BR_3(parameters);break;case34:var$v_7=parameters["command"],$v_8=parameters["id"];if($v_7&&typeof$v_7==="string"&&$v_8&&typeof$v_8==="string")returnthis.$96_3($v_7,$v_8);elsereturnfalse;case33:var$v_9=parameters["command"],$v_A=parameters["id"];if($v_9&&typeof$v_9==="string"&&$v_A&&typeof$v_A==="string")returnthis.$Hj_3($v_9,$v_A);elsereturnfalse;case31:var$v_B=parameters["command"],$v_C=parameters["getRibbonXmlForOutlookClient"];if($v_B&&typeof$v_B==="string")if(!$v_C)this.$Ag_3($v_B);else{var$v_D=this.$HI_3($v_B,parameters);parameters["RibbonXmlForOutlookClientResult"]=$v_D}break;case37:var$v_E=parameters,$v_F=$v_E.Minimized;if(!IsNull($v_F)&&typeof$v_F==="boolean")Mscrm.RibbonManager.$6x=$v_F;this.raiseEvent(20,null);break;case39:if(!IsNull(this.$B_3)&&!this.$B_3.get_$1u_2()){var$v_G=parameters;Mscrm.RibbonNavigationModel.onTabSwitch($v_G.OldContextId,$v_G.NewContextId,this.$B_3,$v_G.ChangedByUser)}break;case56:case55:var$v_H=parameters;this.$JO_3(eventCode,$v_H.eventElement);break;case14:if(this.$2a_3)break;if(!this.$40_3){this.$40_3=true;this.$3z_3=window.setTimeout(this.$$d_$B7_3,100)}break;case94:!IsNull(this.$B_3)&&!this.$B_3._disposed&&this.$B_3.get_$1u_2()===1&&this.$E9_3();break;case74:this.$2w_3&&this.$HZ_3();break}returnnull}</Function>
<Function>anonymous($p0,$p1,$p2,$p3,$p4){var$v_0=[],$v_1="SE"+$p0.toString(),$v_2=this._eventSubscribers[$v_1];if(!IsNull($v_2))for(var$v_3=0;$v_3<$v_2.length;$v_3++){var$v_4=$v_2[$v_3].trim();if($p3&&($p2&&$v_4===$p2.get_id()))continue;var$v_5=$find($v_4);if($v_5&&(!IsNull(Mscrm.PageManager.get_instance())&&!Mscrm.PageManager.get_isUnloading()))try{var$v_6=$v_5.handleEvent($p0,$p1,$p2);$v_0[$v_0.length]=$v_6}catch($v_7){catchError($v_7.message,window.location.href,0,true,$p4,$v_7.number)}}return$v_0}</Function>
<Function>anonymous(eventCode,parameters,sourceComponent,sourceEventManagerId,caller){var$v_0=[],$v_1;$v_1=this.$7z_1(eventCode,parameters,sourceComponent,true,caller);$v_0=$v_0.concat($v_1);$v_1=this.$7y_1(eventCode,parameters,sourceComponent,sourceEventManagerId,true);$v_0=$v_0.concat($v_1);if(!IsNull(this.$m_1)){$v_1=this.$m_1.bubbleEvent(eventCode,parameters,sourceComponent,this.$2Y_1?this.$2g_1:this.get_id(),caller);$v_0=$v_0.concat($v_1)}return$v_0}</Function>
<Function>anonymous(eventCode,parameters,sourceComponent){var$v_0=false;try{if(window.location.href.toUpperCase().indexOf("OUTLOOK://")>=0)$v_0=true}catch($$e_4){return[]}if(IsNull(this.$m_1))this.$5F_1++;var$v_1=[],$v_2;try{switch(eventCode){case0:if(!IsNull(this.$1v_1)){var$v_4=this.get_id()+"hastcemid=",$$dict_9=this.$1v_1;for(var$$key_Ain$$dict_9){var$v_5={key:$$key_A,value:$$dict_9[$$key_A]};$v_4+=$v_5.key+","}alert($v_4)}break}var$v_3=arguments.caller;$v_2=this.$7z_1(eventCode,parameters,sourceComponent,true,$v_3);$v_1=$v_1.concat($v_2);$v_2=this.$7y_1(eventCode,parameters,sourceComponent,this.get_id(),false);$v_1=$v_1.concat($v_2);if(!$v_0&&!IsNull(this.$m_1)){$v_2=this.$m_1.bubbleEvent(eventCode,parameters,sourceComponent,this.$2Y_1?this.$2g_1:this.get_id(),$v_3);$v_1=$v_1.concat($v_2)}}catch($v_6){catchError($v_6.message,window.location.href,0,true,null,$v_6.number)}finally{if(IsNull(this.$m_1))this.$5F_1--}return$v_1}</Function>
<Function>anonymous(eventCode,parameters){returnthis.get_eventManager().raiseEvent(eventCode,parameters,this)}</Function>
<Function>anonymous($p0,$p1,$p2,$p3){if((!$p3||!this.$A9_2)&&($find("crmPageManager")===$p1||$find("crmInlinePageManager")===$p1)){var$v_0=null;if(!IsNull($p0))$v_0=$p0["sourceUri"];if(!IsNull($v_0)&&!$v_0.compare(Mscrm.Utilities.getContentUrl(null),true,5))return;var$v_1=(Mscrm.InternalUtilities.Utilities.isRefreshForm()&&$p2||!Mscrm.InternalUtilities.Utilities.isRefreshForm()&&!$p2||Mscrm.InternalUtilities.Utilities.isTurboForm())&&!$p3;if($v_1){this.initializeRefreshHandler();this.raiseEvent(35,$p0)}elseif($p3){this.$A9_2=true;this.raiseEvent(36,null);this.dispose()}}}</Function>
<Function>anonymous(eventCode,parameters,sourceComponent){switch(eventCode){case9:this.$BM_2(parameters,sourceComponent,false,false);break;case101:this.$BM_2(parameters,sourceComponent,true,false);break;case29:this.$BM_2(parameters,sourceComponent,false,true);break;case87:if($find("crmPageManager")===sourceComponent){if(!this.get_$97_2())this.$3K_2=false;this.raiseEvent(35,null)}break;case45:if($find(sourceComponent.get_id())===sourceComponent)if(sourceComponent===this.$2P_2&&this.$2Q_2)this.raiseEvent(32,null);elsesourceComponent===this._currentSelectedControl&&this.setSelectedControlValues(sourceComponent);break;case38:this.setSelectedControl(parameters);break;case39:this.handleRibbonTabSwitch(parameters);break}returnnull}</Function>
<Function>anonymous($p0,$p1,$p2,$p3,$p4){var$v_0=[],$v_1="SE"+$p0.toString(),$v_2=this._eventSubscribers[$v_1];if(!IsNull($v_2))for(var$v_3=0;$v_3<$v_2.length;$v_3++){var$v_4=$v_2[$v_3].trim();if($p3&&($p2&&$v_4===$p2.get_id()))continue;var$v_5=$find($v_4);if($v_5&&(!IsNull(Mscrm.PageManager.get_instance())&&!Mscrm.PageManager.get_isUnloading()))try{var$v_6=$v_5.handleEvent($p0,$p1,$p2);$v_0[$v_0.length]=$v_6}catch($v_7){catchError($v_7.message,window.location.href,0,true,$p4,$v_7.number)}}return$v_0}</Function>
<Function>anonymous(eventCode,parameters,sourceComponent,sourceEventManagerId){var$v_0=[],$v_1;$v_1=this.$7z_1(eventCode,parameters,sourceComponent,false,arguments.caller);$v_0=$v_0.concat($v_1);$v_1=this.$7y_1(eventCode,parameters,sourceComponent,sourceEventManagerId,false);$v_0=$v_0.concat($v_1);return$v_0}</Function>
<Function>anonymous($p0,$p1,$p2,$p3,$p4){var$v_0=[];if(!IsNull(this.$3U_1))for(var$v_1=0;$v_1<this.$3U_1.length;$v_1++){var$v_2=this.$3U_1[$v_1].trim();if($p4&&$v_2===$p3)continue;var$v_3=$find($v_2);if($v_3&&!IsNull(Mscrm.PageManager.get_instance())&&!Mscrm.PageManager.get_isUnloading()){var$v_4=$v_3.propogateEvent($p0,$p1,$p2,this.get_id());$v_0=$v_0.concat($v_4)}}if(!IsNull(this.$1v_1)){var$$dict_F=this.$1v_1;for(var$$key_Gin$$dict_F){var$v_5={key:$$key_G,value:$$dict_F[$$key_G]},$v_6=$v_5.key;if($p4&&$v_6===$p3)continue;var$v_7=$v_5.value;try{var$v_8=$v_7.propogateEvent($p0,$p1,$p2,this.get_id());$v_0=$v_0.concat($v_8)}catch($$e_E){}}}return$v_0}</Function>
<Function>anonymous(eventCode,parameters,sourceComponent){var$v_0=false;try{if(window.location.href.toUpperCase().indexOf("OUTLOOK://")>=0)$v_0=true}catch($$e_4){return[]}if(IsNull(this.$m_1))this.$5F_1++;var$v_1=[],$v_2;try{switch(eventCode){case0:if(!IsNull(this.$1v_1)){var$v_4=this.get_id()+"hastcemid=",$$dict_9=this.$1v_1;for(var$$key_Ain$$dict_9){var$v_5={key:$$key_A,value:$$dict_9[$$key_A]};$v_4+=$v_5.key+","}alert($v_4)}break}var$v_3=arguments.caller;$v_2=this.$7z_1(eventCode,parameters,sourceComponent,true,$v_3);$v_1=$v_1.concat($v_2);$v_2=this.$7y_1(eventCode,parameters,sourceComponent,this.get_id(),false);$v_1=$v_1.concat($v_2);if(!$v_0&&!IsNull(this.$m_1)){$v_2=this.$m_1.bubbleEvent(eventCode,parameters,sourceComponent,this.$2Y_1?this.$2g_1:this.get_id(),$v_3);$v_1=$v_1.concat($v_2)}}catch($v_6){catchError($v_6.message,window.location.href,0,true,null,$v_6.number)}finally{if(IsNull(this.$m_1))this.$5F_1--}return$v_1}</Function>
<Function>anonymous(eventCode,parameters){returnthis.get_eventManager().raiseEvent(eventCode,parameters,this)}</Function>
</CallStack>
</ScriptErrorDetails>
<ClientInformation>
<BrowserUserAgent>Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; .NET4.0C; .NET4.0E; Tablet PC 2.0; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; HCTE; H9P; McAfee; rv:11.0) like Gecko</BrowserUserAgent>
<BrowserLanguage>en-US</BrowserLanguage>
<SystemLanguage>en-JM</SystemLanguage>
<UserLanguage>en-JM</UserLanguage>
<ScreenResolution>1366x768</ScreenResolution>
<ClientName>Web</ClientName>
<ClienState>Online</ClienState>
<ClientTime>2017-09-22T10:01:29</ClientTime>
</ClientInformation>
<ServerInformation>
<OrgLanguage>1033</OrgLanguage>
<OrgCulture>8201</OrgCulture>
<UserLanguage>1033</UserLanguage>
<UserCulture>1033</UserCulture>
<OrgID>{E02149E9-F5F1-4F77-BBED-C6198AA47A12}</OrgID>
<UserID>{44C22AA1-D4CA-4EDB-9EEC-63733ADB0F33}</UserID>
<CRMVersion>8.2.1.360</CRMVersion>
</ServerInformation>
</CrmScriptErrorReport>
*This post is locked for comments