Quantcast
Channel: Ansar Basha's Activities
Viewing all articles
Browse latest Browse all 580

Article 8

$
0
0

//Send E-mail in AX using below Job

static void emails(Args _args)
{
  SysMailer _sendMail;
  Args argsRep = new Args();
  Args argsInv= new Args();
  Reportrun reportInv;
  ReportRun reportRep;
  Set permissionSet,permissionSet1;
  InteropPermission perm1;
  ;
  perm1 = new InteropPermission(InteropKind::ComInterop);
  perm1.assert();
  _sendMail = new Sysmailer();
  // _sendMail.SMTPRelayServer(‘Server smtp/IP address’,Port no(25),’Your E-mailId,’Your password’,false);
  _sendMail.SMTPRelayServer(‘smtp.gmail.com’,587,’aaa@gmail.com’,’xxxxx’,false);
  _sendMail.fromAddress(“aaa@gmail.com”);
  _sendMail.tos().appendAddress(“aaa@gmail.com”);
  _sendMail.ccs().appendAddress(“aaa@gmail.com”);

  _sendMail.subject(strfmt(‘Test Mail’));
  _sendMail.htmlBody(strfmt(‘This is an automated generated Test Mail’));

  _sendMail.sendMail();
  info(“mail sent”);
}



Viewing all articles
Browse latest Browse all 580

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>