Home > Ax Technical > Sending Emails from Ax

Sending Emails from Ax

November 28, 2006 Leave a comment Go to comments

<![CDATA[

 
 
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 
 
 
 

]]>

Advertisements
  1. Raza Abbas
    July 23, 2006 at 11:42 am

    Any particular advantage of using SysINetMail ? (say over SysMail or through the COM Class Wrappers which essentially allow us to do the same thing ) ?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: