The SMTP host was not specified

Farhood picture Farhood · Mar 11, 2012 · Viewed 25.2k times · Source

i want to send mail to user when registered but error (The SMTP host was not specified) how to i configure smtp in web.config?

Answer

user1082916 picture user1082916 · Mar 11, 2012

You should add following in web.config file:

<system.net>
    <mailSettings>
        <smtp>
            <network host="smtp.xxx.com" password="" userName=""/>
        </smtp>
    </mailSettings>
</system.net>