OSDN Git Service

Complete Send mail coding and mail send have some problem.
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / Commands / SendMailCommand.cpp
index 2ac80c9..baeb3f4 100644 (file)
@@ -1,6 +1,7 @@
 #include "StdAfx.h"\r
 #include "SendMailCommand.h"\r
 #include "SendMailDlg.h"\r
+#include "SVNProgressDlg.h"\r
 \r
 bool SendMailCommand::Execute()\r
 {\r
@@ -10,6 +11,33 @@ bool SendMailCommand::Execute()
        \r
        if(dlg.DoModal()==IDOK)\r
        {\r
+               if(dlg.m_PathList.GetCount() == 0)\r
+                       return FALSE;\r
+       \r
+               CGitProgressDlg progDlg;\r
+               \r
+               theApp.m_pMainWnd = &progDlg;\r
+               progDlg.SetCommand(CGitProgressDlg::GitProgress_SendMail);\r
+                               \r
+               if (parser.HasVal(_T("closeonend")))\r
+                               progDlg.SetAutoClose(parser.GetLongVal(_T("closeonend")));\r
+               \r
+               progDlg.SetPathList(dlg.m_PathList);\r
+                               //ProjectProperties props;\r
+                               //props.ReadPropsPathList(dlg.m_pathList);\r
+                               //progDlg.SetProjectProperties(props);\r
+               progDlg.SetItemCount(dlg.m_PathList.GetCount());\r
+\r
+               DWORD flags =0;\r
+               if(dlg.m_bAttachment)\r
+                       flags |= SENDMAIL_ATTACHMENT;\r
+               if(dlg.m_bCombine)\r
+                       flags |= SENDMAIL_COMBINED;\r
+\r
+               progDlg.SetSendMailOption(dlg.m_To,dlg.m_CC,flags);\r
+               \r
+               progDlg.DoModal();              \r
+\r
                return true;\r
        }\r
        return false;\r