Conf email no auth in steamware...

This commit is contained in:
Samuele E. Locatelli
2016-11-17 09:15:59 +01:00
parent fe0e289a6c
commit a71e85ce57
8 changed files with 93 additions and 15 deletions
Binary file not shown.
+9 -1
View File
@@ -84,7 +84,15 @@ namespace MP_MON.Controllers
{
body += string.Format("{2}<b>{0}</b> \t\t\t | Art: {1}", item.CodMacchina, item.CodArticolo, Environment.NewLine);
}
SteamWare.gestEmail.geAuth.mandaEmail(from, to, subject, body);
// se ho una pwd/user utilizzo smtp auth, altrimenti base...
if ((WebConfigurationManager.AppSettings["_emailUser"] != "") && (WebConfigurationManager.AppSettings["_emailPwd"] != ""))
{
SteamWare.gestEmail.geAuth.mandaEmail(from, to, subject, body);
}
else
{
SteamWare.gestEmail.ge.mandaEmail(from, to, subject, body);
}
}
else
{
+22 -10
View File
@@ -4,8 +4,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<ProductVersion></ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{BA8BCBB8-601C-4642-AE65-0EBF9D5FBE15}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
@@ -21,8 +20,7 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<NuGetPackageImportStamp></NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -103,10 +101,8 @@
<Private>True</Private>
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http">
</Reference>
<Reference Include="System.Net.Http.WebRequest">
</Reference>
<Reference Include="System.Net.Http"></Reference>
<Reference Include="System.Net.Http.WebRequest"></Reference>
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
@@ -339,6 +335,18 @@
<DependentUpon>Web.config</DependentUpon>
<SubType>Designer</SubType>
</None>
<None Include="Web.IIS01.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.IIS02.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.OVH-demo.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.Valgasket.config">
<DependentUpon>Web.config</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
@@ -419,8 +427,7 @@
<IISUrl>http://localhost:56580/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<CustomServerUrl></CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
@@ -432,4 +439,9 @@
</Target>
<Target Name="AfterBuild">
</Target> -->
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.Tasks.dll" />
<Target Name="AfterBuild" Condition="Exists('Web.$(Configuration).config')">
<!--Generate transformed config in the output directory-->
<TransformXml Source="Web.config" Destination="$(OutputPath)Web.config" Transform="Web.$(Configuration).config" />
</Target>
</Project>
+4 -4
View File
@@ -16,10 +16,10 @@
-->
<appSettings>
<add key="Environment" value="Donati - Prod" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<!--<add key="MoonProConnectionString" value="Data Source=192.168.51.71\sqlexpress;Initial Catalog=Donati_MoonPro;Persist Security Info=True;User ID=steamware;Password=viadante16;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="PermessiConnectionString" value="Data Source=192.168.51.71\sqlexpress;Initial Catalog=Donati_MoonPro;Persist Security Info=True;User ID=steamware;Password=viadante16;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="UtenteCdcConnectionString" value="Data Source=192.168.51.71\sqlexpress;Initial Catalog=Donati_Anagrafica;Persist Security Info=True;User ID=steamware;Password=viadante16;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="VocabolarioConnectionString" value="Data Source=192.168.51.71\sqlexpress;Initial Catalog=Donati_Vocabolario;Persist Security Info=True;User ID=steamware;Password=viadante16;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>-->
<add key="_smtpCli" value="192.168.48.1" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_emailUser" value="" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_emailPwd" value="" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_enableSSL" value="" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
</appSettings>
<connectionStrings>
<add name="MoonProEntities" connectionString="metadata=res://*/Models.MapoModel.csdl|res://*/Models.MapoModel.ssdl|res://*/Models.MapoModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=192.168.51.71\sqlexpress;initial catalog=Donati_MoonPro;persist security info=True;user id=steamware;password=viadante16;multipleactiveresultsets=True;application name=EntityFramework&quot;" xdt:Transform="SetAttributes" xdt:Locator="Match(name)" />
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<!-- For more information on using app.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<appSettings>
<add key="Environment" value="SteamWare" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_smtpCli" value="10.74.82.254" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_emailUser" value="" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_emailPwd" value="" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_enableSSL" value="" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
</appSettings>
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your Web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<!-- For more information on using app.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<appSettings>
<add key="Environment" value="SteamWare" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_smtpCli" value="10.74.82.254" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_emailUser" value="" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_emailPwd" value="" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_enableSSL" value="" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
</appSettings>
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your Web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<!-- For more information on using app.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
</configuration>
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<!-- For more information on using app.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
</configuration>