Re: Email Sending - How To



"Patrick" <patrick_dohogne@xxxxxxxxx> wrote in message
news:427211f3@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> Where to start? Indy?

Yes, you can use TidSMTP and TidMessage:

{ setup SMTP }
SMTP.Host := SMTP_HOST;
SMTP.Port := SMTP_PORT;

{ setup mail message }
MailMessage.From.Address := 'looneylarry@xxxxxxxxxxxx';
MailMessage.Recipients.EMailAddresses := 'adolf@xxxxxxxx';
MailMessage.Subject := 'How's the weather?';
MailMessage.Body.Text := 'Be seeing you soon';

try
SMTP.Connect(1000);
SMTP.Send(MailMessage);
finally
if SMTP.Connected then SMTP.Disconnect;
end;

--

Download Blackbird Crow Raven's book
"STILL CASTING SHADOWS: Two American Families 1620-2006"
(.exe and Delphi source): http://cc.borland.com/ccweb.exe/listing?id=23106


.



Relevant Pages

  • Re: Forwarding an e-mail using Indy
    ... Fred Seymorh wrote: ... Is there something in TIdSMTP? ... > kind of "RawCopy" to create a new TIdMessage with all message parts ...
    (borland.public.delphi.thirdpartytools.general)
  • Indy 10, TIdSmtp and date/time
    ... My program uses a TIdMessage and TIdSmtp component to send messages to ... I'm not 100% sure Indy 10 causes this problem, but I cannot make up anything ... So the question is if I should set a property of TIdMessage and/or TIdSmtp ... ClientNNTPLine:= ClientConn.ReadLn; ...
    (comp.lang.pascal.delphi.misc)
  • Re: How to filter out some HTML?
    ... I did some poking around, and with Indy you can use TIdMessage to do ... .MessageParts for a .ContentType of 'text/html'. ...
    (borland.public.delphi.language.objectpascal)