How Do I Use the Email Client: Custom Settings?

How Can We Help?

< Back

Answer

When initializing a new instance of the EmailClient there are 3 different options on which configurations to use for that instance:

Option 1

Default c#: email.Initialize();

Default VBNet: email.Initialize()

This will use the settings as defined by the application within the configuration settings.

Can be set using the custom email settings ribbon group within the settings ribbon tab in the XMDesigner.

Option 2

Passing a custom XML string into the constructor

Format of the XML

<key name="Alerts">
<key name="Email">
<key name="Server"><key name="Security"><value name="UserName" /><value name="Password" /></key><key name="DeliveryMethod"><value name="UseIISPickupDirectory">false</value><value name="PickupDirectory" /></key><key name="Settings"><value name="HostAddress" /><value name="Timeout">0</value><value name="RequiresSSL">false</value>
<value name="Port"></value></key></key><key name="Message"><key name="Subject"><value name="Encoding">us-ascii</value><value name="Text" /></key><key name="Body"><value name="Encoding">us-ascii</value><value name="Text" /><value name="IsHTML" /></key><key name="Options"><value name="From" /><value name="To" /><value name="CC" /><value name="BCC" /><value name="Priority">0</value><value name="ReplyTo" /></key></key>
</key>

Marked in red are the only required fields the rest can be used as required. If not provided they will default to the settings as per option 1.

Note: The above structure is important for the required fields.

Option 3

Storing the above XML with the custom settings node in the configuration file (through the XMDesigner) and calling the appropriate node when passing it to the constructor:

c#: email.Initialize(customSetting.Value(process.Compa ny, @”Node Name for Settings to use”));

VBNet: email.Initialize(customSetting.Value(process.Company, @”Node Name for Settings to use”))

Comments are closed.

This is the legacy version of the XMPro Documentation site. For the latest XMPro documentation, please visit documentation.xmpro.com

X