我使用NMSMTP和NMPOP3控件进行开发,但是使用NMSMTP时发邮件,总发生错误,提示
553 You are not authorized to Send from Mail ?
在使用NMPOP3时收到的邮件是乱码?请问如何处理?
553 You are not authorized to Send from Mail ?
在使用NMPOP3时收到的邮件是乱码?请问如何处理?
解决方案 »
- 如何知道tcomm串口的状态是关闭还是打开
- 亲爱的大家:哪里有关于D7调用WINDOWS视频API的资料?谢谢
- 程序執行後沒有可執行程序出現的問題
- 三层结构的连接问题
- 请问SPCOMM 控件怎么自定义接收数据,不用receivedata 事件,急急!!!
- 是用CompareStr还是直接比较运行的快?
- 如何实现类似MSN Messenger 的一段时间用户没有使用计算机显示"离线"
- 图像压缩,图像指针复位问题。请大家关注。谢谢!!
- 请问我要是用这个 windows 函数要怎么使用阿 InitCommonControlsEx
- 极菜问题!TButton怎样改变背景图片?
- 怎样获得网络中的资源信息?
- lmd -tools 5.0 如何注册(急)
你好,能否指明怎样解决这个密码验证问题,我也给这个问题困住了。
期待你的指点。
begin
if smtp.ReplyNumber = 250 then
label1.caption:=smtp.Transaction('auth login'); //开始认证
if smtp.ReplyNumber =334 then //返回值为334,让你输入用BASE64编码后的用户名
label1.caption:=smtp.Transaction(EncodeBase64('你的用户名'));// 用户名
if smtp.ReplyNumber =334 then // 返回值为334,让你输入用BASE64编码后的用户密码
label1.caption:=smtp.Transaction(EncodeBase64('你的密码')); //密码
end;function EncodeBase64(Source:string):string;
const BaseTable:string='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;
谢谢你。非常感谢你的指点.