OSDN Git Service

Send email to multi person success and add CC and TO list
[tortoisegit/TortoiseGitJp.git] / src / Utils / HwSMTP.h
index a3e1ea1..87d0f23 100644 (file)
@@ -58,21 +58,37 @@ public:
                BOOL bMustAuth,\r
                LPCTSTR lpszAddrFrom,\r
                LPCTSTR lpszAddrTo,\r
-               LPCTSTR lpszSenderName,\r
-               LPCTSTR lpszReceiverName,\r
                LPCTSTR lpszSubject,\r
                LPCTSTR lpszBody,\r
                LPCTSTR lpszCharSet,                                            // ×Ö·û¼¯ÀàÐÍ£¬ÀýÈ磺·±ÌåÖÐÎÄÕâÀïÓ¦ÊäÈë"big5"£¬¼òÌåÖÐÎÄʱÊäÈë"gb2312"\r
                CStringArray *pStrAryAttach=NULL,\r
-               CStringArray *pStrAryCC=NULL,\r
-               UINT nSmtpSrvPort=25\r
+               LPCTSTR pStrAryCC=NULL,\r
+               UINT nSmtpSrvPort=25,\r
+               LPCTSTR pSend = NULL,\r
+               LPCTSTR pToList = NULL\r
+               );\r
+       BOOL SendSpeedEmail\r
+               (\r
+                       LPCTSTR lpszAddrFrom,\r
+                       LPCTSTR lpszAddrTo,\r
+                       LPCTSTR lpszSubject,\r
+                       LPCTSTR lpszBody,\r
+                       LPCTSTR lpszCharSet,                                            // ×Ö·û¼¯ÀàÐÍ£¬ÀýÈ磺·±ÌåÖÐÎÄÕâÀïÓ¦ÊäÈë"big5"£¬¼òÌåÖÐÎÄʱÊäÈë"gb2312"\r
+                       CStringArray *pStrAryAttach=NULL,\r
+                       LPCTSTR pStrAryCC=NULL,\r
+                       UINT nSmtpSrvPort=25,\r
+                       LPCTSTR pSend = NULL\r
                );\r
        CHwSMTP();\r
        virtual ~CHwSMTP();\r
 \r
+protected:\r
+       CString GetServerAddress(CString &email);\r
+       void GetNameAddress(CString &in, CString &name,CString &address);\r
+\r
 private:\r
        BOOL SendSubject();\r
-       CStringArray m_StrAryCC;\r
+       CString m_StrCC;\r
        BOOL SendHead();\r
        BOOL auth();\r
        BOOL SendEmail();\r
@@ -87,10 +103,13 @@ private:
        CString m_csPasswd;\r
        CString m_csAddrFrom;\r
        CString m_csAddrTo;\r
-       CString m_csSenderName;\r
+       CString m_csFromName;\r
        CString m_csReceiverName;\r
        CString m_csSubject;\r
        CString m_csBody;\r
+       CString m_csSender;\r
+       CString m_csToList;\r
+\r
 private:\r
        BOOL m_bMustAuth;\r
        UINT m_nSmtpSrvPort;\r
@@ -114,15 +133,19 @@ BOOL SendEmail (
                                  BOOL bMustAuth,                                                       // SMTP ·þÎñÆ÷ÐèÒªÉí·ÝÑéÖ¤\r
                                  LPCTSTR lpszAddrFrom,                                         // ·¢ËÍÕß E-Mail µØÖ·\r
                                  LPCTSTR lpszAddrTo,                                           // ½ÓÊÕÕߵĠE-Mail µØÖ·\r
-                                 LPCTSTR lpszSenderName,                                       // ·¢ËÍÕßµÄÃû×Ö£¬ÀýÈ磺лºìΰ\r
+                                 LPCTSTR lpszFromName,                                 // ·¢ËÍÕßµÄÃû×Ö£¬ÀýÈ磺лºìΰ\r
                                  LPCTSTR lpszReceiverName,                                     // ½ÓÊÕÕßµÄÃû×Ö£¬ÀýÈ磺ÕÅ·É\r
                                  LPCTSTR lpszSubject,                                          // ÓʼþÖ÷Ìâ\r
                                  LPCTSTR lpszBody,                                                     // ÓʼþÄÚÈÝ\r
                                  LPCTSTR lpszCharSet=NULL,                                     // ×Ö·û¼¯ÀàÐÍ£¬ÀýÈ磺·±ÌåÖÐÎÄÕâÀïÓ¦ÊäÈë"big5"£¬¼òÌåÖÐÎÄʱÊäÈë"gb2312"\r
                                  CStringArray *pStrAryAttach=NULL,                     // ¸½¼þÎļþ·¾¶£¬¿ÉÒÔ¶à¸ö\r
-                                 CStringArray *pStrAryCC=NULL,                         // ³­ËÍ E-Mail µØÖ·£¬¿ÉÒÔ¶à¸ö\r
-                                 UINT nSmtpSrvPort=25                                          // SMTP ·þÎñÆ÷µÄ TCP ¶Ë¿ÚºÅ\r
+                                 LPCTSTR pStrAryCC=NULL,                               // ³­ËÍ E-Mail µØÖ·£¬¿ÉÒÔ¶à¸ö\r
+                                 UINT nSmtpSrvPort=25,                                         // SMTP ·þÎñÆ÷µÄ TCP ¶Ë¿ÚºÅ\r
+                                 LPCTSTR pSend = NULL,\r
+                                 LPCTSTR ToList = NULL\r
                                  );\r
+\r
+\r
 void EndOfSMTP ();\r
 \r
 #endif // !defined(AFX_HwSMTP_H__633A52B7_1CBE_41D7_BDA3_188D98D692AF__INCLUDED_)\r