<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="https://www.schweda.net/style_feed.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:atom="http://www.w3.org/2005/Atom"	
	xmlns:dc="http://purl.org/dc/elements/1.1/" > 
<channel>
    <title>schweda.net - Blog</title>
    <link>https://www.schweda.net/</link>
    <description>schweda.net - Blog - Blog-Beitraege</description>
    <language>de-at</language>
    <copyright>Copyright 2006-2026</copyright>
    <generator>schweda.net</generator>
    <managingEditor>heinz.schweda@schweda.net (Heinz Schweda)</managingEditor>
    <webMaster>heinz.schweda@schweda.net (Heinz Schweda)</webMaster>
    <category>Blog</category>
	<atom:link href="https://www.schweda.net/blog_rss.php?bid=582" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[E-Mail-Versand über SysOutgoingEmailTable]]></title>
<description><![CDATA[
<p>Der nachstehende Job demonstriert, wie man per Code ein E-Mail versenden kann und dabei sowohl den Betreff als auch den Text flexibel steuern kann.
</p>


<p>Daf&uuml;r stehen in Dynamics AX die sog. E-Mail-Vorlagen zur Verf&uuml;gung, die in verschiedenen Sprachen hinterlegt werden k&ouml;nnen und wo auch Platzhalter (in meinem Beispiel <em>CustAccount </em>und <em>CustName</em>) verwendbar sind.
</p>


<p>Die E-Mails werden vor dem Versand in einer Tabelle <em>SysOutgoingEmailTable</em> gespeichert wo man deren Sendestatus bebachten kann.
</p>


<p>Voraussetzung f&uuml;r den Job sind eingerichtete E-Mail-Parameter (Stichwort SMTP-Server) sowie da&szlig; die Stapelverarbeitung l&auml;uft, die f&uuml;r die Abarbeitung der Tabelle <em>SysOutgoingEmailTable </em>verantwortlich ist.
</p>


<pre class="pre_blog_axcode">
static void sendMailOutgoingEmailTable(Args _args)
{
    Map mappings = new Map(Types::String, Types::String);        
    
    mappings.insert(&quot;CustAccount&quot;, &quot;4711&quot;);
    mappings.insert(&quot;Custname&quot;, &quot;schweda.net&quot;);
    
    SysEmailTable::sendMail(&quot;MyTemplate&quot;,                   // Template-ID
                            &quot;de-at&quot;,                        // Language
                            &quot;heinz.schweda@schweda.net&quot;,    // Recipient
                            mappings,                       // Placeholder-Map
                            &quot;&quot;,                             // Attachment-Filename
                            &quot;&quot;,                             // XML
                            true);                          // Use SysOutgoingEmailTable
}
</pre>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Sun, 18 Oct 2015 13:50:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=582</link>
<comments>https://www.schweda.net/blog_ax.php?bid=582</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=582</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=582</wfw:commentRss>
</item>
</channel>
</rss>	
