Content Studio Web Content Management System
SystemObject
ContentStudio.SiteCodeBase
ContentStudio.Site.ActiveScriptingActiveScriptingBase
ContentStudio.Site.ActiveScripting.MiscMailForm
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
Top
Top
Top
To use this class, create an instance of this object, and call the Invoke
method with an appropriate set of parameters and properties.
This class generates inline code, thus you must wrap it into a block
element to make the page validate according to the HTML/XHTML
regulations.
The generated code is fully HTML/XHTML strict compatible.
The following code demonstrates how to use the MailForm class
[This is preliminary documentation and is subject to change.]
Mails all fields that are posted except those specified in excluded
fields property. The MailSent property can be used to see if the
mail(s) have been sent.
Inheritance Hierarchy
ContentStudio.SiteCodeBase
ContentStudio.Site.ActiveScriptingActiveScriptingBase
ContentStudio.Site.ActiveScripting.MiscMailForm
Namespace: ContentStudio.Site.ActiveScripting.Misc
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
The MailForm type exposes the following members.
Constructors
Name | Description | |
---|---|---|
MailForm |
Constructs a new instance of the MailForm class that writes to
the default response stream
| |
MailForm(Stream) |
Constructs a new instance of the MailForm class that writes to
the supplied stream
|
Properties
Name | Description | |
---|---|---|
BackwardsComponentCompatibilityMode |
Sets or gets a value that indicates whether the code runs in backwards
compatibility component mode. The default value is false.
(Inherited from ActiveScriptingBase.) | |
ComponentName | Gets the name of the component (Overrides ActiveScriptingBaseComponentName.) | |
Conformance |
Gets a value which specifies which type of code a component can generate.
(Overrides ActiveScriptingBaseConformance.) | |
ElementType |
Gets a value which specifies the type of outer element the component generates.
(Overrides ActiveScriptingBaseElementType.) | |
Encoding |
Sets or gets the encoding the component uses. The default encoding is
the UTF8 encoding without byte order mark.
(Inherited from ActiveScriptingBase.) | |
ExcludeFields |
Sets or gets an array of field names that should be excluded from the
mail. The default value is null.
| |
FieldMailTo |
Sets or gets name of the field that contains the comma separated list
of recipients of the mail. The default value is "recipients".
| |
FieldSubject |
Sets or gets name of the field that contains the subject line. The
default value is "subject"
| |
From |
Sets or gets the FROM address. The default value is
"MailformComponent@contentstudio.se"
| |
MailSendMethod |
Sets or gets the addressing method to use. The default value is SendMethod.To.
| |
MailSent |
Gets a value indicating if the mail has been sent. The default value is
false.
| |
Password |
Sets or gets the password for the mail server. The default value is an
empty string
| |
SendAsPlainText |
Sets or gets a value indicating if the mail should be sent as plain
text. The default value is false (sending it as HTML instead).
| |
ServerName |
Sets or gets the name or IP address of the mail server. The default
value is an empty string.
| |
StaticMailTo |
Sets or gets the comma separated list of recipients to use if no data
is available via FieldMailTo. The default value is an empty
string.
| |
StaticSubject |
Sets or gets the subject subject line to use if no data is available
via FieldSubject. The default value is an empty string
| |
TextAfter |
Sets or gets the text to display in the mail body after the generated
content. The default value is an empty string
| |
TextBefore |
Sets or gets the text to display in the mail body before the generated
content. The default value is an empty string
| |
Username |
Sets or gets the username to be used with the mail server. The default
value is an empty string
|
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
Invoke |
Invokes the component and sends the mail according to the
specifications.
| |
SendMail |
Sends a mail with specific content and settings. Use this method if you
want to customize the content of the mail, instead of calling the Invoke
method.
| |
ToString | (Inherited from Object.) |
Remarks
Examples
MailForm mf = new MailForm(); mf.ServerName = "mailserver"; mf.StaticMailTo = "info@contentstudio.se"; // Invoke will do the mail sending if a form posts to this page mf.Invoke();
See Also