- Регистрация
- 13.05.2020
- Сообщения
- 21
- Благодарностей
- 0
- Баллы
- 1
Товарищи, помогите, пожалуйста, решить вопрос.
Задача: каждый час вытаскивать сообщения с почты и отправлять их в Telegram канал
Как отправить в Telegram канал я понимаю, а вот с почтой есть проблемки.
Есть код:
К сожалению, в результате выводятся одни кракозябры даже без присутствия текста сообщения
При этом, если указывать вывод html содержимого сообщения через Add(tuple.Item3); получаю огромный html кусок после текста выше из которого проблематично выдернуть реальный текст.
Подскажите, пожалуйста, совсем не бум-бум
Задача: каждый час вытаскивать сообщения с почты и отправлять их в Telegram канал
Как отправить в Telegram канал я понимаю, а вот с почтой есть проблемки.
Есть код:
C#:
Tuple<string, string, string, string>[] allMails;
allMails = ZennoPoster.BulkMailDownload(project.Variables["Email_login"].Value,
project.Variables["Email_password"].Value, project.Variables["Email_server"].Value, Convert.ToInt32(project.Variables["Email_port"].Value), true,
ZennoLab.InterfacesLibrary.Enums.Email.EmailProtocol.IMAP,
24*100, 200, false);
foreach(Tuple<string, string, string, string> tuple in allMails)
{
project.Lists["List"].Add(tuple.Item4);
}
Return-Path: <RTE+NE-null-de34cA04355481ERSCRWSVUFAV@sellernotifications.amazon.com>
Delivered-To: [email protected]
Received: from DIR-03 ([10.20.147.193]) by IMAP-20 with LMTP id jZp0IX6yYF7iUgAALEJ/og (envelope-from <RTE+NE-null-de34cA04355481ERSCRWSVUFAV@sellernotifications.amazon.com>) for <[email protected]>; Thu, 05 Mar 2020 03:04:14 -0500
Received: from MTA-01.privateemail.com ([10.20.147.11]) by DIR-03 with LMTP id YFwoIH6yYF58QgAAtNLlyA (envelope-from <RTE+NE-null-de34cA04355481ERSCRWSVUFAV@sellernotifications.amazon.com>) for <[email protected]>; Thu, 05 Mar 2020 03:04:14 -0500
Received: from oxse3.privateemail.com (unknown [10.20.151.227]) by MTA-01.privateemail.com (Postfix) with ESMTP id 8295E60188 for <[email protected]>; Thu, 5 Mar 2020 08:04:14 +0000 (UTC)
Received: from a13-39.smtp-out.amazonses.com ([54.240.13.39]) by oxse3.privateemail.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-SHA256:12 (Exim 4.92) (envelope-from <RTE+NE-null-de34cA04355481ERSCRWSVUFAV@sellernotifications.amazon.com>) id 1j9lUL-0009f4-4K for [email protected]; Thu, 05 Mar 2020 00:04:14 -0800
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=jvxsykglqiaiibkijmhy37vqxh4mzqr6; d=amazon.com; t=1583395451; h=From:Reply-To:To:Message-ID:Subject:MIME-Version:Content-Typeate; bh=g3kM4XCJzYsdbNHciA9+SfAYRCGbrtRBOsagVvZPIuA=; b=Tvjm9DquiMkn/pvBOs/7A3mYd99omPTx+TPJ1+gBku0/pLBKfyxqPATfVdVsZLkw W15IZ7WMC/lUvZn5P2JP6oixSdFWJmSMtn/UHnyZ8ZO3L8IHDJ6lK+ZjhD3MK4dPK+F QT725S7le9JWAV6MaDP/QxBatm2XdmdDzVm9MNvw=
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1583395451; h=From:Reply-To:To:Message-ID:Subject:MIME-Version:Content-Typeate:Feedback-ID; bh=g3kM4XCJzYsdbNHciA9+SfAYRCGbrtRBOsagVvZPIuA=; b=JOfqfb3vC1sHvic/GVUgtLVz3oTjW2DJafhffk7dsURCd2fJWdNjNHVUJmn6PKwX BquoYpcIZ77NIzGQtzFTE9L6r2Qd6eOeLxiA1pBYpiiWbER1IZJfkWstmmLZvMB1hXt 1OlgKBbz99lcLb/MxHCH9Jckb7shseAt3AA/nZr8=
From: "Amazon.com" <[email protected]>
Reply-To: "Amazon.com" <[email protected]>
To: [email protected]
Message-ID: <01000170a9b93308-1ca36956-cfa8-4485-9289-ba8675c86b14-000000@email.amazonses.com>
Subject: Your message to a buyer could not be delivered
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_44077289_1208178605.1583395451627"
X-AMAZON-MAIL-RELAY-TYPE: notification
Bounces-to: RTE+NE-null-de34cA04355481ERSCRWSVUFAV@sellernotifications.amazon.com
X-AMAZON-METADATA: CA=C2J1N6Q7SNDN5Q-CU=A2EF6I3ANO8E3M
X-Original-MessageID: <urn.rtn.msg.202003050804110179a39b08794bfcaeb413f54c60p0na@1583395451628.rtn-svc-na-back-c42xl1f-39db918b.us-east-1.amazon.com>
Date: Thu, 5 Mar 2020 08:04:11 +0000
X-SES-Outgoing: 2020.03.05-54.240.13.39
Feedback-ID: 1.us-east-1.ZHcGJK6s+x+i9lRHKog4RW3tECwWIf1xzTYCZyUaiec=:AmazonSES
Received-SPF: pass (oxse3.privateemail.com: domain of sellernotifications.amazon.com designates 54.240.13.39 as permitted sender) client-ip=54.240.13.39; envelope-from=RTE+NE-null-de34cA04355481ERSCRWSVUFAV@sellernotifications.amazon.com; helo=a13-39.smtp-out.amazonses.com;
X-SPF-Result: oxse3.privateemail.com: domain of sellernotifications.amazon.com designates 54.240.13.39 as permitted sender
Authentication-Results: oxse3.privateemail.com; iprev=pass (a13-39.smtp-out.amazonses.com) smtp.remote-ip=54.240.13.39; spf=pass smtp.mailfrom=sellernotifications.amazon.com; dkim=pass header.d=amazon.com header.s=jvxsykglqiaiibkijmhy37vqxh4mzqr6 header.a=rsa-sha256; dkim=pass header.d=amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.a=rsa-sha256; dmarc=pass header.from=amazon.com
Authentication-Results: privateemail.com; spf=pass smtp.mailfrom=RTE+NE-null-de34cA04355481ERSCRWSVUFAV@sellernotifications.amazon.com; dkim=pass header.i=amazon.com; dkim=pass header.i=amazonses.com
X-SpamExperts-Class: ham
X-SpamExperts-Evidence: urlwl/url-14.rbl.spamrl.com
X-Recommended-Action: accept
X-Filter-ID: 8G1aH+8yearZuN6N5+X5bm6KuAmzEgFjeXz34jnHp0xpaawAQLCw41DX+7uxKx0P2LDkrRcqyp/p /iw75DwQ0G8X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oYWQaBLOXOFc/TFs0yta1RigWfpirH8g1GOR1IFGt5BWm
X-Report-Abuse-To: [email protected]
ckx-imap-internaldate: 05-Mar-2020 03:04:14 -0500
ckx-imap-uid: 11
ckx-imap-isUid: NO
ckx-imap-seen: YES
ckx-imap-answered: NO
ckx-imap-deleted: NO
ckx-imap-flagged: NO
ckx-imap-draft: NO
ckx-imap-flags: \Seen
При этом, если указывать вывод html содержимого сообщения через Add(tuple.Item3); получаю огромный html кусок после текста выше из которого проблематично выдернуть реальный текст.
Подскажите, пожалуйста, совсем не бум-бум