1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
public List<string> getMailsFromThunderbird(string strFullPathToAbook)
{
try
{
List<string> listMails = new List<string>();
string[] strLines = File.ReadAllLines(strFullPathToAbook);
foreach (string strLine in strLines)
{
if (strLine.Contains("@"))
{
int i = strLine.LastIndexOf("@");
for (int y = i; y >= 0; y--)
{
if (strLine.Substring(y, 1) == "=")
{
int intStartIndex = y;
for (int x = intStartIndex; x < strLine.Length; x++)
{
if (strLine.Substring(x, 1) == ")")
{
int intLength = x;
intStartIndex++;
listMails.Add(strLine.Substring(intStartIndex, intLength - intStartIndex));
x = strLine.Length;
y = -1;
}
}
}
}
}
}
return listMails;
}
catch (Exception ex)
{
// Mach etwas
return null;
}
}
|