Beispiel #1
0
BOOL CSMTP::SendMessage(CMailMessage * msg)
{
	ASSERT( msg != NULL );
	if( !m_bConnected )
	{
		m_sError = _T( "Must be connected" );
		return FALSE;
	}
	if( FormatMailMessage( msg ) == FALSE )
	{
		return FALSE;
	}
	if( transmit_message( msg ) == FALSE )
	{
		return FALSE;
	}
	return TRUE;
}
Beispiel #2
0
BOOL CSMTP::SendMessage(CMailMessage * msg)
{
	if( !m_bConnected )
	{
		//m_sError = _T( "通信未建立" );//<%IDS_SMTP_12%>
		m_sError = ::FuncGetStringFromIDS("<%IDS_SMTP_12%>");
		return FALSE;
	}
	if( FormatMailMessage( msg ) == FALSE )
	{
		return FALSE;
	}
	if( transmit_message( msg ) == FALSE )
	{
		return FALSE;
	}
	return TRUE;
}
Beispiel #3
0
BOOL CSMTP::SendMessage(MailHeader * msg)
{
	ASSERT( msg != NULL );

	msg->Date = GetCurrentTimeStr();

	if( !m_Connected )
	{
		m_Error = _T( "Must be connect" );
		AfxMessageBox(_T(m_Error));
		return FALSE;
	}
	if( FormatMailMessage( msg ) == FALSE )
	{
		return FALSE;
	}
	if( transmit_message( msg ) == FALSE )
	{
		return FALSE;
	}
	return TRUE;
}
Beispiel #4
0
BOOL CSMTP::SendMessage(CMailMessage * msg)
{
	ASSERT( msg != NULL );
	if( !m_bConnected )
	{
		m_sError = _T( "Must be connected" );
		return FALSE;
	}
	if( FormatMailMessage( msg ) == FALSE )
	{
		OutputDebugString("failed to format mail message\n");

		//TRACE("failed to format mail message\n");
		return FALSE;
	}
	if( transmit_message( msg ) == FALSE )
	{
		OutputDebugString("failed to transmit message\n");

		//TRACE("failed to transmit message\n");
		return FALSE;
	}
	return TRUE;
}