<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Automatische E-Mail mit &amp;quot;mapi&amp;quot; versenden ?]]></title><description><![CDATA[<p>Schöne Grüße an die Community,</p>
<p>nun habe ich mich auch mal angemeldet <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> um euch gleich zu belästigen.<br />
<strong>Vorweg:</strong> Ich bin leider noch nicht so die helle Leuchte in C++ <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /><br />
______________________________________________________________</p>
<p><strong>Es geht um Folgendes:</strong></p>
<p>In meiner Main wollte ich Zahlen vergleichen, funktioniert auch. Je nach dem wie die Berechnung ausfällt soll dann eine E-Mail automatisch versendet werden, bei welchen Zahlen &gt;90% aufgetreten ist. Wenn ale 3 Berechnungen &gt;90% sind werden dann 3 Mails versenden.</p>
<p>Nun habe ich zwar etwas gefunden (PASTE AND COPY), aber keine Anleitung wie man dass Anwenden kann...hmmm...</p>
<p>Weiß jm. wie man das in den Code integrieren kann damit das funktioniert?</p>
<p>Herzlichen Dank mal vorweg</p>
<p>Grüße</p>
<pre><code class="language-cpp">// Mail.cpp: Hauptprojektdatei

#include &quot;stdafx.h&quot;
#include &lt;iostream&gt;	

using namespace std;

// - LEIDER NUR PASTE UND COPY ---------------------------------------
#include &lt;mapi.h&gt;													//
#include &quot;imapi.h&quot; 													//
																	//
void CBugReport::OnOK()												//
{	 																//
	CIMapi  mail;													//
	mail.To(&quot;UltraMaroon@email.msn.com&quot;);							//  Set recipient name	 
	mail.To(&quot;someoneelse@somewhereelse.com&quot;);						//  Second recipient	 
	mail.Cc(&quot;cc@cc.com&quot;);											//  CC recipient	 
	mail.From(&quot;user@somewhere.com&quot;); 								//  Identify sender (not strictly necessary since MAPI will fill this in for you)	 
	mail.Subject(&quot;Test Email&quot;);										//  Subject of this email	 
	mail.Attach(&quot;somefilename&quot;);									//  Attaching a file	 
	mail.Attach(&quot;someotherfile&quot;, &quot;different_name_for_recipient&quot;);	//  Attach another file but give it a different name inside the email itself 	 
																	//
	 Put text of message in body	 
	mail.Text(&quot;Body text for this email&quot;); 							//  Set body text	 
	mail.Send();													//  Now send the mail! 	 
	CDialog::OnOK();												//
} 																	//

// - Zahlen vergleichen und Prüfuen, wenn Prüfung ergibt &gt;90%, dann Mail versenden mit Hinweis bei welchen Zahllen ---
int main(void)																										//
{ 																													// 
	int a = 10;																										// Zahl 1
	int b = 9;																										// Zahl 2
	int c = 8;																										// Zahl 3
	int d = 10;																										// Zahl 4
	int e = 5;																										// Zahl 5
	int f = 10;																										// Zahl 6
																													//
	if( (100*a / b) &lt; 90)																							// Test von 1. und 2. Zahl
		{ }																											// &lt; 90% =&gt; alles in Ordnung
	else{ 																											//
		cout &lt;&lt; endl &lt;&lt; 100 * a / d &lt;&lt; &quot; &gt; 90% =&gt; E-Mail verschicken, Zahle 1 u. 2&quot; &lt;&lt; endl;						// &gt; 90% =&gt; E-Mail über Mail
	}																												//
																													//
	if( (100 * d / c) &lt; 90)																							// Test von 3. und 4. Zahl
		{ }																											// &lt; 90% =&gt; alles in Ordnung
	else{ 																											//
		cout &lt;&lt; endl &lt;&lt; 100 * d / c &lt;&lt; &quot; &gt; 90% =&gt; E-Mail verschicken, Zahle 3 u. 4&quot; &lt;&lt; endl;						// &gt; 90% =&gt; E-Mail über Mail
	}																												//
																													//
	if( (100 * e / f) &lt; 90)																							// Test von 4. und 5. Zahl
		{ }																											// &lt; 90% =&gt; alles in Ordnung
	else{ 																											//
		cout &lt;&lt; endl &lt;&lt; 100 * e / f &lt;&lt; &quot; &gt; 90% =&gt; E-Mail verschicken, Zahle 3 u. 4&quot; &lt;&lt; endl;						// &gt; 90% =&gt; E-Mail über Mail
	}																												//
																													//
	getchar();																										//
	return 0;																										//
} 																													//
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/307615/automatische-e-mail-mit-quot-mapi-quot-versenden</link><generator>RSS for Node</generator><lastBuildDate>Thu, 06 Aug 2026 18:01:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/307615.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 31 Aug 2012 08:42:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Automatische E-Mail mit &amp;quot;mapi&amp;quot; versenden ? on Fri, 31 Aug 2012 08:43:56 GMT]]></title><description><![CDATA[<p>Schöne Grüße an die Community,</p>
<p>nun habe ich mich auch mal angemeldet <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> um euch gleich zu belästigen.<br />
<strong>Vorweg:</strong> Ich bin leider noch nicht so die helle Leuchte in C++ <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /><br />
______________________________________________________________</p>
<p><strong>Es geht um Folgendes:</strong></p>
<p>In meiner Main wollte ich Zahlen vergleichen, funktioniert auch. Je nach dem wie die Berechnung ausfällt soll dann eine E-Mail automatisch versendet werden, bei welchen Zahlen &gt;90% aufgetreten ist. Wenn ale 3 Berechnungen &gt;90% sind werden dann 3 Mails versenden.</p>
<p>Nun habe ich zwar etwas gefunden (PASTE AND COPY), aber keine Anleitung wie man dass Anwenden kann...hmmm...</p>
<p>Weiß jm. wie man das in den Code integrieren kann damit das funktioniert?</p>
<p>Herzlichen Dank mal vorweg</p>
<p>Grüße</p>
<pre><code class="language-cpp">// Mail.cpp: Hauptprojektdatei

#include &quot;stdafx.h&quot;
#include &lt;iostream&gt;	

using namespace std;

// - LEIDER NUR PASTE UND COPY ---------------------------------------
#include &lt;mapi.h&gt;													//
#include &quot;imapi.h&quot; 													//
																	//
void CBugReport::OnOK()												//
{	 																//
	CIMapi  mail;													//
	mail.To(&quot;UltraMaroon@email.msn.com&quot;);							//  Set recipient name	 
	mail.To(&quot;someoneelse@somewhereelse.com&quot;);						//  Second recipient	 
	mail.Cc(&quot;cc@cc.com&quot;);											//  CC recipient	 
	mail.From(&quot;user@somewhere.com&quot;); 								//  Identify sender (not strictly necessary since MAPI will fill this in for you)	 
	mail.Subject(&quot;Test Email&quot;);										//  Subject of this email	 
	mail.Attach(&quot;somefilename&quot;);									//  Attaching a file	 
	mail.Attach(&quot;someotherfile&quot;, &quot;different_name_for_recipient&quot;);	//  Attach another file but give it a different name inside the email itself 	 
																	//
	 Put text of message in body	 
	mail.Text(&quot;Body text for this email&quot;); 							//  Set body text	 
	mail.Send();													//  Now send the mail! 	 
	CDialog::OnOK();												//
} 																	//

// - Zahlen vergleichen und Prüfuen, wenn Prüfung ergibt &gt;90%, dann Mail versenden mit Hinweis bei welchen Zahllen ---
int main(void)																										//
{ 																													// 
	int a = 10;																										// Zahl 1
	int b = 9;																										// Zahl 2
	int c = 8;																										// Zahl 3
	int d = 10;																										// Zahl 4
	int e = 5;																										// Zahl 5
	int f = 10;																										// Zahl 6
																													//
	if( (100*a / b) &lt; 90)																							// Test von 1. und 2. Zahl
		{ }																											// &lt; 90% =&gt; alles in Ordnung
	else{ 																											//
		cout &lt;&lt; endl &lt;&lt; 100 * a / d &lt;&lt; &quot; &gt; 90% =&gt; E-Mail verschicken, Zahle 1 u. 2&quot; &lt;&lt; endl;						// &gt; 90% =&gt; E-Mail über Mail
	}																												//
																													//
	if( (100 * d / c) &lt; 90)																							// Test von 3. und 4. Zahl
		{ }																											// &lt; 90% =&gt; alles in Ordnung
	else{ 																											//
		cout &lt;&lt; endl &lt;&lt; 100 * d / c &lt;&lt; &quot; &gt; 90% =&gt; E-Mail verschicken, Zahle 3 u. 4&quot; &lt;&lt; endl;						// &gt; 90% =&gt; E-Mail über Mail
	}																												//
																													//
	if( (100 * e / f) &lt; 90)																							// Test von 4. und 5. Zahl
		{ }																											// &lt; 90% =&gt; alles in Ordnung
	else{ 																											//
		cout &lt;&lt; endl &lt;&lt; 100 * e / f &lt;&lt; &quot; &gt; 90% =&gt; E-Mail verschicken, Zahle 3 u. 4&quot; &lt;&lt; endl;						// &gt; 90% =&gt; E-Mail über Mail
	}																												//
																													//
	getchar();																										//
	return 0;																										//
} 																													//
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2247262</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2247262</guid><dc:creator><![CDATA[relhok]]></dc:creator><pubDate>Fri, 31 Aug 2012 08:43:56 GMT</pubDate></item><item><title><![CDATA[Reply to Automatische E-Mail mit &amp;quot;mapi&amp;quot; versenden ? on Fri, 31 Aug 2012 08:50:32 GMT]]></title><description><![CDATA[<p>Tut das Not? Copy&amp;Paste ist nicht programmieren und Lernen tust du dabei auch nichts. Ist eine einfache Ausgabe des Ergebnisses nicht auch erst einmal gut genug? Lern lieber erst einmal richtig C++ und in ein paar Monaten kannst du dir dann auch mal angucken, wie man Emails versendet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2247267</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2247267</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Fri, 31 Aug 2012 08:50:32 GMT</pubDate></item><item><title><![CDATA[Reply to Automatische E-Mail mit &amp;quot;mapi&amp;quot; versenden ? on Fri, 31 Aug 2012 08:54:13 GMT]]></title><description><![CDATA[<p>Gut ok, habs ja verstanden! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Sorry.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2247269</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2247269</guid><dc:creator><![CDATA[relhok]]></dc:creator><pubDate>Fri, 31 Aug 2012 08:54:13 GMT</pubDate></item></channel></rss>