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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.11.2006, 14:10   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
casperkamal: Sending Emails from Ax
Источник: http://casperkamal.spaces.live.com/B...CD63!183.entry
==============

 
 
Senidng Emails from Ax is very simple. Ax has a class called the sysInetMail which can be used to send E-mail with or without attachments.
 
 
Sending  a simple E- mail
 
   SysInetMail sysInetMail = new SysInetMail();
   sysInetMail.sendMail('casperkamal@hotmail.com', 'Subject:Checking Email', 'This is a check mail', false);
 
 
The above code opens up a  small dialog where you will have to allow Ax to access Outlook and the mail would be sent immediately.
 
if you want the user to edit the mail or have a final look of it , then don't provide the To address in the parameters. This will open up the Outlook message window from where the user can see his content and then send it manually. There is one more advantage if you don't provide the To address, the outlook dialog which pops up for allowing access will also not appear. The code for that has to be something like this......
 
 
  sysInetMail.sendMail(' ', 'Subject:Checking Email', 'This is a check mail', false);
 
 
Sending an E-mail with attachment
 
    SysInetMail sysInetMail = new SysInetMail();
    sysInetMail.sendMailAttach('casperkamal@hotmail.com',  'anyccaddress', 'Subject:Checking Email', 'This is a check   
                                         mail',false',C:\link.txt'); 
    
Here you have extra parameters to specify 'cc' and attachement location. You can avoid the 'To' parameter, if you want the message window to be displayed.
 
    To send e-mail to multiple email address just type them on the to parmeter separated by semicolon
 
 
 
.................... Keep sending 
 
 
 



Источник: http://casperkamal.spaces.live.com/B...CD63!183.entry
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05
Arijit Basu: AX 2009 - Quick Overview Blog bot DAX Blogs 4 19.05.2008 14:47
casperkamal: Sending alerts through code without error in Ax Blog bot DAX Blogs 0 24.03.2008 21:05
casperkamal: Using ADO to read from Excel in Microsoft Dynamics Ax Blog bot DAX Blogs 2 14.05.2007 11:59
casperkamal: InventDim id blank from "Axapta" to "AllBlank" in Dynamics Ax Blog bot DAX Blogs 4 27.02.2007 10:36
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 23:27.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.