y + #13#10;
86 vBody := vBody + #13#10;
87 vBody := vBody + #13#10;
88 vBody := vBody + 'It is Auto Mail System,please do not reply this mail directly,thank you!';
89 Body.Add(vBody);
90 end;
91
92 with IdSMTP do
93 begin
94 if Connected then Disconnect;
95 AuthenticationType := atLogin;
96 Port := 25;
97 UserName := vUsername;
98 Password := vPassword;
99 Host := vHost;
100 Connect;
101 end;
102
103 IdSMTP.Send(IdMessage);
104 IdSMTP.Disconnect;
105
106 Result := True;
107 finally
108 IdSMTP.Free;
109 IdMessage.Free;
110 end;
111 end;
112
113 function SaveCxGridToExcel(vCxGrid: TcxGrid; var vFullPathName: string): Boolean; stdcall;
114 begin
115 Result := False;
116 vCxGrid := TcxGrid.Create(nil);
117 ExportGridToExcel(vFullPathName, vCxGrid);
118 vCxGrid.Free;
119 Result := True;
120 end;
121
122 function SaveCxGridToCSV(vCxGrid: TcxGrid; var vFullPathName: string): Boolean; stdcall;
123 begin
124 Result := False;
125
126 ExportGridToText(vFullPathName + '.XLS', vCxGrid, True, True, ',', '', '', 'CSV');
127 Result := True; ;
128 end;
129
130 exports
131 SuperDll_Init,
132 SuperDll_Ftp_PutOrGet,
133 SuperDll_EMail_Send,
134 SaveCxGridToExcel,
135 SaveCxGridToCSV;
136
137 begin
138 end.
|