Envio de E-mail, só funciona com o BO

Delphi

13/12/2004

Meus Amigos programadores, estou em um dilema...

essa função abaixo só funciona com o SMTP do bol..qualquer outro q eu coloco não não autenticado, o e-mail volta..da de tudo, menos enviar..

se alguem puder me dar uma luz...aqui está ela...

[b:1f4f2069c0]
function TForm1.EnviarEMail(const wHost,wUser,wSenha, wEMailDestino, wEMailFonte, wAssunto,wMensagem: WideString):String;
var
Mensagem: TIdMessage;
IdSMTP1 : TIdSMTP;
begin
try
try
Result := ´ok´;
Mensagem := TIdMessage.Create(Self);
IdSMTP1 := TIdSMTP.Create(self);



Mensagem.ContentType := ´text/HTML´;
Mensagem.Recipients.Clear;
Mensagem.Recipients.Add.Address := wEMailDestino;
Mensagem.From.Text := wEMailFonte;
Mensagem.Subject := wAssunto;
Mensagem.Body.Text := wMensagem;

with IdSMTP1 do
begin
AuthenticationType := atLogin;
Host := wHost;
UserName := wUser;
PassWord := wSenha;

try
Connect();
Send(Mensagem);
finally
Disconnect;
end;
end; // width

except
On E:Exception do
Result := (´Erro ao Enviar E-mail´+#13+ E.Message);
end;

finally
Mensagem.Free;
IdSMTP1.Free;
end;
[/b:1f4f2069c0]

se alguem puder ajudar......


Alanvieceli

Alanvieceli

Curtidas 0

Respostas

Fjsx

Fjsx

13/12/2004

Me passa alguns dos erros que estão acontecendo que eu desenrolo, mês passado também tava com alguns problemas ao enviar e-mails.


GOSTEI 0
Alanvieceli

Alanvieceli

13/12/2004

Esse é um problema...não da erros :?

por essemplo...eu coloco no HOST smt.bol.com.br..esse funciona perfeitamente...
dai coloca outros, por exemplo do do YAHOO, q é smtp.yahoo.com.br, faz tudo certo...mas retorna pro meu outlook, sendo q meu outlook é de outro servidor...ta muito estranho..nunca tinha visto isso....

mas o e-mail q retorna é esse...

[b:7741917cde]
This is the AVG E-mail Scanner program.

I´m sorry to have to inform you that the message returned
below could not be delivered to one or more destinations.

-------------------------------------------------------------------
alansvieceli@gmail.com: 5.7.1 ... Relaying denied. Proper authentication required.
-------------------------------------------------------------------

Your e-mail message is being returned to you in the next part of this
message. Try to send the message again.

Should you need assistance, please contact your administrator or your
internet service provider.
[/b:7741917cde]


o q eu fiz pra tentar arrumar...tentei conectar no pop antes...usando o idPOP, não lembro onde eu li q poderia adianter..mas nada...
se puder ajudar...


--------------------------------------------
Alan Vieceli


GOSTEI 0
Gabriela

Gabriela

13/12/2004

Eu tb estou tendo o mesmo problema e ainda não consegui resolver.

O que sei é que isso acontece (só o BOL funcionar), pq ele não precisa de autenticação. Os que precisam nao funcionam.

Se alguem puder ajudar...


GOSTEI 0
POSTAR