Hi,
I'm using ZennoPoster.BulkMailDownload and it works just fine, but sometimes there is problem with connecting to smtp and I got System.Exception:
Problem is, that C# go to good end instead of bad one, so I don't know if connection to smtp was good or not.
Question, how can I save this message to variable?
I tried this with no success:
I'm using ZennoPoster.BulkMailDownload and it works just fine, but sometimes there is problem with connecting to smtp and I got System.Exception:
Problem is, that C# go to good end instead of bad one, so I don't know if connection to smtp was good or not.
Question, how can I save this message to variable?
I tried this with no success:
C#:
try
{
Tuple<string, string, string, string>[] allMails;
allMails = ZennoPoster.BulkMailDownload(project.Variables["mailadress"].Value,
project.Variables["pass"].Value, project.Variables["mailserver"].Value, int.Parse(project.Variables["port"].Value), bool.Parse(project.Variables["ssl"].Value),
ZennoLab.InterfacesLibrary.Enums.Email.EmailProtocol.IMAP,
24*100, 10000, false, proxyString: project.Variables["proxy"].Value );
// loop fo all messages
foreach(Tuple<string, string, string, string> tuple in allMails)
{
// adding messages to the table called Tabl1
// tuple.Item1 - subject, tuple.Item2 - from, tuple.Item3 - html message, tuple.Item4 - text message
List<string> tmp = new List<string>();
tmp.Add(tuple.Item1);
tmp.Add(tuple.Item2);
tmp.Add(tuple.Item3);
tmp.Add(tuple.Item4);
project.Tables["Tabl1"].AddRow(tmp);
}
}
catch(Exception ex)
{
string details = ex.ToString();
project.Variables["details"].Value = details;
}