You receive an error message when you try to send an e-mail message by using the System.Web.Mail namespace in the .NET Framework 1.0 (922777)
The information in this article applies to:
- Microsoft .NET Framework 1.1
- Microsoft .NET Framework 1.0
SYMPTOMSWhen you try to send an e-mail message by using the System.Web.Mail namespace in the Microsoft .NET Framework 1.0, you receive the following error message: 0x80040220 - The 'SendUsing' configuration value is invalid This issue occurs after you try to use the String.Insert method to change the SmtpMail.SmtpServer property. For example, the issue occurs when you try to send an e-mail message after you use code that resembles the following:
SmtpMail.SmtpServer.Insert(0, "mail.mycompany.com");
CAUSEThis issue occurs because the String.Insert method does not change the value of the SmtpMail.SmtpServer property. Therefore, the value of the SmtpMail.SmtpServer property is null.
Note If you try to send an e-mail message by using the System.Web.Mail namespace on the same computer that is running the Simple Mail Transfer Protocol (SMTP) server, you may not receive the error message because the e-mail message is sent to the pickup directory of the local SMTP server.RESOLUTIONTo resolve this issue, you must specifically assign the value of the SMTP server that you are using to send the e-mail message. Assign the value to the SmtpMail.SmtpServer property directly. For example, use code that resembles the following:
SmtpMail.SmtpServer = "mail.mycompany.com";
Modification Type: | Major | Last Reviewed: | 8/22/2006 |
---|
Keywords: | kbtshoot kbnofix kbprb KB922777 kbAudDeveloper |
---|
|