SmtpMail Authentication

  • Thread starter Thread starter Guinther Pauli
  • Start date Start date
G

Guinther Pauli

Hi All!

I am trying to send e-mails from a Web Forms application, using MailMessage
and SmtpMail.
Here is a sample code (pascal sintax):

procedure TWebForm1.Send(From, To, Subject, Text: System.String);
var
ms: MailMessage;
begin
ms := MailMessage.Create;
ms.From := From;
ms.To := To;
ms.Subject := Subject;
ms.Body := Text;
SmtpMail.SmtpServer := 'smtp.clubedelphi.com.br';
SmtpMail.Send(ms);
end;

But my server requires authentication (UserId and Password). How Can I pass
this values to SmtpMail?

Thanks

Guinther
 
Back
Top