Click or drag to resize

EmailSMTPSetting Class

SMTP setting for email handling
Inheritance Hierarchy
SystemObject
  Velo.ServicesEmailSMTPSetting

Namespace:  Velo.Services
Assembly:  Velo.Services (in Velo.Services.dll) Version: 22.2.10.1 (22.2.10.450)
Syntax
public class SMTPSetting

The EmailSMTPSetting type exposes the following members.

Constructors
  NameDescription
Public methodEmailSMTPSetting
Initializes a new instance of the SMTPSetting class. Constructor without parameter. Read setting from application configuration file app.config or web.config
Top
Properties
  NameDescription
Public propertyPassword
SMTP user password
Public propertyPort
SMTP port example: 587
Public propertyServer
SMTP server example: smtp.gmail.com
Public propertySSL
Is SMTP as SSL
Public propertyUser
SMTP user name
Top
Extension Methods
  NameDescription
Public Extension MethodCode exampleConvertDateFromSQL
Convert SQL date include value null
(Defined by Extension.)
Public Extension MethodConvertDateToSQL
Convert C# date type to SQL date type
(Defined by Extension.)
Top
Remarks
Default read setting from application configuration file app.config or web.config. Configuration file structure:
<configuration>
  <configSections>
    ...
    <!-- SMTP configuration Velo.Services.Email -->
    <section name="SMTPSetting" type="System.Configuration.NameValueSectionHandler"/>
    ...
  </configSections>
  ...
  <!-- SMTP configuration Velo.Services.Email -->
  <SMTPSetting>
    <add key="Server" value="smtp.gmail.com" />
    <add key="Port" value="587" />
    <add key="User" value="email" />
    <add key="Password" value="password" />
    <add key="SSL" value="true" />
  </SMTPSetting>
  ...
</configuration>
See Also