|
-
May 19th, 2003, 11:59 AM
#1
Thread Starter
Addicted Member
quick email
i have 4 text boxes:
txtname
txtemail
txtbugname
txtbug
and a send button:
cmdsend
i wanna know the code (if anyone knows it) to send the info in these to an email address of my choice instantly, not making anything pop-up or show anything on screen.
all i need is this:
subject: "Bug report"
to: "[email protected]
text in the email: txtname.Text, txtemail.Text, txtbugname.Text, txtbug.Text
i want one as simple as possible that can do all this.
-
May 19th, 2003, 01:42 PM
#2
Sleep mode
-
May 19th, 2003, 03:31 PM
#3
Thread Starter
Addicted Member
what controlls do i need? it says something about Active X
-
May 19th, 2003, 03:41 PM
#4
Sleep mode
Originally posted by lpeek
what controlls do i need? it says something about Active X
Which one , I never run them ?
-
May 19th, 2003, 03:46 PM
#5
Thread Starter
Addicted Member
the second link. it says something like "Active X cant create the object"
-
May 19th, 2003, 03:51 PM
#6
Sleep mode
-
May 19th, 2003, 04:03 PM
#7
Thread Starter
Addicted Member
how do i know if ive got that?
-
May 19th, 2003, 04:17 PM
#8
Sleep mode
I believe it's winsocket control . I'm not sure about it in VB6 but in VB.NET we use SSL to send emails coz it requires identification and such stuff .
-
May 19th, 2003, 04:23 PM
#9
Thread Starter
Addicted Member
so i should just add a winsock control?
-
May 19th, 2003, 04:28 PM
#10
Sleep mode
Originally posted by lpeek
so i should just add a winsock control?
Yes , I guess .
-
May 19th, 2003, 04:29 PM
#11
Thread Starter
Addicted Member
i just done that and it does the same thing. its something to do with this line:
Set Mailer = CreateObject("Geocel.Mailer")
it cant create the object Geocel.Mailer i think
-
May 19th, 2003, 04:39 PM
#12
Sleep mode
Hmm , did you set winsocket name as "Mailer" ??
-
May 19th, 2003, 04:43 PM
#13
Thread Starter
Addicted Member
now it says invalid use of property over the bit that says "Mailer" in the first line of code (the bit in bold in the code below):
Set Mailer = CreateObject("Geocel.Mailer")
here is my full code:
VB Code:
Private Sub cmdsend_Click()
Set Mailer = CreateObject("Geocel.Mailer")
Mailer.AddServer "mail", 25
Mailer.FromAddress = txtemail.Text
Mailer.FromName = txtname.Text
Mailer.Subject = "The JukeBox 2 Bug Report"
Mailer.Body = "Bug Name: " & txtbugname.Text & "" & vbCrLf & _
"Bug Description: " & txtbug.Text & "" & vbCrLf
bSuccess = Mailer.Send()
If bSuccess = False Then
If Mailer.Queued = False Then
MsgBox ("Could not send message. failed to queue!")
Else
MsgBox ("Could not send message. the server is queued!")
End If
Else
MsgBox ("Bug Report Sent Successfully!")
End If
End Sub
-
May 19th, 2003, 04:46 PM
#14
Sleep mode
You should start first with this line of code :
and then
VB Code:
Set Mailer = CreateObject("Geocel.Mailer")
-
May 19th, 2003, 04:51 PM
#15
Thread Starter
Addicted Member
well that bit works, but now it goes through these bits:
VB Code:
Mailer.AddServer "mail", 25
Mailer.FromAddress = txtemail.Text
Mailer.FromName = txtname.Text
Mailer.Subject = "The JukeBox 2 Bug Report"
Mailer.Body = "Bug Name: " & txtbugname.Text & "" & vbCrLf & _
"Bug Description: " & txtbug.Text & "" & vbCrLf
saying that "Method or Data member not found"
-
May 19th, 2003, 04:58 PM
#16
Sleep mode
Yes , right . It seems the code referes to custom control not the one we're working with . anyways , don't worry you still have chance to get it work . Try these links ...http://www.vbcode.com/asp/showsn.asp?theID=619
http://www.vbcode.com/asp/showsn.asp?theID=1794
if didn't help then go here http://www.vbcode.com and search with "smtp" and try other links . I'm dead tired I should to sleeep
-
May 19th, 2003, 05:06 PM
#17
Sleep mode
There is another thread here talks about sending emails in VB .(in case you've not seen it).
-
May 20th, 2003, 06:47 AM
#18
Hyperactive Member
Here's an example that works great using Winsock and your email sever.
Bug Report tool
http://www.planet-source-code.com/vb...44441&lngWId=1
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
|