最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

类’CDO.Message’的COM对象中的方法’send’返回错误,并且学习了Dynamics Ax 2012 R3。/ Method ‘send’ in COM object of class ‘CDO.Message’ returned error and lesson learned Dynamics Ax 2012 R3.

网络文摘 alirazazaidi 2346浏览 0评论
Very interesting scenario we faced in one customization. Requirement was very simple and developer used very code to send Email. Usually testing will be done on dev box which has both AOS and client installed on same machine. No error occurred and code shipped to production. But when we deploy the code on production server and test the email sent functionality we got following error.
Method ‘send’ in COM object of class ‘CDO.Message’ returned error code 0x8004020F (<unknown>) which means: <unknown>.
After trouble shoot we found that when we run the AX client from another machine pointing to AOS this error occurred. There is some network security issue which did not access rights to SMTP server while running code from Client. So what is solution. Then we explore how Ax send email. What is out of the box solution. We found that in out of the box functionality, AX did not send email immediately,  Instead, they stored required information in some tables and then Batch sent emails on Server. So We changed our design and new code just inject information into out of the box tables and emails goes with out of box batch job. Only attachment part was little bit tricky. Recommendation and lesson learned that, instead calling Smtp server directly on code, we have to use out of the box functionality and just integrate it.
http://www.schweda.net/blog_ax.php?bid=454&vtid=YXgzMA==
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址