AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 01.07.2010, 22:07   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
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 Blog bot DAX Blogs 1 22.05.2009 21:23
axaptapedia: Startup Tool Blog bot DAX Blogs 0 13.02.2009 02:05
axaptapedia: Load Web Documents Blog bot DAX Blogs 1 03.01.2009 23:50
axcoder: AxPath is supported by axaptapedia Blog bot DAX Blogs 0 11.05.2007 10:00

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 20:18.