How can i send an email from vb6.for example my driver’s license will be expired in a month. I want my vb6 to send an email to notify me about the expiration. Anyone can help me? Thanks in advance.

I used an oldie for that: aspmail.ocx. That was the standard, sort of, when I implemented it. I see when I google that it's still around:

Click Here

The software I bult it in is an vb6 dll. I still use it in older installations.

thanks for help man.i will now try this and post again if i have problem with this again.thanks

i got too many errors..huhu how can i do this? pls help me anyone??

Dim olapp As New Outlook.Application
Dim olMail As Outlook.MailItem
''Create a new mail object form the
''Outlook98 Application object
Set olMail = olapp.CreateItem(olMailItem)
''Set the mail fields of the olMail object
olMail.Subject = (your subject here)
olMail.To = "set the email you want to send for"

''olMail.Body = <the mail body does in here>
olMail.Attachments.Add ()

''Tell Outlook to send this message
olMail.Send
''Be kind to your environment and clean
''up your unused objects
'Set olMail = Nothing
'Set olapp = Nothing
''--end code block

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.