Wednesday, September 14, 2011

Mail Through Code

static void sendEmailThroughOutlook(Args args)
{
SmmOutlookEMail smmOutlookEMail = new SmmOutlookEMail();
Object smmSendEmail;
;
args = new Args();
args.name(formstr(smmSendEmail));
args.caller(smmOutlookEMail);
smmSendEmail = classfactory.formRunClass(args);

if (smmSendEmail)
{
smmSendEmail.init();
smmSendEmail.setEmailTos("jitendraknit@gmail.com");
smmSendEmail.setEmailSubject("jit");
//smmSendEmail.setAttachments(["C:\jit.txt"]);
smmSendEmail.run();
smmSendEmail.refreshControl();
smmSendEmail.wait();
}

Import XPO With Code

static void ImportXPOthroughCode(Args _args)
{
SysImportElements sysImportElements = new SysImportElements();
;

sysImportElements.newFile("D:\\Axaptacorner.xpo");// XPO filename
sysImportElements.parmImportAot(true);
sysImportElements.parmImportWithIds(false);
sysImportElements.import();
}