[AccessD] vbSendMail - Using with Access

paul.hartland at fsmail.net paul.hartland at fsmail.net
Mon Mar 8 09:10:58 CST 2004


no, god I would forget my head if it was loose today.  Good old Mondays. 
Thanks to all for all your help.
Paul





Message date : Mar 08 2004, 03:06 PM
>From : "Mike & Doris Manning" 
To : "'Access Developers discussion and problem solving'" 
Copy to : 
Subject : RE: Re: [AccessD] vbSendMail - Using with Access
Did you set a reference to the DLL?

Doris Manning
Database Administrator
Hargrove Inc.
www.hargroveinc.com


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
paul.hartland at fsmail.net
Sent: Monday, March 08, 2004 9:47 AM
To: Access Developers discussion and problem solving
Subject: Re: Re: [AccessD] vbSendMail - Using with Access


To all,

This is my code I currently have for the VBSendMail.dll :

Public poSendmail As vbSendMail.clsSendMail ' Used for the vbSendMail
funtion (email directly to SMTP server).

Function SendEmail()
' **** SEND THE EMAIL MESSAGE DIRECTLY THROUGHT THE SMTP SERVER
(primary) ****

Set poSendmail = New vbSendMail.clsSendMail

poSendmail.SMTPHost = "Primary"
poSendmail.From = "me at orridge.co.uk"
poSendmail.FromDisplayName = "me"
poSendmail.Recipient = pStrEmailTo
poSendmail.ReplyToAddress = "me at orridge.co.uk"
poSendmail.Subject = "Personnel Available For Work"
poSendmail.Message = pStrEmailBody
poSendmail.Send

Set poSendmail = Nothing

'
************************************************************************
End Function

I’m still getting 

User Defined Type Not Defined

And points me to this line:

Public poSendmail As vbSendMail.clsSendMail

I have selected ActiveX Controls from the Tools menu in Access and
registered it that way, is that correct ?

Paul Hartland






Message date : Mar 08 2004, 01:51 PM
>From : "Lonnie Johnson"
To : "Access Developers discussion and problem solving" 
Copy to : 
Subject : Re: [AccessD] vbSendMail - Using with Access
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 you’re looking for faster.
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
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

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
Freeserve AnyTime - HALF PRICE for the first 3 months - Save £7.50 a month 
www.freeserve.com/anytime


More information about the AccessD mailing list