<?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[Smtp Frage HELO local_host]]></title><description><![CDATA[<p>Hi,</p>
<p>ich habe hier einen Code zum senden einer Email<br />
über mein Programm.<br />
Allerdings würde ich gerne verhindern, dass Informationen<br />
über meinen PC mit gesendet werden (PC-Name momentane IP).<br />
Ich möchte anstelle (zumindest meiner Internet-IP) 192.168.0.1<br />
senden.</p>
<p>Ist das machbar ? Muss ich dann local_host über das HELO nicht<br />
irgendwie modifizieren ?</p>
<p>Der Code von dem ich glaube, dass da was machbar ist:</p>
<pre><code class="language-cpp">if( !m_wsSMTPServer.Create() )
	{
		m_sError = _T( &quot;Unable to create the socket.&quot; );
		delete response_buf;
		response_buf = NULL;
		return FALSE;
	}
	if( !m_wsSMTPServer.Connect( GetServerHostName(), GetPort() ) )
	{
		m_sError = _T( &quot;Unable to connect to server&quot; );
		m_wsSMTPServer.Close();
		delete response_buf;
		response_buf = NULL;
		return FALSE;
	}
	if( !get_response( CONNECT_SUCCESS ) )
	{
		m_sError = _T( &quot;Server didn't respond.&quot; );
		m_wsSMTPServer.Close();
		delete response_buf;
		response_buf = NULL;
		return FALSE;
	}
	gethostname( local_host, 80 ); // local_host = PC-Name gell ?
	sHello.Format( _T( &quot;HELO %s\r\n&quot; ), local_host );  //SENDE ich nicht hier mein HELO mit meiner IP+PC-namen ?! Wie kann ich das abändern ?

	m_wsSMTPServer.Send( (LPCTSTR)sHello, sHello.GetLength() );
	if( !get_response( GENERIC_SUCCESS ) )
	{
		m_wsSMTPServer.Close();
		delete response_buf;
		response_buf = NULL;
		return FALSE;
	}
	m_bConnected = TRUE;
	return TRUE;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/66203/smtp-frage-helo-local_host</link><generator>RSS for Node</generator><lastBuildDate>Fri, 05 Jun 2026 19:00:38 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/66203.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 26 Feb 2004 00:02:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Smtp Frage HELO local_host on Thu, 26 Feb 2004 00:02:46 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>ich habe hier einen Code zum senden einer Email<br />
über mein Programm.<br />
Allerdings würde ich gerne verhindern, dass Informationen<br />
über meinen PC mit gesendet werden (PC-Name momentane IP).<br />
Ich möchte anstelle (zumindest meiner Internet-IP) 192.168.0.1<br />
senden.</p>
<p>Ist das machbar ? Muss ich dann local_host über das HELO nicht<br />
irgendwie modifizieren ?</p>
<p>Der Code von dem ich glaube, dass da was machbar ist:</p>
<pre><code class="language-cpp">if( !m_wsSMTPServer.Create() )
	{
		m_sError = _T( &quot;Unable to create the socket.&quot; );
		delete response_buf;
		response_buf = NULL;
		return FALSE;
	}
	if( !m_wsSMTPServer.Connect( GetServerHostName(), GetPort() ) )
	{
		m_sError = _T( &quot;Unable to connect to server&quot; );
		m_wsSMTPServer.Close();
		delete response_buf;
		response_buf = NULL;
		return FALSE;
	}
	if( !get_response( CONNECT_SUCCESS ) )
	{
		m_sError = _T( &quot;Server didn't respond.&quot; );
		m_wsSMTPServer.Close();
		delete response_buf;
		response_buf = NULL;
		return FALSE;
	}
	gethostname( local_host, 80 ); // local_host = PC-Name gell ?
	sHello.Format( _T( &quot;HELO %s\r\n&quot; ), local_host );  //SENDE ich nicht hier mein HELO mit meiner IP+PC-namen ?! Wie kann ich das abändern ?

	m_wsSMTPServer.Send( (LPCTSTR)sHello, sHello.GetLength() );
	if( !get_response( GENERIC_SUCCESS ) )
	{
		m_wsSMTPServer.Close();
		delete response_buf;
		response_buf = NULL;
		return FALSE;
	}
	m_bConnected = TRUE;
	return TRUE;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/468039</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/468039</guid><dc:creator><![CDATA[Sokoban]]></dc:creator><pubDate>Thu, 26 Feb 2004 00:02:46 GMT</pubDate></item><item><title><![CDATA[Reply to Smtp Frage HELO local_host on Thu, 26 Feb 2004 05:32:21 GMT]]></title><description><![CDATA[<p>Wenn du einen Socket aufbaust hat die Gegenstelle immer deine IP. Was du für eine Domäne sendest bei HELO hängt vom Mailserver ab ob er die auch annimmt.</p>
<p>Ließ dir dazu die SMTP-RFC durch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/468063</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/468063</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Thu, 26 Feb 2004 05:32:21 GMT</pubDate></item><item><title><![CDATA[Reply to Smtp Frage HELO local_host on Thu, 26 Feb 2004 18:07:46 GMT]]></title><description><![CDATA[<p>Hi Unix-Tom,</p>
<p>ok, das mit dem local_host hab ich geändert auf einen<br />
anderen Namen, als den von meinem PC.</p>
<p>Die IP betreffend dachte ich an einen SmtpProxy ?<br />
Damit würde man doch aus der Mail beim Empfangen<br />
nicht meine IP ersehen können, sondern die vom Proxy,<br />
oder verstehe ich das falsch ?</p>
<p>Bei codeproject habe ich eben etwas in diese Richtung<br />
gefunden. Mal sehen ob es geht ?!<br />
hat das ggf. schonmal jemand hier aus dem Forum gemacht ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/468604</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/468604</guid><dc:creator><![CDATA[Sokoban]]></dc:creator><pubDate>Thu, 26 Feb 2004 18:07:46 GMT</pubDate></item></channel></rss>