代码如下:
procedure TForm1.Button1Click(Sender: TObject);
begin
  message1.From.Address:='[email protected]';
  message1.Recipients.EMailAddresses:='[email protected]';
  message1.Subject:='wealsh';
  message1.Body.Text:='wealsh';  smtp1.Host:='smtp.21cn.com';
  smtp1.Port:=25;
  smtp1.UserId:='wealsh';
  smtp1.Password:='123456';  try
  smtp1.Connect;
  smtp1.Send(message1);
  showmessage('ok');
  except
  endend;end.出错如图片所示:
http://bbs.2ccc.com/attachments/wealsh_2004826257.jpg