Enviar email de domínio

Delphi

02/09/2013

bom dia!

tenho uma rotina de enviar email pelo Gmail que funciona perfeitamente. (Delphi 7)
mas preciso enviar emails de conta do domínio... dai a rotina não funciona.

algum pode me ajudar? segue abaixo a rotina de enviar email pelo Gmail

try
IdSMTP1.Port := 587;
IdSMTP1.Host := 'smtp.gmail.com';
IdSMTP1.Username := email;
IdSMTP1.Password := senha;
IdSMTP1.AuthenticationType := atLogin;
IdSMTP1.Connect(0);

IdMessage1.Clear;
IdMessage1.From.Address := 'Enviar email';
IdMessage1.Recipients.EMailAddresses := CXdestinatario.Text;
IdMessage1.Subject := CXassunto.Text;
IdMessage1.Body.Add(memoMensagem.Lines.Text);

TIdAttachment.Create(IdMessage1.MessageParts, TFileName('C:\arquivo.pdf'));

try
IdSMTP1.Send(IdMessage1);
finally
IdSMTP1.Disconnect;
end;
Screen.Cursor:= crDefault;
Except on e: Exception do Application.MessageBox(pChar(e.Message), 'Erro', MB_ICONERROR + MB_ICONEXCLAMATION);
end;
end;
Barrys

Barrys

Curtidas 0
POSTAR