public string GetMailSize()
{
string addr = AccountInfo.FromAddress;
string priority = mailPriority[comboPriority.Text];
double attachSize = 0;
// 添付ファイルがあるとき
if (attachName != "") {
attachSize = attachName.Split(',').Sum(f => new FileInfo(f).Length * 1.33);
}
// メールサイズの合計を取得する
var formtexts = new[] { textAddress, textSubject, textBody, textCc, textBcc }
.Select(t => t.Text).ToArray();
var moretext = new[] { addr, priority };
int sizes = formtexts.Concat(moretext)
.Sum(b => System.Text.Encoding.UTF8.GetBytes(b).Length);
return (sizes + (long)attachSize).ToString();
}