Elimino commenti
This commit is contained in:
@@ -789,43 +789,6 @@ namespace SteamWare
|
||||
{
|
||||
// chiamo procedura con alelgati nulli...
|
||||
return mandaEmailNoLog(_mailFrom, _mailTo, _oggetto, _corpo, null);
|
||||
#if false
|
||||
// sostituisco eventuali a capo nel corpo messaggio...
|
||||
_corpo = _corpo.Replace("\r", "<br />");
|
||||
_corpo = _corpo.Replace("\n", "<br />");
|
||||
//manda email...
|
||||
MailMessage messaggio = new MailMessage(_mailFrom, _mailTo, _oggetto, _corpo);
|
||||
messaggio.IsBodyHtml = true;
|
||||
SmtpClient _smtpClient = new SmtpClient(_smtpCli);
|
||||
// se ci sono credenziali utente...
|
||||
if (_username != "")
|
||||
{
|
||||
//_smtpClient.UseDefaultCredentials = false;
|
||||
//_smtpClient.Port = 587;
|
||||
//_smtpClient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
|
||||
_smtpClient.Credentials = new NetworkCredential(_username, _password);
|
||||
_smtpClient.EnableSsl = memLayer.ML.CRB("_enableSSL");
|
||||
_smtpClient.Timeout = 5000;
|
||||
// verifico se sia porta non standard...
|
||||
if (memLayer.ML.CRS("_PortSSL") != "")
|
||||
{
|
||||
_smtpClient.Port = memLayer.ML.CRI("_PortSSL");
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
_smtpClient.Send(messaggio);
|
||||
return true;
|
||||
}
|
||||
catch (SmtpException esmtp)
|
||||
{
|
||||
Console.WriteLine("{0}", esmtp.Message);
|
||||
Console.WriteLine("Here is the full error message output");
|
||||
Console.Write("{0}", esmtp.ToString());
|
||||
logger.lg.scriviLog(string.Format("{0}\r\n full error message\r\n {1}", esmtp.Message, esmtp.ToString()), tipoLog.EXCEPTION);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// procedura invio email + scrittura in log!
|
||||
|
||||
Reference in New Issue
Block a user