By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,581 Members | 1,966 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,581 IT Pros & Developers. It's quick & easy.

VB & Access Send Email

P: 35
Hai,
I need to send and receive Email's using VB and Ms-Access. Am using the following code. If i run this code, i has the error message as,

Compile Error
User-defined type not defined in the code for New clsSendMail

Private Sub Command0_Click()
Set poSendMail = New clsSendMail
poSendMail.UseAuthentication = True
poSendMail.UsePopAuthentication = True
poSendMail.POP3Host = "pop.gmail.com"
poSendMail.UserName = "ttamilvanan81"
poSendMail.Password = "classic"
poSendMail.SMTPHost = smtp.gmail.com
poSendMail.SMTPPort = 465
poSendMail.from = "ttamilvanan81@gmail.com"
poSendMail.FromDisplayName = Tamilvanan
poSendMail.Recipient = "ephrontamizhvanan@gmail.com"
poSendMail.RecipientDisplayName = "EphronTamilvanan"
poSendMail.ReplyToAddress = "ttamilvanan81@gmail.com"
poSendMail.Subject = "Test Mail for How to Send E-Mail"
poSendMail.Message = "This is a test"
poSendMail.send
End Sub

If anyone know how to run this code, if any components or tools can i installed?

if anyone knows, please let me know.

By
Tamilvanan
Mar 29 '07 #1
Share this Question
Share on Google+
6 Replies


vijaydiwakar
100+
P: 579
Hai,
I need to send and receive Email's using VB and Ms-Access. Am using the following code. If i run this code, i has the error message as,

Compile Error
User-defined type not defined in the code for New clsSendMail

Private Sub Command0_Click()
Set poSendMail = New clsSendMail
poSendMail.UseAuthentication = True
poSendMail.UsePopAuthentication = True
poSendMail.POP3Host = "pop.gmail.com"
poSendMail.UserName = "ttamilvanan81"
poSendMail.Password = "classic"
poSendMail.SMTPHost = smtp.gmail.com
poSendMail.SMTPPort = 465
poSendMail.from = "ttamilvanan81@gmail.com"
poSendMail.FromDisplayName = Tamilvanan
poSendMail.Recipient = "ephrontamizhvanan@gmail.com"
poSendMail.RecipientDisplayName = "EphronTamilvanan"
poSendMail.ReplyToAddress = "ttamilvanan81@gmail.com"
poSendMail.Subject = "Test Mail for How to Send E-Mail"
poSendMail.Message = "This is a test"
poSendMail.send
End Sub

If anyone know how to run this code, if any components or tools can i installed?

if anyone knows, please let me know.

By
Tamilvanan
If u've received this code from some where else then ask for the class module named clsSendMail
ur project don't have this module simply place this module and run the code
Mar 29 '07 #2

P: 35
If u've received this code from some where else then ask for the class module named clsSendMail
ur project don't have this module simply place this module and run the code
Hai,
You are Right, iam get this code from another person. But i don't receive any class module named clsSendMail. So thats why i am asking this.

Kindly, if you know this, please let me know....

Thanks

Tamilvanan
Mar 30 '07 #3

vijaydiwakar
100+
P: 579
Hai,
You are Right, iam get this code from another person. But i don't receive any class module named clsSendMail. So thats why i am asking this.

Kindly, if you know this, please let me know....

Thanks

Tamilvanan
how could i no what he had coaded for that module
Mar 30 '07 #4

P: 35
how could i no what he had coaded for that module
Hai,
I am sending mail using your code as your earlier post. But i can't got the clsSendMail class module. Can you please send me that class module.

and i need to attach the file in mail. So if you can know, how the attachments will be working, kindly post me the details.

Is this code need any ActiveX control or components, please let me know that details also.



Thank,
By
Tamilvanan
Mar 30 '07 #5

P: 35
how could i no what he had coaded for that module
Thank you very much.
If you know how to attach the file like, click the browse button and select any one file to attached in email.

If you know how to attach file in the above format, kindly let me know.

Thanks

Tamilvanan
Mar 30 '07 #6

vijaydiwakar
100+
P: 579
Thank you very much.
If you know how to attach the file like, click the browse button and select any one file to attached in email.

If you know how to attach file in the above format, kindly let me know.

Thanks

Tamilvanan
i think i've just posted the code for that
Mar 30 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.