I want to know if this code is correct:
<system.net>
<mailSettings>
<smtp>
<network host="smtp.gmail.com" port="587" userName="adm@mail.com" password="123" />
</smtp>
</mailSettings>
</system.net>
I want to know if this code is correct:
<system.net>
<mailSettings>
<smtp>
<network host="smtp.gmail.com" port="587" userName="adm@mail.com" password="123" />
</smtp>
</mailSettings>
</system.net>
I'm not familiar with Umbraco - that said, if you have tried using the .config settings that you specified in your original question and the email is not successfully sending to the recipient, try updating your settings like the following:
<smtp deliveryMethod="Network">
<network enableSsl="true" host="smtp.gmail.com"
defaultCredentials="false" port="587" userName="xx@gmail.com" password="xx"/>
</smtp>
If you continue to not receive emails from your application, try logging into your Gmail account (the same account that you specified in your .config smtp setting) and see if you have an email from the Gmail team that is asking you to confirm whether or not Umbraco is an authorized relay for sending email (for more info on this, see this SO answer).