Skip to content
zehavibarak edited this page Oct 27, 2022 · 3 revisions
services.AddBizDoc(options => {
    options.Smtp.Host = "sendgrid";
});

To change the default XSLT, create a new XSLT file, choose 'Copy Always' in its file properties.

<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns="https://raw.githubusercontent.com/moding-il/bizdoc.core/master/message.xsd">
  <xsl:output method="html" indent="no"/>
  <xsl:template match="/Message">
    <html>
      <body>
          #<xsl:value-of select="Number"/>
          ...
        </body>
    </html>
</xsl>

Some limitations may apply to data models to allow them to be serialized as XML. Annotate your model with XmlIgnore, XmlAttribute, XmlArray and XmlArrayItem to control the XML structure.

xsd

Extra

You can pass extra data to XML by overriding the GetExtraDataAsync() method in your form server-side component and reading the data from XML Extra node.

Attachments

services.AddBizDoc(options => {
    options.Smtp.Attachments = AttachmentsPolicy.Inline;
});

Attachments Policy

Redirect

Set OnDeliverMessage() on SmtpSettings.

Delay

Set a delay time to outgoing emails, by setting the Delay in SmtpSettings.

options.Smtp.Delay = TimeSpan.FromMinutes(1);

Default in 30 seconds.