System.IO.Stream workbookStream = new System.IO.MemoryStream();
SysMailerSMTP mailer = new SysMailerSMTP();
SysMailerMessageBuilder builder = new SysMailerMessageBuilder();
SysEmailParameters parameters = SysEmailParameters::find();
FileIOPermission fileIOPermission;
InteropPermission interopPerm;
Notes content;
Filepath = c:/temp/"filename"
System.IO.Stream filestream = File::UseFileFromURL(Filepath );
builder.setFrom(SysEmailParameters::find().SMTPUserName);
builder.addTo("Test@test.com");
builder.addAttachment(filestream,"Bookings.csv");
builder.setSubject("Ax_Daily Shipment report");
builder.setbody(content );
content ="";
content = content + strfmt("\n<p dir=ltr align=left>Hello, </p> ");
content = content + strfmt("\n<p dir=ltr align=left>XXXXXXX : %1 </p> ","");
content = content + strfmt("\n<p dir=ltr align=left>YYYYYY: %1 </p> ", "");
content = content + strfmt('\n<p dir=ltr align=left></p>');
content = content + strfmt('\n<p dir=ltr align=left></p>');
// builder.setBody("Please take a look at the attachment having shipping date changed");
SysMailerFactory::getNonInteractiveMailer().sendNonInteractive(builder.getMessage());
SysMailerSMTP mailer = new SysMailerSMTP();
SysMailerMessageBuilder builder = new SysMailerMessageBuilder();
SysEmailParameters parameters = SysEmailParameters::find();
FileIOPermission fileIOPermission;
InteropPermission interopPerm;
Notes content;
Filepath = c:/temp/"filename"
System.IO.Stream filestream = File::UseFileFromURL(Filepath );
builder.setFrom(SysEmailParameters::find().SMTPUserName);
builder.addTo("Test@test.com");
builder.addAttachment(filestream,"Bookings.csv");
builder.setSubject("Ax_Daily Shipment report");
builder.setbody(content );
content ="";
content = content + strfmt("\n<p dir=ltr align=left>Hello, </p> ");
content = content + strfmt("\n<p dir=ltr align=left>XXXXXXX : %1 </p> ","");
content = content + strfmt("\n<p dir=ltr align=left>YYYYYY: %1 </p> ", "");
content = content + strfmt('\n<p dir=ltr align=left></p>');
content = content + strfmt('\n<p dir=ltr align=left></p>');
// builder.setBody("Please take a look at the attachment having shipping date changed");
SysMailerFactory::getNonInteractiveMailer().sendNonInteractive(builder.getMessage());
No comments:
Post a Comment