![]() |
#1 |
Участник
|
axaptapedia: Sysmailerattachments
Источник: http://www.axaptapedia.com/Sysmailerattachments
============== Summary: New page: If you use SMTP to send attachments, you cannot rename the attachment without saving it to disk and renaming it there. This new method on the SysMailerAttachments class applies a techniqu... If you use SMTP to send attachments, you cannot rename the attachment without saving it to disk and renaming it there. This new method on the SysMailerAttachments class applies a technique described on the web. The method should be called just after the attachment is added to the end of the email's attachment collection. X++: void renameAttachment(str _newName) { InteropPermission permission = new InteropPermission(InteropKind::ComInterop); SysMailerFields fields; int item; COM _BodyPart; ; permission.assert(); item = _COM.count(); // last attachment in collection _BodyPart = _COM.item(item); fields = SysMailerFields::create(_BodyPart.fields()); fields.add("urn:schemas:mailheader:content-disposition", "attachment; filename="+_newName); } The method was developed for AX2009 SP1 but likely can be backported to earlier versions. Источник: http://www.axaptapedia.com/Sysmailerattachments
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
![]() |
||||
Тема | Ответов | |||
axaptapedia: Tutorial Password | 1 | |||
axaptapedia: Startup Tool | 0 | |||
axaptapedia: Load Web Documents | 1 | |||
axcoder: AxPath is supported by axaptapedia | 0 |
|