直接调用outlook发送邮件的代码?这个程序……
yaoF1 2003-11-18 05:17:21 需要写一个发送Email的子程序,第一次接触,不懂!最好是直接调用outlook,把收件人的地址固定!那位大侠能给点提示,谢谢!还有以下这段程序是用咋么发送Email的?
procedure TLoadForm.SB_SuppliorClick(Sender: TObject);
var
MapiMessage:TMapiMessage;
MError: Cardinal;
begin
With MapiMessage do begin
ulReserved:=0;
lpszSubject:=nil;
lpszNoteText:=PChar('yaoliang2963@163.com');
lpszMessageType:=nil;
lpszDateReceived:=nil;
lpszConversationID:=nil;
flFlage:=0;
lpOriginator:=nil;
nRecipCount:=0;
lpRecips:=nil;
nFileCount:=0;
lpFiles:=nil;
end;
MError:=MapiSendMail(0,0,MapiMessage,
MAPI_DIALOG or MAPI_LOGON_UI or MAPI_NEW_SESSION,0);
end;
可惜在我编译的时候有提示:好象是说TMapiMessage未申明吧!我把它加入到uses中,也不行,没有这个单元的!晕死了,那位能给点意见!谢了,很急!!