简体   繁体   English

带有 x++ 电子邮件附件的 Dynamics AX 4 问题

[英]Dynamics AX 4 issue with x++ email attachment

I want to send emails with attachment but I'm using AX V4 which is a 32 bits version and my office version is 64 bits so I can't use integrated email attachment with reportSendMail() method of Info class, I'm using the following code with sysemailbatch and sysinetMail classes:我想发送带附件的电子邮件,但我使用的是 32 位版本的 AX V4,而我的办公室版本是 64 位,因此我无法使用带有 Info 类的 reportSendMail() 方法的集成电子邮件附件,我正在使用以下带有 sysemailbatch 和 sysinetMail 类的代码:

sysemailbatch.parmAttachmentfileName(filename); //filename with path in UNC    

SysInetMail::sendEMail('01', 'fr', ToAddress, mappings, FromAddress, '\\\\UNC_path\MyAttachment.csv');

Both are working, I'm receiving the mail but no attachment, no error message I also tried email queue with sysemailTable methods, same thing, I receive mail without attachment两者都在工作,我收到邮件但没有附件,没有错误消息我也尝试使用 sysemailTable 方法的电子邮件队列,同样的事情,我收到没有附件的邮件

I'm using AX V4 SP1 on TSE servers in W2016.我在 W2016 的 TSE 服务器上使用 AX V4 SP1。 I allowed attachments from a specific path in Administration/Setup/email parameters我允许来自管理/设置/电子邮件参数中特定路径的附件

Any Ideas ?有任何想法吗 ?

I wrote this post 8 years ago for 2009, but I think it still applies.我在 8 年前为 2009 年写了这篇文章,但我认为它仍然适用。 I think I recall the Outlook piece being too problematic (server-side, client-side, 32-bit, 64-bit, mail profiles, etc) that I just bypassed it and made this post below.我想我记得 Outlook 部分问题太大(服务器端、客户端、32 位、64 位、邮件配置文件等),我只是绕过它并在下面发了这篇文章。

And for years after I've been at various customers and I find this same code and laugh a little, so others bypassed it too.在我接触过各种客户之后的多年里,我发现了相同的代码并笑了笑,所以其他人也绕过了它。 See if you can use it in AX 4.0 or if you can adapt it.看看您是否可以在 AX 4.0 中使用它,或者您是否可以对其进行调整。

https://www.alexondax.com/2012/01/how-to-send-emails-from-ax-without.html https://www.alexondax.com/2012/01/how-to-send-emails-from-ax-without.html

Then you can use the reportSendMail() method and your users can too.然后您可以使用reportSendMail()方法,您的用户也可以。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM