|
-
Mar 23rd, 2002, 06:03 PM
#1
Thread Starter
Frenzied Member
How can you send an email with VB?
-
Mar 23rd, 2002, 06:16 PM
#2
Use winsock control. Do a search on this forum, you should be able to find plenty of examples. if you cant then just PM me, i think i have one in my code library.
Danial
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Mar 23rd, 2002, 08:14 PM
#3
PowerPoster
Are there any other ways without using Winsock?
-
Mar 23rd, 2002, 08:19 PM
#4
You could use the Outlook Object in VB to send emails through VB.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Mar 23rd, 2002, 08:29 PM
#5
PowerPoster
Do u know of any examples using Outlook???
-
Mar 23rd, 2002, 08:37 PM
#6
Add a refeerence to the Outlook object library.
Place a button and name it cmdSend
VB Code:
Private Sub cmdSend_Click()
Dim objOutlook As New Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
' Create new message
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
.Subject = "Subjet here"
.Body = "Hello Danial, this is just a test msg"
.Importance = olImportanceHigh
.Send
End With
Set objOutlookMsg = Nothing
' Close Outlook instance: Important!
Set objOutlook = Nothing
End Sub
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Mar 23rd, 2002, 09:07 PM
#7
PowerPoster
That code seems to work, but the emails ain't arriving in my inbox
-
Mar 23rd, 2002, 09:12 PM
#8
check to see if your outlook is setup properly and set it so that when ever there is a new item in the outbox it should send it. I think if u look at your outbox you will see they are probably qued up there.
BTW : what Outlook version are you using, if you are using XP then it will warn user of possible virus program trying to access their mail and will ask whether to allow access to outlook.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Mar 23rd, 2002, 09:19 PM
#9
PowerPoster
Yeah, they were just sitting there. What exactly do I change?
I'm using Outlook 97
-
Mar 23rd, 2002, 09:25 PM
#10
Hi,
I am not sure i how set that in outlook 97, but it should be pretty similar. Go to email option and choose mail setup, there should be a check box, "Send Immediately when connected", check that and press ok. Now the email will be send as soo as you click the send button.
Hope this helps.
Danial
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Mar 23rd, 2002, 09:39 PM
#11
PowerPoster
Nah, I'm going to have to set up Outlook Express, it doesn't have "Transport Provider". A waste of time. I'll just have to find another way of sending out an email.
-
Mar 23rd, 2002, 10:26 PM
#12
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
|