Lonnie Johnson
prodevmg at yahoo.com
Mon Mar 8 07:47:47 CST 2004
I've used it. It works with the vbSendMail.dll and the mswinsck.ocx. You also have to set the reference to the vbSendMail.dll once it is registred. The reference is called SMTP Send Mail for VB6.0 . This is the module that calls it: Option Compare Database 'Module Level Declaration (WithEvents optional but recommended) Public poSendMail As vbSendMail.clsSendMail Public Function SMTPproc(strMailTo As String, _ Optional strMailSubject As String, _ Optional strMailMsg As String, _ Optional strMailAtt As String, _ Optional strMailCc As String) Set poSendMail = New vbSendMail.clsSendMail poSendMail.SMTPHost = "mail.kvc.org" poSendMail.UseAuthentication = True poSendMail.Username = "emailUserName" poSendMail.Password = "thepassword" 'poSendMail.RecipientDisplayName = "" poSendMail.ReplyToAddress = "username at mail.com" poSendMail.CcRecipient = strMailCc poSendMail.from = "username at mail.com" poSendMail.FromDisplayName = "KVC System Attendant" poSendMail.Recipient = strMailTo poSendMail.Subject = strMailSubject poSendMail.Message = strMailMsg '**************** 'For multiple file attachments, you need to separate each _ file name by a semi colon (;) within the string quote. 'poSendMail.Attachment = "c:\test2.txt;c:\test.txt" poSendMail.Attachment = strMailAtt '**************** poSendMail.Send Set poSendMail = Nothing End Function paul.hartland at fsmail.net wrote: To all, I have the VBSendMail.dll which I normally use to send via via Visual Basic 6.0 applications, however I need to try using it with Access XP now, I have copied all my code over and registered the VBSendMail.dll, but when I compile my code I get the error message : User Defined Type Not Defined And points me to this line: Public poSendmail As vbSendMail.clsSendMail What am I missing has anyone used VBSendMail.dll with Access before, I have told people to try using it as I thought it should work without a hitch. Any help greatly appreciated. Paul Hartland Freeserve AnyTime - HALF PRICE for the first 3 months - Save £7.50 a month www.freeserve.com/anytime -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com Lonnie Johnson ProDev, Professional Development of MS Access Databases Visit me at ==> http://www.prodev.us --------------------------------- Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.