NMsmtp发邮件???? 看一看这个贴子http://www.csdn.net/expert/topic/216/216950.shtm 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你可以到网上去下载,或者留下 Email 你可以到下面这个网址下载http://www.nevrona.com/indy http://www.csdn.net/expert/TopicView.asp?id=225216 function EncodeBase64(Source:string):string;const BaseTable = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';var Times, LenSrc, i: Integer; x1, x2, x3, x4: Char; xt: Byte;begin Result := ''; LenSrc := Length(Source); if LenSrc mod 3 = 0 then Times := LenSrc div 3 else Times := LenSrc div 3 + 1; for i := 0 to Times - 1 do begin if LenSrc >= (3 + i * 3) then begin x1 := BaseTable[(ord(Source[1 + i * 3]) shr 2)+1]; xt := (ord(Source[1 + i * 3]) shl 4) and 48; xt := xt or (ord(Source[2 + i * 3]) shr 4); x2 := BaseTable[xt + 1]; xt := (Ord(Source[2 + i * 3]) shl 2) and 60; xt := xt or (Ord(Source[3 + i * 3]) shr 6); x3 := BaseTable[xt + 1]; xt := (ord(Source[3 + i * 3]) and 63); x4 := BaseTable[xt + 1]; end else if LenSrc >= (2 + i * 3) then begin x1 := BaseTable[(Ord(Source[1 + i * 3]) shr 2) + 1]; xt := (Ord(Source[1 + i * 3]) shl 4) and 48; xt := xt or (Ord(Source[2 + i * 3]) shr 4); x2 := BaseTable[xt + 1]; xt := (Ord(Source[2 + i * 3]) shl 2) and 60; x3 := BaseTable[xt + 1]; x4 := '='; end else begin x1 := BaseTable[(Ord(Source[1 + i * 3]) shr 2)+1]; xt := (Ord(Source[1 + i * 3]) shl 4) and 48; x2 := BaseTable[xt + 1]; x3 := '='; x4 := '='; end; Result := Result + x1 + x2 + x3 + x4; end;end;procedure TeMail.smtpSendConnect(Sender: TObject);begin SMTPConnect:=True; sbSMTP.SimpleText:=TimeToStr(Time)+' : '+'Connect ! '; if smtpSend.ReplyNumber = 250 then smtpSend.Transaction('auth login'); if smtpSend.ReplyNumber = 334 then begin smtpSend.Transaction(EncodeBase64(mCSMTPServer.mUser)); smtpSend.Transaction(EncodeBase64(mCSMTPServer.mPassword)); end; smtpSend.SendMail; sbSMTP.SimpleText:=TimeToStr(Time)+' : '+'Start send mail ! ';end; mCSMTPServer.mUser为用户名mCSMTPServer.mPassword为密码搞不定的话》》》》》》》》》》》》》 :(我就是这样搞定的 DEPHI控制显示器开关!急急急 使用ADO插入数据时提示:多步操作产生错误,请检查每一步的状态 求好心人帮忙把看看下面代码转换成delphi. ADO+ACCESS的SQL语句,高难度,请大家来帮忙!散分 关于当前路径以及书的问题。 adoquery 的删除问题?高分急救!在线等待 大虾,救小弟一命!打印对齐????? 一个关于Query的小问题,请指点! 在DELPHI中调用MSCOMM,接收丢失二进制数据,附程序代码,请各位高手指教!!!! 如何实现应用程序的多语言版本 请教:有关mciSendCommand()的用法?? delphi1.0的程序运行出错。。。?
http://www.nevrona.com/indy
const
BaseTable = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
var
Times, LenSrc, i: Integer;
x1, x2, x3, x4: Char;
xt: Byte;
begin
Result := '';
LenSrc := Length(Source);
if LenSrc mod 3 = 0 then
Times := LenSrc div 3
else
Times := LenSrc div 3 + 1;
for i := 0 to Times - 1 do
begin
if LenSrc >= (3 + i * 3) then
begin
x1 := BaseTable[(ord(Source[1 + i * 3]) shr 2)+1];
xt := (ord(Source[1 + i * 3]) shl 4) and 48;
xt := xt or (ord(Source[2 + i * 3]) shr 4);
x2 := BaseTable[xt + 1];
xt := (Ord(Source[2 + i * 3]) shl 2) and 60;
xt := xt or (Ord(Source[3 + i * 3]) shr 6);
x3 := BaseTable[xt + 1];
xt := (ord(Source[3 + i * 3]) and 63);
x4 := BaseTable[xt + 1];
end
else if LenSrc >= (2 + i * 3) then
begin
x1 := BaseTable[(Ord(Source[1 + i * 3]) shr 2) + 1];
xt := (Ord(Source[1 + i * 3]) shl 4) and 48;
xt := xt or (Ord(Source[2 + i * 3]) shr 4);
x2 := BaseTable[xt + 1];
xt := (Ord(Source[2 + i * 3]) shl 2) and 60;
x3 := BaseTable[xt + 1];
x4 := '=';
end else
begin
x1 := BaseTable[(Ord(Source[1 + i * 3]) shr 2)+1];
xt := (Ord(Source[1 + i * 3]) shl 4) and 48;
x2 := BaseTable[xt + 1];
x3 := '=';
x4 := '=';
end;
Result := Result + x1 + x2 + x3 + x4;
end;
end;procedure TeMail.smtpSendConnect(Sender: TObject);
begin
SMTPConnect:=True;
sbSMTP.SimpleText:=TimeToStr(Time)+' : '+'Connect ! ';
if smtpSend.ReplyNumber = 250 then
smtpSend.Transaction('auth login');
if smtpSend.ReplyNumber = 334 then
begin
smtpSend.Transaction(EncodeBase64(mCSMTPServer.mUser));
smtpSend.Transaction(EncodeBase64(mCSMTPServer.mPassword));
end;
smtpSend.SendMail;
sbSMTP.SimpleText:=TimeToStr(Time)+' : '+'Start send mail ! ';
end;
mCSMTPServer.mPassword为密码搞不定的话》》》》》》》》》》》》》 :(
我就是这样搞定的