Gets a reference to a collection of properties that define the characteristics of the e-mail message sent to new users.
Documentation for this section has not yet been entered.
The CreateUserWizard.MailDefinition property returns a reference to a group of properties that you use to define the format and content of the e-mail message that is sent to new users. Common settings include the subject line and the sender's return address. For a complete list of properties, see the System.Web.UI.WebControls.MailDefinition class.
The CreateUserWizard.MailDefinition property is read-only; however, you can set the properties of the System.Web.UI.WebControls.MailDefinition object it returns. You can set the CreateUserWizard.MailDefinition properties declaratively in the form Property-Subproperty, where Subproperty represents a property of the System.Web.UI.WebControls.MailDefinition class (for example, MailDefinition-Subject). You can also set the properties programmatically in the form Property.SubProperty (for example, MailDefinition.Subject).
An e-mail message is sent to new users only if System.Web.UI.WebControls.MailDefinition is not null and if System.Web.Mail.MailMessage.Body is not empty or null. In that case, the CreateUserWizard.SendingMail event is raised and an attempt is made to send the e-mail message. The MailDefinition.From property must be set to an e-mail address. Otherwise, an System.Web.HttpException exception is thrown.
When the e-mail message is created from the System.Web.UI.WebControls.MailDefinition object, it will make the substitutions listed in the following table.
<%UserName%> |
The user name of the newly created user account. |
<%Password%> |
The password for the newly created user account. |
If the MailDefinition.IsBodyHtml property of the System.Web.UI.WebControls.MailDefinition object is true, the contents of the mail message will be HTML encoded to guard against cross-site scripting security vulnerabilities for the message recipient.
You can use the CreateUserWizard.OnSendingMail(MailMessageEventArgs) method to modify the System.Web.Mail.MailMessage created by the System.Web.UI.WebControls.MailDefinition object.
This property cannot be set by themes or style sheet themes. For more information, see System.Web.UI.ThemeableAttribute and ASP.NET Themes Overview.
It is not possible to guarantee that a user will receive or view an e-mail message. To verify that a user has received a notification by e-mail, consider providing a confirmation link in the e-mail message that enables the user to confirm that the notification was received.