S
shuszj
Unregistered / Unconfirmed
GUEST, unregistred user!
根据 jmail 组件 为什么不行呀
procedure TForm1.Button1Click(Sender: TObject);
var msg : IMessage;
begin
CoInitialize( nil );
msg := CreateOleObject( 'JMail.Message' ) as IMessage; // Creating the JMail object
msg.Subject := Edit3.Text; // and setting some properties
msg.MailServerUserName := Edit6.Text;
msg.MailServerPassword := Edit7.Text;
msg.From := Edit1.Text;
msg.AddRecipient( Edit2.Text, '', '' );
msg.Body := Memo1.Text;
if Edit5.Text <> '' then
msg.AddAttachment( Edit5.Text, '' );
Label7.Caption := 'Sending mail...';
msg.Send( Edit4.Text, false );
msg := nil; // Cleaining up
CoUninitialize;
Label7.Caption := 'Mail has been sent';
end;
谁有没有例子,能教教小弟
procedure TForm1.Button1Click(Sender: TObject);
var msg : IMessage;
begin
CoInitialize( nil );
msg := CreateOleObject( 'JMail.Message' ) as IMessage; // Creating the JMail object
msg.Subject := Edit3.Text; // and setting some properties
msg.MailServerUserName := Edit6.Text;
msg.MailServerPassword := Edit7.Text;
msg.From := Edit1.Text;
msg.AddRecipient( Edit2.Text, '', '' );
msg.Body := Memo1.Text;
if Edit5.Text <> '' then
msg.AddAttachment( Edit5.Text, '' );
Label7.Caption := 'Sending mail...';
msg.Send( Edit4.Text, false );
msg := nil; // Cleaining up
CoUninitialize;
Label7.Caption := 'Mail has been sent';
end;
谁有没有例子,能教教小弟