SmtpSetupDlg.cpp
资源名称:mysmtp2.rar [点击查看]
上传用户:young001
上传日期:2007-07-04
资源大小:33k
文件大小:2k
源码类别:
WEB邮件程序
开发平台:
Visual C++
- // SmtpSetupDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "smtp.h"
- #include "SmtpSetupDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // SmtpSetupDlg dialog
- SmtpSetupDlg::SmtpSetupDlg(CWnd* pParent /*=NULL*/)
- : CDialog(SmtpSetupDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(SmtpSetupDlg)
- m_From = _T("");
- m_SmtpServer = _T("");
- m_Subject = _T("");
- m_MailTo = _T("");
- m_Pass = _T("");
- m_User = _T("");
- //}}AFX_DATA_INIT
- }
- void SmtpSetupDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(SmtpSetupDlg)
- DDX_Text(pDX, IDC_EDIT_FROM, m_From);
- DDX_Text(pDX, IDC_EDIT_SMTP, m_SmtpServer);
- DDX_Text(pDX, IDC_EDIT_SUBJECT, m_Subject);
- DDX_Text(pDX, IDC_EDIT_TO, m_MailTo);
- DDX_Text(pDX, IDC_EPass, m_Pass);
- DDX_Text(pDX, IDC_EUser, m_User);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(SmtpSetupDlg, CDialog)
- //{{AFX_MSG_MAP(SmtpSetupDlg)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // SmtpSetupDlg message handlers
- BOOL SmtpSetupDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
- // TODO: Add extra initialization here
- m_SmtpServer = AfxGetApp() -> GetProfileString(_T("SETUP"), _T("SMTPSERVER"), _T("smtp.163.net"));
- m_From = AfxGetApp() -> GetProfileString(_T("SETUP"), _T("FROM"), _T("lishengming0@tom.com"));
- m_MailTo = AfxGetApp() -> GetProfileString(_T("SETUP"), _T("TO"), _T("lishengming0@tom.com"));
- m_Subject = AfxGetApp() -> GetProfileString(_T("SETUP"), _T("SUBJECT"), _T("简单邮件发送测试"));
- m_User = AfxGetApp() -> GetProfileString(_T("SETUP"), _T("USERNAME"), _T("lishengming0"));
- m_Pass = AfxGetApp() -> GetProfileString(_T("SETUP"), _T("PASSWORD"), _T("lsm0737"));
- UpdateData(FALSE);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }