Sending Email from AX

Below code snippet is used to send mail from AX to the desired user:

public void SendEmailNotificationTest()
    SysMailer mail;
    InteropPermission permission = new InteropPermission(InteropKind::ComInterop);
    str fromMail,body,sub;
    str 100 tomail;


    mail = new SysMailer();

    fromMail = ""; //Take the mail Id from the Email Parameters  
                                          // in System admin\setup\system\Email Parameters
    tomail = "Receiver mail ID";
    sub="Service Warrenty PO Alert ";

    body = "Test Email body";


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s