小弟用delphi写了个邮件群发器,功能做的还可以现在的问题是1.我用indy10的smtp,目前仅sogou,sohu支持的比较好
  如何支持更多的邮箱?有更好的控件吗?2.我想自建邮件服务器,试了下winwebmail,可以实现  但是发件的时候dns解析太慢,有没有更好的邮件服务器?
  
  如何做到本机又快又稳定?
谢谢了!

解决方案 »

  1.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, IdMessage, IdBaseComponent, IdComponent,DateUtils,
      IdTCPConnection, IdTCPClient, IdMessageClient, IdSMTP;type
      TForm1 = class(TForm)
        IdSMTP1: TIdSMTP;
        IdMessage1: TIdMessage;
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
    begin
      try
        IdSMTP1.Host:='172.20.100.21';
        IdSMTP1.Username:='jufei';
        IdSMTP1.Password:='1234';
        IdSMTP1.Port:=25;
        IdSMTP1.AuthenticationType:=atLogin;
        IdSMTP1.Connect;
        IdMessage1.Recipients.EMailAddresses:='[email protected]';
        IdMessage1.From.Address:='[email protected]';
        IdMessage1.Subject:='Love mail';
        IdMessage1.Body.Text:='Dear Wife,'+#13#10+'       If you receive this Email,That is what I miss you......'+#13+#13+'Success_ju'+#13+formatdatetime('yyyy/mm/dd',Now);
        IdSMTP1.Authenticate;
        IdSMTP1.Send(IdMessage1);
        ShowMessage('@_@發送成功!');
        IdSMTP1.Disconnect;
      except
        IdSMTP1.Disconnect;
        Showmessage('@^^@發送失敗!');
        Exit;
      end;
    end;end.
      

  2.   

    楼上的我用的是indy10,和indy9不一样的
    如果把 IdSMTP1.AuthType:=atLogin 还要赋什么值?否则不对
      

  3.   

    indy10與indy9大同小異,你要Login其它官方網站需要驗證的...
      

  4.   

    你可以自己实现SMTP协议,不用邮件服务器直接发邮件。
      

  5.   

    引用一下大俠說的:
    现在很多邮箱都做了发送权限设置,比如126,和新申请的163邮箱,用indy基本设置都无法通过认证,所以你查一下,网上我好像见过,有设置高级权限的方法........