aktuelle.kurse/old_m239/unterlagen/40 - Protokolle/Protokolle SMTP, IMAP, POP3 (E-Mail-Protokolle)/15 - E-Mail-Nachricht per Telnet versenden

375 lines
20 KiB
Plaintext
Raw Normal View History

2022-05-15 21:40:59 +02:00
<!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 2.9.0.beta4 - https://github.com/discourse/discourse version 616de8323266da3e302a1ca47cdb03acd66f99a9">
<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" 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" />
<script type="application/ld+json">{"@context":"http://schema.org","@type":"WebSite","url":"https://entwicklergate.de","potentialAction":{"@type":"SearchAction","target":"https://entwicklergate.de/search?q={search_term_string}","query-input":"required name=search_term_string"}}</script>
<link rel="search" type="application/opensearchdescription+xml" href="https://entwicklergate.de/opensearch.xml" title="Entwicklergate Search">
<link href="/stylesheets/color_definitions_basis__3_8c9f4d8b56a1d5bde599ff891df70f4fb8b5996e.css?__ws=entwicklergate.de" media="all" rel="stylesheet" class="light-scheme"/>
<link href="/stylesheets/desktop_9596803854844f9d57f764120f8de5ffa2458c1f.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="desktop" />
<link href="/stylesheets/discourse-details_9596803854844f9d57f764120f8de5ffa2458c1f.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="discourse-details" />
<link href="/stylesheets/discourse-local-dates_9596803854844f9d57f764120f8de5ffa2458c1f.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="discourse-local-dates" />
<link href="/stylesheets/discourse-narrative-bot_9596803854844f9d57f764120f8de5ffa2458c1f.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="discourse-narrative-bot" />
<link href="/stylesheets/discourse-presence_9596803854844f9d57f764120f8de5ffa2458c1f.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="discourse-presence" />
<link href="/stylesheets/discourse-solved_9596803854844f9d57f764120f8de5ffa2458c1f.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="discourse-solved" />
<link href="/stylesheets/lazy-yt_9596803854844f9d57f764120f8de5ffa2458c1f.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="lazy-yt" />
<link href="/stylesheets/poll_9596803854844f9d57f764120f8de5ffa2458c1f.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="poll" />
<link href="/stylesheets/poll_desktop_9596803854844f9d57f764120f8de5ffa2458c1f.css?__ws=entwicklergate.de" media="all" rel="stylesheet" data-target="poll_desktop" />
<link href="/stylesheets/desktop_theme_3_b148b43e3e9b6f8aefc1a35aa370635c6a265b4d.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-706f1d28f0a97f67a47515c96189277240ec4940d968955042066d7873fd1fe8.js" as="script">
<script src="/assets/google-universal-analytics-v3-706f1d28f0a97f67a47515c96189277240ec4940d968955042066d7873fd1fe8.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="/">
<h1>Entwicklergate</h1>
</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>