System.IO.Stream workbookStream = new System.IO.MemoryStream();
SysMailerSMTP mailer = new SysMailerSMTP();
SysMailerMessageBuilder builder = new SysMailerMessageBuilder();
SysEmailParameters parameters = SysEmailParameters::find();
Notes content;
;
if (parameters.SMTPRelayServerName)
{
mailer.SMTPRelayServer(parameters.SMTPRelayServerName,
parameters.SMTPPortNumber,
parameters.SMTPUserName,
SysEmailParameters::password(),
parameters.SMTPUseNTLM);
}
else
{
warning("@ApplicationFoundation:EmailProviderSMTPServerNotFound");
}
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.setFrom(SysEmailParameters::find().SMTPUserName);
builder.addTo("test@test.com");
//builder.addAttachment(workbookStream,path);
builder.setSubject(strfmt("AAAA" , ""));
builder.setBody(content);
SysMailerFactory::getNonInteractiveMailer().sendNonInteractive(builder.getMessage());
SysMailerSMTP mailer = new SysMailerSMTP();
SysMailerMessageBuilder builder = new SysMailerMessageBuilder();
SysEmailParameters parameters = SysEmailParameters::find();
Notes content;
;
if (parameters.SMTPRelayServerName)
{
mailer.SMTPRelayServer(parameters.SMTPRelayServerName,
parameters.SMTPPortNumber,
parameters.SMTPUserName,
SysEmailParameters::password(),
parameters.SMTPUseNTLM);
}
else
{
warning("@ApplicationFoundation:EmailProviderSMTPServerNotFound");
}
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.setFrom(SysEmailParameters::find().SMTPUserName);
builder.addTo("test@test.com");
//builder.addAttachment(workbookStream,path);
builder.setSubject(strfmt("AAAA" , ""));
builder.setBody(content);
SysMailerFactory::getNonInteractiveMailer().sendNonInteractive(builder.getMessage());
No comments:
Post a Comment