SAKEMAIL

所属分类:Pascal/Delphi编程
开发工具:Delphi
文件大小:239KB
下载次数:96
上传日期:2007-08-20 00:05:49
上 传 者qazwsx1230
说明:  delphi下 编程发送邮件源代码
(Send e-mail under delphi programming source code)

文件列表:
docs (0, 1998-12-22)
docs\rfc0822_format.txt (106299, 1997-04-12)
docs\rfc1225_pop3.txt (37340, 1997-05-17)
docs\rfc1521_mime.txt (187424, 1997-04-13)
docs\rfc1725_pop3_upd.txt (35058, 1998-11-26)
docs\rfc2045_mime1.txt (73728, 1997-11-30)
docs\rfc821_smtp.txt (101901, 1997-05-20)
EmailSak.dcp (31317, 1999-01-13)
EmailSak.dcu (1766, 1999-01-13)
EmailSak.dpk (600, 1998-12-22)
EmailSak.dpl (58368, 1999-01-13)
EmailSak.res (692, 1998-12-22)
Examples (0, 1998-06-13)
Examples\pop (0, 1998-06-13)
Examples\pop\pop.dof (933, 1998-09-27)
Examples\pop\pop.dpr (183, 1997-05-28)
Examples\pop\pop.res (876, 1997-06-16)
Examples\pop\Unit1.dcu (8040, 1998-09-27)
Examples\pop\Unit1.dfm (4390, 1998-02-06)
Examples\pop\Unit1.pas (5570, 1998-09-27)
Examples\smtp (0, 1998-06-13)
Examples\smtp\smtp.dpr (184, 1997-06-02)
Examples\smtp\smtp.res (876, 1997-06-16)
Examples\smtp\Unit1.dcu (6823, 1998-02-06)
Examples\smtp\Unit1.dfm (2742, 1998-02-06)
Examples\smtp\Unit1.pas (3827, 1998-02-06)
Examples\smtp\UNIT1.TXT (4020, 1997-08-20)
SakEmail.dcr (2564, 1997-06-13)
SakEmail.dcu (49986, 1999-01-13)
SakEmail.pas (69814, 1999-01-13)

{\rtf1\ansi\deff0\deflang1033{\fonttbl {\f0\fmodern Courier New;}{\f1\fmodern\fcharset0 Courier New;}{\f2\fnil\fcharset2 Symbol;}} \uc1\pard\ulnone\f0\fs20\par \par \par \b SakEmail components Version 1.9.3\par \f1 Copyright \'a9 1997, 19*** Sak\par Sergio Kessler\par email: sergio@perio.unlp.edu.ar\par web: http://www.perio.unlp.edu.ar/~sergio\par \b0\par \b Important\b0 : this update only work with Delphi own Sockets, I develop\par this with Delphi 3.0 c/s, but must work also with Delphi \par 3.01 pro and Delphi 3.01 c/s and above.\par \par Open the .dpk file and then choose install.\par \par The components will appear in the Internet palette.\par \par Contributors, so far, so guilty :)\par \par \pard {\pntext\f2\'b7\tab}{\*\pn\pnlvlblt\pnf2\pnindent360{\pntxtb\'b7}}\fi-360\li360\b Serge Wagener\b0\par \b {\pntext\f2\'b7\tab}Don Higgins\b0\par \b {\pntext\f2\'b7\tab}Matjaz Bravc\b0\par \b {\pntext\f2\'b7\tab}Serge Dosyukov\b0\par \b {\pntext\f2\'b7\tab}Gregor Duchalski\b0\par \b {\pntext\f2\'b7\tab}Brian Sheperd\b0\par \b {\pntext\f2\'b7\tab}Roger Fernando Reghin\b0\par \b {\pntext\f2\'b7\tab}Goeran Strehl (asem)\b0\par \b {\pntext\f2\'b7\tab}Dmitry Bondarenko \b0\par \b {\pntext\f2\'b7\tab}Taufer Pavel Ing.\b0\par \b {\pntext\f2\'b7\tab}Hou yg \b0\par \b {\pntext\f2\'b7\tab}Craig Manley \b0\par \b {\pntext\f2\'b7\tab}Greg Nixon \par {\pntext\f2\'b7\tab}Ulf Sturegren \par {\pntext\f2\'b7\tab}Kaufman Alex \par \pard\par \b0\par \par \par Well , here are a few things that could help you:\par \par \par \b TSakAttachedFile \b0 (TCollectionItem)\par ~~~~~~~~~~~~~~~~\par \tab\b properties\b0\par \tab\tab FileName: string;\par \tab\tab MIMEType: String;\par \tab\tab FileStream: TStream;\tab\tab\par \tab\b methods\b0\par \tab\tab SaveToFile( FileName: String);\par \tab\tab SaveToStream( Stream: TStream);\par \par \par \b TSakAttachedFiles \b0 (TCollection)\par ~~~~~~~~~~~~~~~~~\par \tab\b properties\b0\par \tab\tab Items[ index: integer]: TAttachedFile;\par \tab\b methods\b0\par \tab\tab Add( FileName: String);\par \par \tab\tab\par \b TSakMsg Component\par \b0 ~~~~~~~~~~~~~~~~~\par \tab\b properties\b0\par \tab\tab AttachedFiles: TAttachedFiles;\par \tab\tab UserName: string;\par \tab\tab From: string;\par \tab\tab MessageId: string; // read only\par \tab\tab InReplyTo: string; // this is the msgId that you are replying\par \tab\tab SendTo: String; // i.e. 'a@doma.com, b@domb.com ,c@domc.com'\par \tab\tab CC: String;\par \tab\tab ReturnPath: string;\par \tab\tab ReplyTo: String;\par \tab\tab Subject: string;\par \tab\tab Date: string; // read only\par \tab\tab Text: string;\par \tab\tab ExtraHeaders: string;\par \tab\tab Priority: (prHighest, prHigh, prNormal, prLow, prLowest);\par \tab\tab ContenType: string;\par \tab\tab Headers: TSringList;\par \par \par \b TSakMsgList Component (same behavior of a TList)\par \b0 ~~~~~~~~~~~~~~~~~~~~~\par \tab\b properties\b0\par \tab\tab Items[ index: integer]: TSakMsg;\par \tab\tab Count: integer;\par \tab\b methods\b0\par \tab\tab Clear;\par \tab\tab Add(Item: TsakMsg): Integer;\par \pard\ri-74\tab\tab Delete(Index: Integer);\par \pard\tab\tab First: TsakMsg;\par \tab\tab IndexOf(Item: TsakMsg): Integer;\par \tab\tab Insert(Index: Integer; Item: TsakMsg);\par \tab\tab Last: TsakMsg;\par \tab\tab Remove(Item: TsakMsg): Integer;\par \par \par \b TSMTP Component\par \b0 ~~~~~~~~~~~~~~~\par \tab\b properties\b0\par \tab\tab Connected : boolean\par \tab\tab ReplyCode : string;\par \tab\tab ReplyString : string;\par \tab\tab Error : boolean\par \tab\tab Host : string; // nn.nn.nn.nn or my.popserver.com\par \tab\tab Port : string; // default 110\par \tab\tab EncodeProgressStep: word;\par \tab\tab SendProgressStep: word; \par \tab\tab LocalizedDates: bolean // if false (default) it will use standards\par \tab\tab\tab\tab\tab\tab dates (english)\par \tab\b methods\b0\par \tab\tab Connect;\par \tab\tab SendMessage( aMsg: TSakMsg): boolean;\par \tab\tab Quit;\par \tab\b events\b0\par \tab\tab OnConnect\par \tab\tab OnQuit\par \tab\tab OnError\par \tab\tab OnBeforeSend;\par \tab\tab OnAfterSend;\par \tab\tab OnEncodeStart;\par \tab\tab OnEncodeProgress;\par \tab\tab OnEncodeEnd;\par \tab\tab OnSendProgress;\par \tab\tab OnRead;\par \b\par \par TSakPOP Component\par \b0 ~~~~~~~~~~~~~~~~~\par \tab\b properties\b0\par \tab\tab SessionState : \{ Authorization, Transaction\}\par \tab\tab Connected : boolean\par \tab\tab ReplyCode : string;\par \tab\tab ReplyString : string;\par \tab\tab Error : boolean\par \tab\tab MsgCount : integer // valid only when connected\par \tab\tab UserId : string;\par \tab\tab Passwd : string;\par \tab\tab Host : string; // nn.nn.nn.nn or my.popserver.com\par \tab\tab Port : string; // default 110\par \tab\tab DecodeProgressStep: word;\par \tab\b methods\b0\par \tab\tab Connect;\par \tab\tab Login;\par \tab\tab RetrieveHeaders( id : integer): string\par \tab\tab RetrieveMessage( id : integer): TSakMsg // id = number of the msg\par \tab\tab RetrieveAllMesagges( var SakMsgList: TSakMsgList): integer;\par \tab\tab DeleteMessage( id : integer);\par \tab\tab Quit;\par \tab\b events\b0\par \tab\tab OnConnect\par \tab\tab OnQuit\par \tab\tab OnError\par \tab\tab OnRead;\par \tab\tab OnDecodeStart;\par \tab\tab OnDecodeProgress;\par \tab\tab OnDecodeEnd;\par \tab\tab OnBeforeRetrieve;\par \tab\tab OnAfterRetrieve;\par \tab\tab\par \par \par \par Have fun !!\par I appreciate very much the feedback that I could \par obtain from you.\par \par \b TSakEmail components\par Copyright \'a9 1997, 19*** Sak\par Sergio Kessler\par email: sergio@perio.unlp.edu.ar\par web: http://www.perio.unlp.edu.ar/~sergio\par \b0\par \par Note: if you made components, please release it free, \par not all in the life is money.\par \par \par \b History\b0 :\par \tab 0.9\tab\tab First released version\par \tab 0.9.1b\tab Fixed when a mail server reply on the connection with \par \tab\tab\tab more than one line\par \tab 0.9.2b\tab I forget to return a value in functions \par \tab\tab\tab retrieveHeader/Message =)\par \tab\tab\tab and fixed it. Some minor bugs that I don't remember fixed.\par \tab\tab\tab Added MIME-compliant base*** support (not for use by now).\par \tab\tab\tab Added examples.\par \tab 0.9.2.1b\tab Fixed a bug when send a mail and the first line disappear \par \tab\tab\tab (thanks to Arun)\par \tab\tab\tab Now, you could do MySMTP.MsgTo := \par \tab\tab\tab 'a@doma.com; b@domb.com;c@domc.com';\par \tab\tab\tab the spaces before/after semicolon doesn't matter (I hope ;) ).\par \tab 0.9.3b\tab Many changes, I added a SakMsg component that make send binary\par \tab\tab\tab attachments a snap. But have one problem, if you send as \par \tab\tab\tab attach a file > 20 Kb, it doesn't work (I don't know why,\par \tab\tab\tab maybe a problem of sockets). Developed with a version 2.0b of \par \tab\tab\tab WSockets and D3.\par \tab 0.9.3.1b\tab Changed the POP.login to a function that return the number of \par \tab\tab\tab new msgs.\par \tab\tab\tab Added the event OnRetrieveProgress on the SakPOP, and fixed \par \tab\tab\tab the example, sorry =)\par \tab\tab\tab Minor changes to the code.\par \tab 1.0\tab\tab Developed with WSockets 1.2\par \tab\tab\tab POP.Login now return a boolean depending id the user is\par \tab\tab\tab authorized, and POP.Init return the number of new msgs.\par \tab 1.01\tab\tab Fixed a bug with a bounced mail.\par \tab 1.02\tab\tab Minor bugs fixed (some variants of boundary)\par \tab\tab\tab\b 14/10/97\par \b0\tab 1.1.0\tab\tab Warning: WSockets1.2 have some bugs that result in \par \tab\tab\tab bad attachments. So I decided to use the sockets of\par \tab\tab\tab Delphi 3 founded in D3 c/s D3.01 pro and D3.01 c/s.\par \tab\tab\tab Now all seems to work fine and much more smooth.\par \tab\tab\tab And of course the interface of SakEmail hasn't changed.\par \tab\tab\tab\b 26/10/97\b0\par \tab 1.2.0\tab\tab Added the Reply-To field to TSakMsg comp.\par \tab\tab\tab Now you must use ',' when you want to send the msg. to\par \tab\tab\tab multiple recipients, i.e.: 'a@doma.com, b@domb.com,c@domc.com'\par \tab\tab\tab This change is done for better compatibility with other\par \tab\tab\tab emails clients.\par \tab\tab\tab Better formatting of the field Date of TSakMsg.\par \tab\tab\tab Some changes to the code.\par \tab\tab\tab\b 17/11/97\b0\par \tab 1.2.1\tab\tab Now, all searches are made in case-insensitive, it could\par \tab\tab\tab prevent some unexpected responses (no one reported, but...).\par \tab\tab\tab Some changes to the code (again).\par \tab\tab\tab\b 20/11/97\par \b0\tab 1.2.2\tab\tab Some bugs fixed. (\b Thanks to Serge Wagener from .lu\b0 )\par \tab\tab\tab\b 24/11/97\b0\par \tab 1.2.3\tab\tab Added the field 'MIME-Version: 1.0'.\par \tab\tab\tab It seems that is necessary :)\par \tab\tab\tab\b 25/11/97\b0\par \tab 1.3.0 \tab Added compatibility with SCO and VAX servers.\par \tab\tab\tab Fixed a minor bug with the boundary.\par \tab\tab\tab Change the generator of the message id.\par \tab\tab\tab Added the field MessageId and InReplyTo to the TSakMsg\par \tab\tab\tab component.\par \tab\tab\tab Added the field In-Reply-To that is added to the message\par \tab\tab\tab generated when it is <> ''.\par \tab\tab\tab\b 30/11/97\b0\par \tab 1.3.1\tab\tab Almost rewrote the parsing code. Now is more easy for you\par \tab\tab\tab if you want hack/modify the code.\par \tab\tab\tab Better treatment of emails with html inside.\par \tab\tab\tab\b 15/12/97\b0\par \tab 1.4\tab\tab Added support for UUCoded attachments.\par \tab\tab\tab Added a small delay when sending the email, seems that some \par \tab\tab\tab servers can't deglut the info too fast, causing problems with \par \tab\tab\tab sockets buffers and leading to crash the client machine, I \par \tab\tab\tab don't know if is a Borland bug or Microsoft bug.\par \tab\tab\tab (\b thanks to Don Higgins\b0 ).\par \tab\tab\tab\b 19/12/97\b0\par \tab 1.4.1\tab\tab Fixed a bug that send double '<' and '>' (ie. <>)\par \tab\tab\tab when the full user name is used. Check the new SMTP demo.\par \tab\tab\tab\b Thanks to Serge Wagener for locate this bug, track it down and\par \tab\tab\tab send me the fix.\par \tab\tab\tab 2/2/***\b0\par \tab 1.5.0\tab\tab Added the Canceled property to TSakPOP and to TSakSMTP.\par \tab\tab\tab Due to this addition now RetrieveAllMessages is a function\par \tab\tab\tab that return the number of msgs. retrieved and SendMessage is\par \tab\tab\tab a boolean function (maybe someone has pressed the cancel btn).\par \tab\tab\tab Fixed a bug when the subject field is too large.\par \tab\tab\tab\b 9/2/***\b0\par \tab 1.5.1\tab\tab Fixed a bug with a message within a message (recursive msgs).\par \tab\tab\tab\b 18/2/***\b0\par \tab 1.5.2\tab\tab Fixed a bug what happens when after the field 'To:' appear a\par \tab\tab\tab blank line(\b Thanks to Osvaldo Fillia\b0 ). Fixed a bug when sending \par \tab\tab\tab email to more than two address (the separator is still ',').\par \tab\tab\tab\b 9/3/***\b0\par \tab 1.6.0\tab\tab\b 1\b0 .- Sometimes the filenames of an attachment contain invalid\par \tab\tab\tab chars making very dificult to open a TSaveDialog (you have\par \tab\tab\tab noted this ?), now SakEmail deletes the invalid chars.\par \tab\tab\tab\b 2\b0 .- Applied a patch from\b Matjaz Bravc\b0 , that resolve the \par \tab\tab\tab problem of localized dates, letting you choose (in design \par \tab\tab\tab time) if you want localized dates (NOT recommended) or \par \tab\tab\tab standards dates (english) via the LocalizedDates boolean \par \tab\tab\tab property in the TSakSMTP comp. Thanks also to \b Serge Dosyukov\lang11274\b0 \par \tab\tab\tab for sending me a fix.\lang1033\par \tab\tab\tab\b 3\b0 .- Also I applied another patch of \b Gregor Duchalski \b0 that cure \par \tab\tab\tab a bug with PChar when this unit is used under NT. \par \tab\tab\tab\b 4\b0 .- It seems that some machines need more delay when sendig a \par \tab\tab\tab msg (see previous posting 19/12/97), thanks to \b Matjaz Bravc\b0 .\par \tab\tab\tab\b 5\b0 .- I discover a bug in the transparency code, it is fixed \par \tab\tab\tab now.\par \tab\tab\tab Did you see the benefits of Open Source Software ? :)\par \tab\tab\tab\b 26/3/***\b0\par \tab 1.6.1\tab\tab Added a FUNCFileName private variable to manage the complete\par \tab\tab\tab path of the attached file. I receive problems reports with \par \tab\tab\tab this, it work now ?.\par \tab\tab\tab Reduced the line sleep to 30 (tell me if this value doesn't\par \tab\tab\tab work for you).\par \tab\tab\tab\b 27/4/***\b0\par \tab 1.7.0\tab\tab\b 1.\b0 - Fixed a memory leak, thanks to \b Don Higgins\b0 .\par \tab\tab\tab\b 2\b0 .- Moved the string esErrorInFormatOfMsg to a property of \par \tab\tab\tab SakPOP.\par \tab\tab\tab\b 3\b0 .- Because some people need to use IP addresses instead of \par \tab\tab\tab Host names, I've added a new property IPAddress to SakPOP and \par \tab\tab\tab SakSMTP. If both are filled, then the Host name\tab will be used, \par \tab\tab\tab thanks to \b Roger F. Reghin \b0 for reporting this. The side effect \par \tab\tab\tab for this is that YOUR app must check if the host is a host \par \tab\tab\tab name or a IP address, in my app I remove the periods and try\par \tab\tab\tab to convert the result to a float (long integers don't work,\par \tab\tab\tab but float accept chars 'e') if it doesn't work I assume that \par \tab\tab\tab is a host name (someone has a better and simple idea ?).\par \tab\tab\tab\b 4\b0 .- Added the property FileStream to the class TAtachedFile \par \tab\tab\tab and the procedure SaveToStream, this was done by \b Brian Sheperd\b0\par \tab\tab\tab\b 5\b0 .- The address separator (in the TO: field) is ',' and ';' \par \tab\tab\tab now (before it was ',' only).\par \tab 1.7.1\tab\tab\b Roger F. Reghin\lang11274\b0 has sended me a pair of nice patches that \par \tab\tab\tab resolve in a good behavior when the destination address is\par \tab\tab\tab something like \lang1033 "Roger Reghin" and some\par \tab\tab\tab servers says that they couldn't relay that mail, etc.\par \tab\tab\tab Also Roger has made the IPAddress property obsolete (do not \par \tab\tab\tab use it, use Host instead), SakEmail will resolve the host\par \tab\tab\tab properly no matter if it is a host name or a IP address.\par \tab\tab\tab So in the next version \b I will remove the IPAddress property\b0 .\par \tab\tab\tab Thank you, Roger.\par \tab 1.8.0\tab\tab Well, it seems that I made a mistake, I investigated the \par \tab\tab\tab previous behavior and it is a fault of the SMTP (RFC 821), so \par \tab\tab\tab I fixed it.\par \tab\tab\tab The IPAddress property has been removed, use Host.\par \tab\tab\tab\b Goeran Strehl (asem) \b0 has sended me a patch that fix a memory leak\par \tab\tab\tab and one problem with the object inspector and the Text property of\par \tab\tab\tab a SakMsg.\par \tab\tab\tab\b Dmitry Bondarenko \b0 say that some servers do not send the msg size\par \tab\tab\tab after the RETR command, so he fix that issuing a LIST n command \par \tab\tab\tab first (work nicely).\par \tab\tab\tab Added the property CC (Carbon Copy) to the SakMsg object.\par \tab 1.8.1\tab\tab Added the property ReturnPath to the SakMsg comp.\par \tab\tab\tab Minor changes to the scanning code for the filename of \par \tab\tab\tab attachments.\par \tab 1.8.2\tab\tab Fixed a bug with the filename of attachments (thanks to\par \tab\tab\tab\b Taufer Pavel Ing.\b0 ).\par \tab\tab\tab Added the function IsIPAddress from \b hou yg\b0 (the actual code\par \tab\tab\tab don't work if the server is 265.net :)\par \tab\tab\tab Fixed a minor bug with html pages like attachments.\par \tab\tab\tab Some ***ing email server return a bounded message declaring\par \tab\tab\tab the boundary like 'boundary = ' and not 'boundary=' wich\par \tab\tab\tab is clear in the RFC, fixed.\par \tab 1.8.3\tab\tab A obscure bug was found by \b HuangYeJun\b0 from china, in the\par \tab\tab\tab RetrieveHeaders function if the retrieved text was larger\par \tab\tab\tab than 1024 bytes and the crlf.crlf fall in the middle of \par \tab\tab\tab two chunks, the function is blocked.\par \tab\tab\tab I don't use this function, btw.\par \tab 1.8.3.1\tab Just cleaned up a bit the FindUUAtachs function. Not bug \par \tab\tab\tab or enhancements release. Serge Wagener put me to work >:|\par \tab 1.8.4\tab\tab\b Dmitry Bondarenko \b0 (again) has found a bug in wich I do not \par \tab\tab\tab respect the RFC, wich say that replys from the SMTP server \par \tab\tab\tab could be multi-line, and the previous version just manage \par \tab\tab\tab as far as two lines. He also send me a nice patch, so the \par \tab\tab\tab bug is fixed.\par \tab\tab\tab\b Craig Manley \b0 added a ExtraHeaders property, please, use with\par \tab\tab\tab care, it's just not valid to put inside it whatever thing.\par \tab\tab\tab The CC header was not being added to the headers that were \par \tab\tab\tab being sent, so \b Craig\b0 fixed it.\par \tab\tab\tab\b Warning\b0 : I've put try/except in the TSakPOP.Connect and\par \tab\tab\tab TSMTP.Connect function around the line FSocket.Open, so\par \tab\tab\tab you will need to write something like:\par \tab\tab\tab myPOP.Connect;\par \tab\tab\tab if POPError then ...\par \tab\tab\tab in your code, the old way was:\par \tab\tab\tab try\par \tab\tab\tab\tab myPOP.Connect;\par \tab\tab\tab except\par \tab\tab\tab .....\par \tab\tab\tab end;\par \tab\tab\tab If you are strongly opossed to this change, drop me a line\par \tab\tab\tab and tell me why (I'm in doubts).\par \tab 1.8.5\tab\tab\b Greg Nixon\b0 added the priority property. The default priority\par \tab\tab\tab for each msg created will be prNormal, so you don't need\par \tab\tab\tab to change your code any bit.\par \tab 1.8.6\tab\tab\b Ulf Sturegren \b0 has added D4 compatibility, not many changes to\par \tab\tab\tab the source (one letter), but he found the error.\par \tab\tab\tab\b Hou yg\b0 has sent to me a revisited IsIPAddress function, so\par \tab\tab\tab I put the newer function in, infortunely my reply to him\par \tab\tab\tab doesn't want to go.\par \tab 1.8.7\tab\tab Ok, I discovered a weird bug, some old emailers (navigator 2)\par \tab\tab\tab does not format the message in multipart mode if people send\par \tab\tab\tab an attach, without writing any text and with no MIME settings.\par \tab\tab\tab Fixed. This could be serious, I recommend upgrading.\par \tab 1.8.8\tab\tab A small fix with the CC field. Some stupid mail servers put\par \tab\tab\tab tabs in some fields (CC:, TO:) when they want to make a new line,\par \tab\tab\tab the correct is to put at least a space in the beginning of the\par \tab\tab\tab line, added a little code to "fix" that.\par \tab 1.8.9\tab\tab Some 'moderns' pop3 servers doesn't support the LAST command, so\par \tab\tab\tab I've added a little code to cope with this and added a bool ... ...

近期下载者

相关文件


收藏者