aktuelle.kurse/m239/40 - Protokolle/Protokolle SMTP, IMAP, POP3 (E-Mail-Protokolle)/15 - E-Mail-Nachricht per Telnet versenden
Harald G. Mueller b4036220c1 muh
2023-01-10 01:32:45 +01:00

377 lines
19 KiB
Plaintext

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>E-Mail-Nachricht per Telnet versenden - Entwicklung - Entwicklergate</title>
<meta name="description" content="Um eine E-Mail-Nachricht per Telnet zu versenden, folgende Befehle verwenden:
telnet mymailserver 25
HELO local.domain.com
MAIL FROM: someone@example.org
RCPT TO: someone@example.org
DATA
SUBJECT: Mein Betreff
Mein I&amp;hellip;">
<meta name="generator" content="Discourse 3.0.0.beta16 - https://github.com/discourse/discourse version dfc449a32e9c1fda375e104510c7b28a8171e4c1">
<link rel="icon" type="image/png" href="https://entwicklergate.de/uploads/default/optimized/1X/4fec9359aab81d4161106f97a6cbb13038c29797_2_32x32.png">
<link rel="apple-touch-icon" type="image/png" href="https://entwicklergate.de/uploads/default/optimized/1X/4fec9359aab81d4161106f97a6cbb13038c29797_2_180x180.png">
<meta name="theme-color" media="all" content="#ffffff">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=yes, viewport-fit=cover">
<link rel="canonical" href="https://entwicklergate.de/t/e-mail-nachricht-per-telnet-versenden/118" />
<link rel="search" type="application/opensearchdescription+xml" href="https://entwicklergate.de/opensearch.xml" title="Entwicklergate Search">
<link href="/stylesheets/color_definitions_base__3_85fe604186fca1758399fe51717893ebb61dc4fe.css?__ws=entwicklergate.de" media="all" rel="stylesheet" class="light-scheme"/>
<link href="/stylesheets/desktop_6849f8b5d38f5c76ca0fdb9184d888cdf0e17385.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="desktop" />
<link href="/stylesheets/discourse-details_6849f8b5d38f5c76ca0fdb9184d888cdf0e17385.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="discourse-details" />
<link href="/stylesheets/discourse-local-dates_6849f8b5d38f5c76ca0fdb9184d888cdf0e17385.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="discourse-local-dates" />
<link href="/stylesheets/discourse-narrative-bot_6849f8b5d38f5c76ca0fdb9184d888cdf0e17385.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="discourse-narrative-bot" />
<link href="/stylesheets/discourse-presence_6849f8b5d38f5c76ca0fdb9184d888cdf0e17385.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="discourse-presence" />
<link href="/stylesheets/discourse-solved_6849f8b5d38f5c76ca0fdb9184d888cdf0e17385.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="discourse-solved" />
<link href="/stylesheets/lazy-yt_6849f8b5d38f5c76ca0fdb9184d888cdf0e17385.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="lazy-yt" />
<link href="/stylesheets/poll_6849f8b5d38f5c76ca0fdb9184d888cdf0e17385.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="poll" />
<link href="/stylesheets/poll_desktop_6849f8b5d38f5c76ca0fdb9184d888cdf0e17385.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="poll_desktop" />
<link href="/stylesheets/desktop_theme_3_1a3fbaf6be9868147a1a8a47bd746972db6da66e.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="3" data-theme-name="hell"/>
<meta id="data-ga-universal-analytics" data-tracking-code="UA-730386-12" data-json="{&quot;cookieDomain&quot;:&quot;entwicklergate.de&quot;}" data-auto-link-domains="">
<link rel="preload" href="/assets/google-universal-analytics-v3-4195304cc8fc9564a86cfaf637f43e2582acbb938c5f563f03b3c967c4bf07a4.js" as="script">
<script defer src="/assets/google-universal-analytics-v3-4195304cc8fc9564a86cfaf637f43e2582acbb938c5f563f03b3c967c4bf07a4.js"></script>
<link rel="alternate nofollow" type="application/rss+xml" title="RSS-Feed von „E-Mail-Nachricht per Telnet versenden“" href="https://entwicklergate.de/t/e-mail-nachricht-per-telnet-versenden/118.rss" />
<meta property="og:site_name" content="Entwicklergate" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:image" content="https://entwicklergate.de/uploads/default/original/1X/d3790f488eda0fb7586e2501e2a230f775e41a6a.png" />
<meta property="og:image" content="https://entwicklergate.de/uploads/default/original/1X/d3790f488eda0fb7586e2501e2a230f775e41a6a.png" />
<meta property="og:url" content="https://entwicklergate.de/t/e-mail-nachricht-per-telnet-versenden/118" />
<meta name="twitter:url" content="https://entwicklergate.de/t/e-mail-nachricht-per-telnet-versenden/118" />
<meta property="og:title" content="E-Mail-Nachricht per Telnet versenden" />
<meta name="twitter:title" content="E-Mail-Nachricht per Telnet versenden" />
<meta property="og:description" content="Um eine E-Mail-Nachricht per Telnet zu versenden, folgende Befehle verwenden: telnet mymailserver 25 HELO local.domain.com MAIL FROM: someone@example.org RCPT TO: someone@example.org DATA SUBJECT: Mein Betreff Mein Inhalt . QUIT Jede Zeile mit der Eingabe-Taste abschließen, bis auf SUBJECT, dort zwei mal die Eingabe-Taste betätigen. mymailserver ist der entsprechende Name oder die IP-Adresse des Mailserver. Z.B. localhost, wenn auf dem lokalen Server der Mailserver läuft." />
<meta name="twitter:description" content="Um eine E-Mail-Nachricht per Telnet zu versenden, folgende Befehle verwenden: telnet mymailserver 25 HELO local.domain.com MAIL FROM: someone@example.org RCPT TO: someone@example.org DATA SUBJECT: Mein Betreff Mein Inhalt . QUIT Jede Zeile mit der Eingabe-Taste abschließen, bis auf SUBJECT, dort zwei mal die Eingabe-Taste betätigen. mymailserver ist der entsprechende Name oder die IP-Adresse des Mailserver. Z.B. localhost, wenn auf dem lokalen Server der Mailserver läuft." />
<meta name="twitter:label1" value="Lesezeit" />
<meta name="twitter:data1" value="1 mins 🕑" />
<meta name="twitter:label2" value="„Gefällt mir“" />
<meta name="twitter:data2" value="2 ❤" />
<meta property="article:published_time" content="2015-12-29T11:25:02+00:00" />
<meta property="og:ignore_canonical" content="true" />
<script type="application/ld+json">{"@context":"http://schema.org","@type":"QAPage","name":"E-Mail-Nachricht per Telnet versenden","mainEntity":{"@type":"Question","name":"E-Mail-Nachricht per Telnet versenden","text":"Um eine E-Mail-Nachricht per Telnet zu versenden, folgende Befehle verwenden:\n\ntelnet mymailserver 25\n\nHELO local.domain.com\n\nMAIL FROM: someone@example.org\n\nRCPT TO: someone@example.org\n\nDATA\n\nSUBJECT: Mein Betreff\n\nMein Inhalt\n\n.\n\nQUIT\n\nJede Zeile mit der Eingabe-Taste abschließen, bis auf SUBJECT, dort &hellip;","upvoteCount":0,"answerCount":0,"dateCreated":"2015-12-29T11:25:02.246Z","author":{"@type":"Person","name":"Uwe Keim"}}}</script>
</head>
<body class="crawler">
<header>
<a href="/">
Entwicklergate
</a>
</header>
<div id="main-outlet" class="wrap" role="main">
<div id="topic-title">
<h1>
<a href="/t/e-mail-nachricht-per-telnet-versenden/118">E-Mail-Nachricht per Telnet versenden</a>
</h1>
<div class="topic-category" itemscope itemtype="http://schema.org/BreadcrumbList">
<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a href="https://entwicklergate.de/c/development/18" class="badge-wrapper bullet" itemprop="item">
<span class='badge-category-bg' style='background-color: #3AB54A'></span>
<span class='badge-category clear-badge'>
<span class='category-name' itemprop='name'>Entwicklung</span>
</span>
</a>
<meta itemprop="position" content="1" />
</span>
</div>
<div class="topic-category">
<div class='discourse-tags list-tags'>
<a href='https://entwicklergate.de/tag/smtp' class='discourse-tag' rel="tag">smtp</a>
</div>
</div>
</div>
<div id='post_1' itemscope itemtype='http://schema.org/DiscussionForumPosting' class='topic-body crawler-post'>
<div class='crawler-post-meta'>
<div itemprop='publisher' itemscope itemtype="http://schema.org/Organization">
<meta itemprop='name' content='Entwicklergate'>
<div itemprop='logo' itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop='url' content='https://entwicklergate.de/uploads/default/original/1X/fe25e06e8994a8f4797ea5b6e1eaf8a84438d8e4.png'>
</div>
</div>
<span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person">
<a itemprop="url" href='https://entwicklergate.de/u/UweKeim'><span itemprop='name'>UweKeim</span></a>
</span>
<link itemprop="mainEntityOfPage" href="https://entwicklergate.de/t/e-mail-nachricht-per-telnet-versenden/118">
<span class="crawler-post-infos">
<time itemprop='datePublished' datetime='2015-12-29T11:25:02Z' class='post-time'>
29. Dezember 2015 um 11:25
</time>
<meta itemprop='dateModified' content='2016-01-13T09:14:07Z'>
<span itemprop='position'>#1</span>
</span>
</div>
<div class='post' itemprop='articleBody'>
<p>Um eine E-Mail-Nachricht per Telnet zu versenden, folgende Befehle verwenden:</p>
<pre><code class="lang-auto">telnet mymailserver 25
HELO local.domain.com
MAIL FROM: someone@example.org
RCPT TO: someone@example.org
DATA
SUBJECT: Mein Betreff
Mein Inhalt
.
QUIT
</code></pre>
<p>Jede Zeile mit der <kbd>Eingabe</kbd>-Taste abschließen, bis auf <code>SUBJECT</code>, dort zwei mal die <kbd>Eingabe</kbd>-Taste betätigen.</p>
<p><code>mymailserver</code> ist der entsprechende Name oder die IP-Adresse des Mailserver. Z.B. <code>localhost</code>, wenn auf dem lokalen Server der Mailserver läuft.</p>
</div>
<meta itemprop='headline' content='E-Mail-Nachricht per Telnet versenden'>
<meta itemprop='keywords' content='smtp'>
<div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter">
<meta itemprop="interactionType" content="http://schema.org/LikeAction"/>
<meta itemprop="userInteractionCount" content="0" />
<span class='post-likes'></span>
</div>
<div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter">
<meta itemprop="interactionType" content="http://schema.org/CommentAction"/>
<meta itemprop="userInteractionCount" content="0" />
</div>
</div>
<div id='post_2' itemscope itemtype='http://schema.org/DiscussionForumPosting' class='topic-body crawler-post'>
<div class='crawler-post-meta'>
<div itemprop='publisher' itemscope itemtype="http://schema.org/Organization">
<meta itemprop='name' content='Entwicklergate'>
<div itemprop='logo' itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop='url' content='https://entwicklergate.de/uploads/default/original/1X/fe25e06e8994a8f4797ea5b6e1eaf8a84438d8e4.png'>
</div>
</div>
<span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person">
<a itemprop="url" href='https://entwicklergate.de/u/heiner99'><span itemprop='name'>heiner99</span></a>
</span>
<link itemprop="mainEntityOfPage" href="https://entwicklergate.de/t/e-mail-nachricht-per-telnet-versenden/118">
<span class="crawler-post-infos">
<time itemprop='datePublished' datetime='2016-08-05T08:49:56Z' class='post-time'>
5. August 2016 um 08:49
</time>
<meta itemprop='dateModified' content='2016-08-05T08:49:56Z'>
<span itemprop='position'>#2</span>
</span>
</div>
<div class='post' itemprop='articleBody'>
<p>Hier eine Lösung in C#:</p>
<pre><code>using System;
using System.Net.Mail;
class CMain
{
public static void Main()
{
string host = "smtp.gmail.com";
string hostid = "from@gmail.com";
string hostpw = "password";
try
{
SmtpClient smtp = new SmtpClient();
smtp.Credentials = new System.Net.NetworkCredential(hostid, hostpw);
smtp.Host = host;
smtp.Port = 587;
smtp.EnableSsl = true;
MailMessage mm = new MailMessage(hostid, "to@test.com", "Test-Subject", "Test-Body");
smtp.Send(mm);
Console.WriteLine("Email sent");
}
catch (Exception ex)
{
Console.WriteLine("ERROR: " + ex);
}
}
}</code></pre>
</div>
<meta itemprop='headline' content='E-Mail-Nachricht per Telnet versenden'>
<div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter">
<meta itemprop="interactionType" content="http://schema.org/LikeAction"/>
<meta itemprop="userInteractionCount" content="1" />
<span class='post-likes'>1 „Gefällt mir“</span>
</div>
<div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter">
<meta itemprop="interactionType" content="http://schema.org/CommentAction"/>
<meta itemprop="userInteractionCount" content="1" />
</div>
</div>
<div id='post_3' itemscope itemtype='http://schema.org/DiscussionForumPosting' class='topic-body crawler-post'>
<div class='crawler-post-meta'>
<div itemprop='publisher' itemscope itemtype="http://schema.org/Organization">
<meta itemprop='name' content='Entwicklergate'>
<div itemprop='logo' itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop='url' content='https://entwicklergate.de/uploads/default/original/1X/fe25e06e8994a8f4797ea5b6e1eaf8a84438d8e4.png'>
</div>
</div>
<span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person">
<a itemprop="url" href='https://entwicklergate.de/u/UweKeim'><span itemprop='name'>UweKeim</span></a>
</span>
<link itemprop="mainEntityOfPage" href="https://entwicklergate.de/t/e-mail-nachricht-per-telnet-versenden/118">
<span class="crawler-post-infos">
<time itemprop='datePublished' datetime='2016-08-05T09:07:28Z' class='post-time'>
5. August 2016 um 09:07
</time>
<meta itemprop='dateModified' content='2016-08-05T09:07:28Z'>
<span itemprop='position'>#3</span>
</span>
</div>
<div class='post' itemprop='articleBody'>
<p>Danke!</p>
<p>Bei SMTP ist es in C# auch immer <em>sehr</em> sinnvoll, die <code>InnerException</code> abzurufen, da dort meistens die eigentliche Serverantwort steht.</p>
<p>Also z.B. so was wie:</p>
<pre><code class="lang-cs">catch (Exception ex)
{
while ( ex != null )
{
Console.WriteLine("ERROR: " + ex);
ex = ex.InnerException;
}
}
</code></pre>
</div>
<meta itemprop='headline' content='E-Mail-Nachricht per Telnet versenden'>
<div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter">
<meta itemprop="interactionType" content="http://schema.org/LikeAction"/>
<meta itemprop="userInteractionCount" content="0" />
<span class='post-likes'></span>
</div>
<div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter">
<meta itemprop="interactionType" content="http://schema.org/CommentAction"/>
<meta itemprop="userInteractionCount" content="0" />
</div>
</div>
<div id='post_4' itemscope itemtype='http://schema.org/DiscussionForumPosting' class='topic-body crawler-post'>
<div class='crawler-post-meta'>
<div itemprop='publisher' itemscope itemtype="http://schema.org/Organization">
<meta itemprop='name' content='Entwicklergate'>
<div itemprop='logo' itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop='url' content='https://entwicklergate.de/uploads/default/original/1X/fe25e06e8994a8f4797ea5b6e1eaf8a84438d8e4.png'>
</div>
</div>
<span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person">
<a itemprop="url" href='https://entwicklergate.de/u/TcError'><span itemprop='name'>TcError</span></a>
</span>
<link itemprop="mainEntityOfPage" href="https://entwicklergate.de/t/e-mail-nachricht-per-telnet-versenden/118">
<span class="crawler-post-infos">
<time itemprop='datePublished' datetime='2021-05-16T08:28:22Z' class='post-time'>
16. Mai 2021 um 08:28
</time>
<meta itemprop='dateModified' content='2021-05-16T08:28:22Z'>
<span itemprop='position'>#4</span>
</span>
</div>
<div class='post' itemprop='articleBody'>
<p>Hallo ich bin ganz neu hier und bin hier zufällig drauf gestosen.<br>
Ich bin ein absoluter Noob in domain usw. aber könnte mir jemand weiterhelfen mit local Domain ich versteh irgendwie nicht ganz was ich dafür einsetzen muss.<br>
L.G.</p>
</div>
<meta itemprop='headline' content='E-Mail-Nachricht per Telnet versenden'>
<div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter">
<meta itemprop="interactionType" content="http://schema.org/LikeAction"/>
<meta itemprop="userInteractionCount" content="1" />
<span class='post-likes'>1 „Gefällt mir“</span>
</div>
<div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter">
<meta itemprop="interactionType" content="http://schema.org/CommentAction"/>
<meta itemprop="userInteractionCount" content="0" />
</div>
</div>
</div>
<footer class="container wrap">
<nav class='crawler-nav'>
<ul>
<li itemscope itemtype='http://schema.org/SiteNavigationElement'>
<span itemprop='name'>
<a href='/' itemprop="url">Startseite </a>
</span>
</li>
<li itemscope itemtype='http://schema.org/SiteNavigationElement'>
<span itemprop='name'>
<a href='/categories' itemprop="url">Kategorien </a>
</span>
</li>
<li itemscope itemtype='http://schema.org/SiteNavigationElement'>
<span itemprop='name'>
<a href='/guidelines' itemprop="url">FAQ/Richtlinien </a>
</span>
</li>
<li itemscope itemtype='http://schema.org/SiteNavigationElement'>
<span itemprop='name'>
<a href='/tos' itemprop="url">Nutzungsbedingungen </a>
</span>
</li>
<li itemscope itemtype='http://schema.org/SiteNavigationElement'>
<span itemprop='name'>
<a href='/privacy' itemprop="url">Datenschutzerklärung </a>
</span>
</li>
</ul>
</nav>
<p class='powered-by-link'>Angetrieben von <a href="https://www.discourse.org">Discourse</a>, beste Erfahrung mit aktiviertem JavaScript</p>
</footer>
</body>
</html>