This error message is somewhat misleading. While there is a very small chance that the ASPNET user cannot access the DLL, the more likely scenario is related to the actual connect to the SMTP server specified in the application settings.
To remedy the situation, follow these steps to open your SMTP server for relaying.
If using Microsoft's SMTP Server, open the properties on your SMTP Server and go the the "Access" tab. Press the "Relay" button, change the option to "All except the list below" and clear any options in the list. Then press OK. If this remedies the problem, this means that your normal settings do not allow the "From Address" that was specified to send emails through the server.
While you do not want to leave your server completely open for SMTP relay, you can safely add the IP address of your web server and set it to use the "Only the list below" option.
If this does not remedy the problem, we recommend that you confirm the following:
- That you are using a valid email address for the from and the to addresses.
- Confirm that you are able to connect to the SMTP server. Use a telnet client and connect to port 25 to test.