张
张辉明
Unregistered / Unconfirmed
GUEST, unregistred user!
ID=1158323 这个贴我已经看过了。
我用的也是:idsmtp,idmessage来做的。我要实现从zhm_good@163.com发一封邮件到zhm_good@elong.com
unit mainunit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdComponent, IdTCPConnection, IdTCPClient,
IdMessageClient, IdSMTP, IdBaseComponent, IdMessage;
type
TForm1 = class(TForm)
IdMessage1: TIdMessage;
IdSMTP1: TIdSMTP;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
Body:Tstringlist;
begin
Body:=TStringList.Create;
Body.Add('明天放假。');
IdMessage1.Body.Assign(Body);
IdMessage1.From.Text :='"zhm_good" <zhm_good@163.com>';
IdMessage1.Recipients.EMailAddresses :='zhm_good@163.com';
IdMessage1.Subject :='通知';
IdSMTP1.UserID :='zhm_good';
IdSMTP1.Password:='mypassword';
//如果smtp没有校验用户,可以不用以上两句
IdSMTP1.Host :='smtp.163.com';
IdSMTP1.Connect;
try
IdSMTP1.Send(IdMessage1);
finally
IdSMTP1.Disconnect;
end;
end;
end.
一、
可是邮件发送不出去,错误为:
'553 you are not quthorized to send mail as<Mail from:<zhm_good@163.com>>,authentiction is required
好像是身份验证通不过去。
二、
请问怎样用它发附件?
三、用NMSMTP也可以发邮件(请看ID=1158323贴子)
它对附件大小有没有限制?
用idsmtp,idmessage或nmsmtp发信时,对信的正文内容大小(字节数)有没有限制?
请大家发发言,懂多少讲多少,本感激不尽!
我用的也是:idsmtp,idmessage来做的。我要实现从zhm_good@163.com发一封邮件到zhm_good@elong.com
unit mainunit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdComponent, IdTCPConnection, IdTCPClient,
IdMessageClient, IdSMTP, IdBaseComponent, IdMessage;
type
TForm1 = class(TForm)
IdMessage1: TIdMessage;
IdSMTP1: TIdSMTP;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
Body:Tstringlist;
begin
Body:=TStringList.Create;
Body.Add('明天放假。');
IdMessage1.Body.Assign(Body);
IdMessage1.From.Text :='"zhm_good" <zhm_good@163.com>';
IdMessage1.Recipients.EMailAddresses :='zhm_good@163.com';
IdMessage1.Subject :='通知';
IdSMTP1.UserID :='zhm_good';
IdSMTP1.Password:='mypassword';
//如果smtp没有校验用户,可以不用以上两句
IdSMTP1.Host :='smtp.163.com';
IdSMTP1.Connect;
try
IdSMTP1.Send(IdMessage1);
finally
IdSMTP1.Disconnect;
end;
end;
end.
一、
可是邮件发送不出去,错误为:
'553 you are not quthorized to send mail as<Mail from:<zhm_good@163.com>>,authentiction is required
好像是身份验证通不过去。
二、
请问怎样用它发附件?
三、用NMSMTP也可以发邮件(请看ID=1158323贴子)
它对附件大小有没有限制?
用idsmtp,idmessage或nmsmtp发信时,对信的正文内容大小(字节数)有没有限制?
请大家发发言,懂多少讲多少,本感激不尽!