Skip to content

Replace SMTP in IIS 6.0 NIB link #3132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions xml/System.Web.UI.WebControls/ChangePassword.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

<a name="sending_email_messages"></a>
## Sending Email Messages
The <xref:System.Web.UI.WebControls.ChangePassword> control can be configured to use email services to send the new password to the user. To send email messages to users from any of ASP.NET Web server controls, you must configure an email server in the Web.config file for your application. For more information, see [NIB: How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://msdn.microsoft.com/library/ed204b58-24af-47d0-9687-60e5df5f17f8).
The <xref:System.Web.UI.WebControls.ChangePassword> control can be configured to use email services to send the new password to the user. To send email messages to users from any of ASP.NET Web server controls, you must configure an email server in the Web.config file for your application. For more information, see [How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://docs.microsoft.com/previous-versions/aspnet/8b83ac7t(v=vs.100)).

Email messages are configured using the <xref:System.Web.UI.WebControls.MailDefinition> class. You must set the <xref:System.Web.UI.WebControls.MailDefinition.BodyFileName%2A> property to instruct ASP.NET to send email.

Expand Down Expand Up @@ -2841,7 +2841,7 @@
## Examples
The following code example shows how to use the <xref:System.Web.UI.WebControls.ChangePassword.MailDefinition%2A> property to define an email message that is sent to users who change their passwords. It assumes that there is a file called `MailFile.txt` that contains the text of the email message to send.

To be able to send email messages to users, you must configure an email server in the Web.config file for your application. For more information, see [NIB: How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://msdn.microsoft.com/library/ed204b58-24af-47d0-9687-60e5df5f17f8).
To be able to send email messages to users, you must configure an email server in the Web.config file for your application. For more information, see [How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://docs.microsoft.com/previous-versions/aspnet/8b83ac7t(v=vs.100)).

[!code-aspx-csharp[ChangePasswordMailDefinition#1](~/samples/snippets/csharp/VS_Snippets_WebNet/ChangePasswordMailDefinition/CS/changepasswordmaildefinitioncs.aspx#1)]
[!code-aspx-vb[ChangePasswordMailDefinition#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/ChangePasswordMailDefinition/VB/changepasswordmaildefinitionvb.aspx#1)]
Expand Down Expand Up @@ -3614,7 +3614,7 @@
## Examples
The following code example demonstrates an ASP.NET page that uses a <xref:System.Web.UI.WebControls.ChangePassword> Web control, and includes an event handler for the <xref:System.Web.UI.WebControls.ChangePassword.SendingMail> event named `SendingMail`. The code example assumes that the ASP.NET Web site has been configured to use ASP.NET membership and Forms authentication, and that a user has been created whose name and password are known to you. For more information, see [How to: Implement Simple Forms Authentication](https://msdn.microsoft.com/library/9522bc8d-1a41-480a-aa11-c389a4ac2d2e).

If the password change succeeds, the code attempts to use SMTP to send an email message to the user to confirm the change. This is done in the`SendingMail` event handler. For information about how to configure an SMTP server, see [NIB: How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://msdn.microsoft.com/library/ed204b58-24af-47d0-9687-60e5df5f17f8). For the purposes of this example, it is not necessary to configure an SMTP server; the example is constructed to test for a failure to send an email message.
If the password change succeeds, the code attempts to use SMTP to send an email message to the user to confirm the change. This is done in the`SendingMail` event handler. For information about how to configure an SMTP server, see [How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://docs.microsoft.com/previous-versions/aspnet/8b83ac7t(v=vs.100)). For the purposes of this example, it is not necessary to configure an SMTP server; the example is constructed to test for a failure to send an email message.

If a mail server is not configured correctly or some other error occurs and the email message cannot be sent, the `SendMailError` function is called. A message is displayed to the user. In addition, an event is logged to the Windows Application event log with the assumption that an event source named MySamplesSite already exists. See the code example below to create the specified event source. For more information about creating an event source, see [Server Event Handling in ASP.NET Web Forms Pages](https://msdn.microsoft.com/library/765bfc89-33ee-4d0d-bbe6-3b172c06def9). The <xref:System.Web.UI.WebControls.SendMailErrorEventArgs.Handled%2A> property of the <xref:System.Web.UI.WebControls.SendMailErrorEventArgs> object is set to `true` to indicate that the error has been handled.

Expand Down Expand Up @@ -3717,7 +3717,7 @@
## Examples
The following code example demonstrates an ASP.NET page that uses a <xref:System.Web.UI.WebControls.ChangePassword> Web control, and includes an event handler for the <xref:System.Web.UI.WebControls.ChangePassword.SendingMail> event named `SendingMail`. The code example assumes that the ASP.NET Web site has been configured to use ASP.NET membership and Forms authentication, and that a user has been created whose name and password are known to you. For more information, see [How to: Implement Simple Forms Authentication](https://msdn.microsoft.com/library/9522bc8d-1a41-480a-aa11-c389a4ac2d2e).

If the password change succeeds, the code attempts to use SMTP to send an email message to the user to confirm the change. This is done in the`SendingMail` event handler. For information about how to configure an SMTP server, see [NIB: How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://msdn.microsoft.com/library/ed204b58-24af-47d0-9687-60e5df5f17f8). For the purposes of this example, it is not necessary to configure an SMTP server; the example is constructed to test for a failure to send an email message.
If the password change succeeds, the code attempts to use SMTP to send an email message to the user to confirm the change. This is done in the`SendingMail` event handler. For information about how to configure an SMTP server, see [How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://docs.microsoft.com/previous-versions/aspnet/8b83ac7t(v=vs.100)). For the purposes of this example, it is not necessary to configure an SMTP server; the example is constructed to test for a failure to send an email message.

If a mail server is not configured correctly or some other error occurs and the email message cannot be sent, the `SendMailError` function is called. A message is displayed to the user. In addition, an event is logged to the Windows Application event log with the assumption that an event source named MySamplesSite already exists. See the code example below to create the specified event source. For more information about creating an event source, see [Server Event Handling in ASP.NET Web Forms Pages](https://msdn.microsoft.com/library/765bfc89-33ee-4d0d-bbe6-3b172c06def9). The <xref:System.Web.UI.WebControls.SendMailErrorEventArgs.Handled%2A> property of the <xref:System.Web.UI.WebControls.SendMailErrorEventArgs> object is set to `true` to indicate that the error has been handled.

Expand Down Expand Up @@ -4300,7 +4300,7 @@

The code example assumes that the ASP.NET Web site has been configured to use ASP.NET membership and Forms authentication, and that a user has been created whose name and password are known to you. For more information, see [How to: Implement Simple Forms Authentication](https://msdn.microsoft.com/library/9522bc8d-1a41-480a-aa11-c389a4ac2d2e).

If the password change succeeds, the code attempts to use SMTP to send an email message to the user to confirm the change. This is done in the`SendingMail` event handler. For information about how to configure an SMTP server, see [NIB: How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://msdn.microsoft.com/library/ed204b58-24af-47d0-9687-60e5df5f17f8). For the purposes of this example, it is not necessary to configure an SMTP server; the example is constructed to test for a failure to send an email message.
If the password change succeeds, the code attempts to use SMTP to send an email message to the user to confirm the change. This is done in the`SendingMail` event handler. For information about how to configure an SMTP server, see [How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://docs.microsoft.com/previous-versions/aspnet/8b83ac7t(v=vs.100)). For the purposes of this example, it is not necessary to configure an SMTP server; the example is constructed to test for a failure to send an email message.

If a mail server is not configured correctly or some other error occurs and the email message cannot be sent, the `SendMailError` function is called. A message is displayed to the user. In addition, an event is logged to the Windows Application event log with the assumption that an event source named MySamplesSite already exists. See the code example below to create the specified event source. For more information about creating an event source, see [Server Event Handling in ASP.NET Web Forms Pages](https://msdn.microsoft.com/library/765bfc89-33ee-4d0d-bbe6-3b172c06def9). The <xref:System.Web.UI.WebControls.SendMailErrorEventArgs.Handled%2A> property of the <xref:System.Web.UI.WebControls.SendMailErrorEventArgs> object is set to `true` to indicate that the error has been handled.

Expand Down Expand Up @@ -4392,7 +4392,7 @@
## Examples
The following code example demonstrates an ASP.NET page that uses a <xref:System.Web.UI.WebControls.ChangePassword> Web control, and includes an event handler for the <xref:System.Web.UI.WebControls.ChangePassword.SendingMail> event named `SendingMail`. The code example assumes that the ASP.NET Web site has been configured to use ASP.NET membership and Forms authentication, and that a user has been created whose name and password are known to you. For more information, see [How to: Implement Simple Forms Authentication](https://msdn.microsoft.com/library/9522bc8d-1a41-480a-aa11-c389a4ac2d2e).

If the password change succeeds, the code attempts to use SMTP to send an email message to the user to confirm the change. This is done in the`SendingMail` event handler. For information about how to configure an SMTP server, see [NIB: How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://msdn.microsoft.com/library/ed204b58-24af-47d0-9687-60e5df5f17f8). For the purposes of this example, it is not necessary to configure an SMTP server; the example is constructed to test for a failure to send an email message.
If the password change succeeds, the code attempts to use SMTP to send an email message to the user to confirm the change. This is done in the`SendingMail` event handler. For information about how to configure an SMTP server, see [How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://docs.microsoft.com/previous-versions/aspnet/8b83ac7t(v=vs.100)). For the purposes of this example, it is not necessary to configure an SMTP server; the example is constructed to test for a failure to send an email message.

If a mail server is not configured correctly or some other error occurs and the email message cannot be sent, the `SendMailError` function is called. A message is displayed to the user. In addition, an event is logged to the Windows Application event log with the assumption that an event source named MySamplesSite already exists. See the code example below to create the specified event source. For more information about creating an event source, see [Server Event Handling in ASP.NET Web Forms Pages](https://msdn.microsoft.com/library/765bfc89-33ee-4d0d-bbe6-3b172c06def9). The <xref:System.Web.UI.WebControls.SendMailErrorEventArgs.Handled%2A> property of the <xref:System.Web.UI.WebControls.SendMailErrorEventArgs> object is set to `true` to indicate that the error has been handled.

Expand Down Expand Up @@ -5024,7 +5024,7 @@
## Examples
The following code example demonstrates an ASP.NET page that uses a <xref:System.Web.UI.WebControls.ChangePassword> Web control, and includes an event handler for the <xref:System.Web.UI.WebControls.ChangePassword.SendingMail> event named `SendingMail`. The code example assumes that the ASP.NET Web site has been configured to use ASP.NET membership and Forms authentication, and that a user has been created whose name and password are known to you. For more information, see [How to: Implement Simple Forms Authentication](https://msdn.microsoft.com/library/9522bc8d-1a41-480a-aa11-c389a4ac2d2e).

If the password change succeeds, the code attempts to use SMTP to send an email message to the user to confirm the change. This is done in the`SendingMail` event handler. For information about how to configure an SMTP server, see [NIB: How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://msdn.microsoft.com/library/ed204b58-24af-47d0-9687-60e5df5f17f8). For the purposes of this example, it is not necessary to configure an SMTP server; the example is constructed to test for a failure to send an email message.
If the password change succeeds, the code attempts to use SMTP to send an email message to the user to confirm the change. This is done in the`SendingMail` event handler. For information about how to configure an SMTP server, see [How to: Install and Configure SMTP Virtual Servers in IIS 6.0](https://docs.microsoft.com/previous-versions/aspnet/8b83ac7t(v=vs.100)). For the purposes of this example, it is not necessary to configure an SMTP server; the example is constructed to test for a failure to send an email message.

If a mail server is not configured correctly or some other error occurs and the email message cannot be sent, the `SendMailError` function is called. A message is displayed to the user. In addition, an event is logged to the Windows Application event log with the assumption that an event source named MySamplesSite already exists. See the code example below to create the specified event source. For more information about creating an event source, see [Server Event Handling in ASP.NET Web Forms Pages](https://msdn.microsoft.com/library/765bfc89-33ee-4d0d-bbe6-3b172c06def9). The <xref:System.Web.UI.WebControls.SendMailErrorEventArgs.Handled%2A> property of the <xref:System.Web.UI.WebControls.SendMailErrorEventArgs> object is set to `true` to indicate that the error has been handled.

Expand Down
Loading