- 1.0.3 2025-09-22 Actualización de tsGmail
This commit is contained in:
@@ -6,12 +6,11 @@ using System.Linq;
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Mail;
|
using System.Net.Mail;
|
||||||
using System.Net.Mime;
|
using System.Net.Mime;
|
||||||
using tsCorreos;
|
|
||||||
|
|
||||||
namespace tsCorreos
|
namespace tsCorreos
|
||||||
{
|
{
|
||||||
|
|
||||||
public class Funciones
|
public static class Funciones
|
||||||
{
|
{
|
||||||
|
|
||||||
public static async void EnviaCorreo(string ServidorSMTP, string Remitente, string Destinatario, string Asunto, string Cuerpo, List<Attachment> AttachMents = null, List<AlternateView> AlternateViews = null, string CC = "", string BCC = "", string CuentaCorreo = "", string ContraseñaCorreo = "", int Puerto = 25, bool UsarSSL = false, bool CuerpoenHTML = false, string ResponderA = "", bool CredencialesConDominio = false, SecurityProtocolType ProtocoloSeguridad = SecurityProtocolType.Tls, string NombreRemitente = "")
|
public static async void EnviaCorreo(string ServidorSMTP, string Remitente, string Destinatario, string Asunto, string Cuerpo, List<Attachment> AttachMents = null, List<AlternateView> AlternateViews = null, string CC = "", string BCC = "", string CuentaCorreo = "", string ContraseñaCorreo = "", int Puerto = 25, bool UsarSSL = false, bool CuerpoenHTML = false, string ResponderA = "", bool CredencialesConDominio = false, SecurityProtocolType ProtocoloSeguridad = SecurityProtocolType.Tls, string NombreRemitente = "")
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
using Newtonsoft.Json.Linq;
|
using System;
|
||||||
using Org.BouncyCastle.Asn1;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace tsCorreos
|
namespace tsCorreos
|
||||||
@@ -32,7 +29,7 @@ namespace tsCorreos
|
|||||||
var tk= ListaTokens.First(x=>x.id==id);
|
var tk= ListaTokens.First(x=>x.id==id);
|
||||||
if (tk == null) throw new Exception("No se ha encontrado la configuración para la cuenta " + id);
|
if (tk == null) throw new Exception("No se ha encontrado la configuración para la cuenta " + id);
|
||||||
|
|
||||||
if (!tk.UltimaUtilizacion.HasValue || DateTime.UtcNow.Subtract(tk.UltimaUtilizacion.Value).TotalMinutes > 0)
|
if (!tk.UltimaUtilizacion.HasValue || DateTime.UtcNow.Subtract(tk.UltimaUtilizacion.Value).TotalMinutes > 5)
|
||||||
{
|
{
|
||||||
tk.Token = await GmailTokenManager.ObtenerAccessTokenAsync(tk.Config);
|
tk.Token = await GmailTokenManager.ObtenerAccessTokenAsync(tk.Config);
|
||||||
tk.UltimaUtilizacion = DateTime.UtcNow;
|
tk.UltimaUtilizacion = DateTime.UtcNow;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace tsCorreos
|
namespace tsCorreos
|
||||||
{
|
{
|
||||||
internal class Utilidades
|
public class Utilidades
|
||||||
{
|
{
|
||||||
public static string ObtieneDirectorioAleatorio()
|
public static string ObtieneDirectorioAleatorio()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,11 +6,12 @@
|
|||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<PackageId>tsCorreos</PackageId>
|
<PackageId>tsCorreos</PackageId>
|
||||||
<PackageTags>netstandard2.0, libreria</PackageTags>
|
<PackageTags>netstandard2.0, libreria</PackageTags>
|
||||||
<Version>1.0.2</Version>
|
<Version>1.0.3</Version>
|
||||||
<Authors>Manuel</Authors>
|
<Authors>Manuel</Authors>
|
||||||
<Company>Tecnosis S.A</Company>
|
<Company>Tecnosis S.A</Company>
|
||||||
<Description>Envío de correos diferenciando Gmail del resto</Description>
|
<Description>Envío de correos diferenciando Gmail del resto</Description>
|
||||||
<PackageReleaseNotes>
|
<PackageReleaseNotes>
|
||||||
|
- 1.0.3 2025-09-22 Actualización de tsGmail
|
||||||
- 1.0.2 2025-09-19 Corrección errores namespaces
|
- 1.0.2 2025-09-19 Corrección errores namespaces
|
||||||
- 1.0.0 2025-09-18 Primera versión
|
- 1.0.0 2025-09-18 Primera versión
|
||||||
</PackageReleaseNotes>
|
</PackageReleaseNotes>
|
||||||
@@ -18,7 +19,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="tsGmail" Version="1.0.0" />
|
<PackageReference Include="tsGmail" Version="1.0.1" />
|
||||||
<PackageReference Include="tsZip" Version="1.0.1" />
|
<PackageReference Include="tsZip" Version="1.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user