• 大小: 24.7MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-04
  • 语言: C/C++
  • 标签:

资源简介

C++实现发送邮件,开发环境是VS2010 MFC,QQ邮箱测试通过

资源截图

代码片段和文件信息


// Email_Demo.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “Email_Demo.h“
#include “Email_DemoDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CEmail_DemoApp

BEGIN_MESSAGE_MAP(CEmail_DemoApp CWinApp)
ON_COMMAND(ID_HELP &CWinApp::onhelp)
END_MESSAGE_MAP()


// CEmail_DemoApp construction

CEmail_DemoApp::CEmail_DemoApp()
{
// support Restart Manager
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;

// TODO: add construction code here
// Place all significant initialization in InitInstance
}


// The one and only CEmail_DemoApp object

CEmail_DemoApp theApp;


// CEmail_DemoApp initialization

BOOL CEmail_DemoApp::InitInstance()
{
// InitCommonControlsEx() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles.  Otherwise any window creation will fail.
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// Set this to include all the common control classes you want to use
// in your application.
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);

CWinApp::InitInstance();

if (!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return FALSE;
}


AfxEnableControlContainer();

// Create the shell manager in case the dialog contains
// any shell tree view or shell list view controls.
CShellManager *pShellManager = new CShellManager;

// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need
// Change the registry key under which our settings are stored
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization
SetRegistryKey(_T(“Local AppWizard-Generated Applications“));

CEmail_DemoDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with Cancel
}

// Delete the shell manager created above.
if (pShellManager != NULL)
{
delete pShellManager;
}

// Since the dialog has been closed return FALSE so that we exit the
//  application rather than start the application‘s message pump.
return FALSE;
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件    6468608  2015-09-06 16:47  Email_Demo\Debug\Email_Demo.exe

     文件   15299140  2015-09-06 16:47  Email_Demo\Debug\Email_Demo.ilk

     文件   27192320  2015-09-06 16:47  Email_Demo\Debug\Email_Demo.pdb

     文件      89476  2015-09-06 16:43  Email_Demo\Email_Demo\Email_Demo.aps

     文件       2615  2015-08-31 16:51  Email_Demo\Email_Demo\Email_Demo.cpp

     文件        529  2015-08-31 16:51  Email_Demo\Email_Demo\Email_Demo.h

     文件       9820  2015-08-31 16:59  Email_Demo\Email_Demo\Email_Demo.rc

     文件       6026  2015-09-01 09:59  Email_Demo\Email_Demo\Email_Demo.vcxproj

     文件       2235  2015-09-01 09:59  Email_Demo\Email_Demo\Email_Demo.vcxproj.filters

     文件        143  2015-08-31 16:51  Email_Demo\Email_Demo\Email_Demo.vcxproj.user

     文件       3578  2015-09-06 16:46  Email_Demo\Email_Demo\Email_DemoDlg.cpp

     文件        683  2015-09-01 12:50  Email_Demo\Email_Demo\Email_DemoDlg.h

     文件       4599  2015-08-31 16:51  Email_Demo\Email_Demo\ReadMe.txt

     文件      67777  2009-08-31 02:31  Email_Demo\Email_Demo\res\Email_Demo.ico

     文件        804  2015-08-31 16:51  Email_Demo\Email_Demo\res\Email_Demo.rc2

     文件        487  2015-08-31 16:51  Email_Demo\Email_Demo\Resource.h

     文件      16389  2015-09-01 13:11  Email_Demo\Email_Demo\SendMail.cpp

     文件       2320  2015-09-01 12:50  Email_Demo\Email_Demo\SendMail.h

     文件          0  2015-09-01 09:56  Email_Demo\Email_Demo\Sock.cpp

     文件          0  2015-09-01 09:56  Email_Demo\Email_Demo\Sock.h

     文件        212  2015-08-31 16:51  Email_Demo\Email_Demo\stdafx.cpp

     文件       1865  2015-08-31 16:51  Email_Demo\Email_Demo\stdafx.h

     文件        314  2015-08-31 16:51  Email_Demo\Email_Demo\targetver.h

     文件   71454720  2015-09-06 16:47  Email_Demo\Email_Demo.sdf

     文件        897  2015-08-31 16:51  Email_Demo\Email_Demo.sln

    ..A..H.     19968  2015-09-06 16:47  Email_Demo\Email_Demo.suo

     目录          0  2015-09-01 13:11  Email_Demo\Email_Demo\res

     目录          0  2015-09-01 13:11  Email_Demo\Debug

     目录          0  2015-09-06 16:48  Email_Demo\Email_Demo

     目录          0  2015-09-06 16:48  Email_Demo

............此处省略3个文件信息

评论

共有 条评论

相关资源