I just did a simple search on Google and came up with well over 100.000 entries. The very first one is on the About.com website and provides full instructions and code for what you wish to do.
from Robert Meek dba Tangentals Design -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jerry Sent: Sunday, January 08, 2006 8:12 AM To: [email protected] Subject: Re: Sending and e-mail in Delphi Hi , Thanks for the responses Re: Sending and e-mail in Delphi I have downloaded the TMAIL2000 components but have to say I have no idea how to use them. They have nothing in the way of documentation and after searching through a lot of the FAQ's on the yahoo forum I have not been able to find a solution. All I want to do is send a 3 or 4 line e-mail with a clickable link to a website and without user intervention. No attachments. I've tried a lot of components without success, the latest being Winshoes. I thought this was going to be the easiest but I'm getting an "undeclared identifier: 'SMTP' for some reason. I'm using code snippets from one of the demo's and can't understand what's going wrong. I dropped a WinshoeSMTP and a WinshoeMessage component on the form and named them SMTP and Msg. I have SMTPWinshoe, Winshoes, WinshoeMessage in the USES section and SMTP: TWinshoeSMTP; Msg: TWinshoeMessage; in the TYPE section. Any ideas on this one or can someone show me how to use the TMAIL2000 components. The code I'm using for winshoes is this..... ---------------------------------------------------------------------------- ----- Procedure SendEMail; Begin SMTP.Host := 'smtp.mailserver.com'; // This is where I'm getting an "Undeclared identifier: 'SMTP' With Msg Do Begin Attachments.Clear; Too := '[EMAIL PROTECTED]'; From := '[EMAIL PROTECTED]'; Subject := 'This is a Test'; Text := 'This is the body of the e-mail.'; // would like to have a clickable link to a website in the body. End; Begin If EMailAndHostAreValid Then Begin With TSenderThread.Create(True) do Begin FreeOnTerminate := True; SMTP := Self.SMTP; Msg := Self.Msg; Resume; End; End Else ShowMessage('Setup your server parameters first'); End; End; ---------------------------------------------------------------------------- -------------------------------------- I found this code snippet and it works quite well and, although it requires no optional 3rd party components, it also requires user intervention. I've included it in case anyone is interested in it..... ---------------------------------------------------------------------------- -------------------- Uses ShellAPI,ComObj, ActiveX; Outlook := CreateOleObject('Outlook.Application'); miMail := Outlook.CreateItem(olMailItem); miMail.Recipients.Add('[EMAIL PROTECTED]'); miMail.Subject := 'CONGRATULATIONS'; // use this to send a plain text email (all versions of Outlook) miMail.Body := 'Attached is the list of email addresses.'; // alternatively send an HTML email (not in Outlook 97) // miMail.HTMLBody := 'we would like to wish you a Happy New Year'; // miMail.Attachments.Add('C:\temp\list.txt', EmptyParam, EmptyParam, EmptyParam); ---------------------------------------------------------------------------- ------------------------------------------- Regards Jerry _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

