|
-
March 17th, 2001, 03:27 PM
#1
send emails
I am doing a VB application and is linking to MS Access 97.
this program allow the user to enter their details and email address.
how do i extract the email address from the database and automatically send a confirmation email to the user in VB....
please help!!!
any help is greatly appreciate...
thanks
-
March 17th, 2001, 06:39 PM
#2
Re: send emails
Try this. call Mapisession from VB. To get to mapisession use Project|Component and then checkoff Miscrosoft MAPI Component. Then type Mapisession1.
Try to link them together.
Good Luck
-
March 18th, 2001, 01:02 AM
#3
Re: send emails
This pretty much depends on what type email system do you have. But if you have MS Outlook installed and configured to send email on the machine, you can just link to Outlook ActiveX Object to send the email for you.
In your VB program, goto PROJECT->REFERENCES. Then choose Microsoft Outlook x.x Object Library. Hit OK once done.
Use the code below as a sample:
function SendOutlookMail(szTo as string, szContent as string) as boolean
Dim oOutlook as Outlook.Application ' outlook object
Dim oMail as Outlook.MailItem ' mail item object
' trap err
on error GoTo trap_err
set oOutlook = new Outlook.Application ' create outlook
set oMail = oOutlook.CreateItem(olMailItem) ' create mail item
' prepare to send email
oMail.to = szTo
oMail.Subject = "Auto-generated Email"
oMail.Body = szContent
oMail.Send
' close objects
Call oMail.Close(olDiscard)
oOutlook.Quit
SendOutlookEmail = true
Exit Function
trap_err:
' process error
SendOutlookEmail = false
end function
-Cool Bizs
Good Luck,
-Cool Bizs
-
March 19th, 2001, 12:09 AM
#4
Re: send emails
if you want to use winsock, can try
http://vblib.virtualave.net
-
March 22nd, 2001, 04:54 AM
#5
Re: send emails
If you still need help on this, you can download the jmail.dll from internet. It is a free app and allows you to send mail without starting or using a mail session (You dont need mail istalled on that PC)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|