S
sundata
Unregistered / Unconfirmed
GUEST, unregistred user!
1.发送邮件源码:
procedure TFrmSendMail.btnSendClick(Sender: TObject);
begin
with IdMessage1 do
begin
Body.Assign(M_body.Lines);
From.Address:='cgcpj@163.com';
Recipients.EMailAddresses:='cgcpj@tom.com';
TIdAttachment.Create(IdMessage1.MessageParts,'');
Subject:='send email test';
end;
//begin send email
with IdSMTP1 do
begin
Host:='202.108.44.205';
Port:=25;
Username:='cgcpj';
Password:='123456';
try
Connect;
except
Showmessage('Connect the server failed!');
exit;
end;
try
Send(IdMessage1);
ShowMessage('Send email successful');
Finally
Disconnect;
end;
end;
end;
错误提示:
Project SendMail.exe raised exception class EIdProtocolReplayError with message
'You are not authorized to send mail as <MAIL FROM:<cgcpj@163.com>>',authentication is required
2.串口发短信,最好有源码,各位有劳啦
以前的帖子我也看了,使用nokia,但是我一直不知从何做起
分不够,另外开贴
procedure TFrmSendMail.btnSendClick(Sender: TObject);
begin
with IdMessage1 do
begin
Body.Assign(M_body.Lines);
From.Address:='cgcpj@163.com';
Recipients.EMailAddresses:='cgcpj@tom.com';
TIdAttachment.Create(IdMessage1.MessageParts,'');
Subject:='send email test';
end;
//begin send email
with IdSMTP1 do
begin
Host:='202.108.44.205';
Port:=25;
Username:='cgcpj';
Password:='123456';
try
Connect;
except
Showmessage('Connect the server failed!');
exit;
end;
try
Send(IdMessage1);
ShowMessage('Send email successful');
Finally
Disconnect;
end;
end;
end;
错误提示:
Project SendMail.exe raised exception class EIdProtocolReplayError with message
'You are not authorized to send mail as <MAIL FROM:<cgcpj@163.com>>',authentication is required
2.串口发短信,最好有源码,各位有劳啦
以前的帖子我也看了,使用nokia,但是我一直不知从何做起
分不够,另外开贴