paradise_wolf
05-19-2007, 02:28 PM
My web site is still in a development phase and I do not have an internet domain for it yet. I deployed it in my own computer and therefore I use its IP address in the URL to load its web pages. So I am not sure what should be assigned to “e.Message.From” property. I have just one email address provided by my internet provider and I used it to assign to “e.Message.From” like below:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e.Message.From =
new MailAddress("MyEmailName@MyProvider.com", "SI");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and I added this email address also in the web.config:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network
defaultCredentials="True"
host="localhost"
port="25"
from="MyEmailName@MyProvider.com"/>
</smtp>
</mailSettings>
</system.net>
But it gives this meassge error:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parser Error Message: Unrecognized attribute 'from'. Note that attribute names are case-sensitive.
Source Error:
Line 67: host="localhost"
Line 68: port="25"
Line 69: from="MyEmailName@MyProvider.com"/>
Line 70: </smtp>
Line 71: </mailSettings>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What email address should be assigned in the “web.config” or e.Message.From ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e.Message.From =
new MailAddress("MyEmailName@MyProvider.com", "SI");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and I added this email address also in the web.config:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network
defaultCredentials="True"
host="localhost"
port="25"
from="MyEmailName@MyProvider.com"/>
</smtp>
</mailSettings>
</system.net>
But it gives this meassge error:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parser Error Message: Unrecognized attribute 'from'. Note that attribute names are case-sensitive.
Source Error:
Line 67: host="localhost"
Line 68: port="25"
Line 69: from="MyEmailName@MyProvider.com"/>
Line 70: </smtp>
Line 71: </mailSettings>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What email address should be assigned in the “web.config” or e.Message.From ?