-
Sep 28th, 2006, 07:51 AM
#1
Thread Starter
Hyperactive Member
SMTP sendmail for vb6.0
I am trying the sendmail program in vb6.
which is in freevbcode.com
Fo that i am trying to include the "SMTP sendmail for vb6.0 reference."But
I can't find the reference "SMTP sendmail for vb6.0" in project reference
What's the problem
-
Sep 28th, 2006, 07:55 AM
#2
Frenzied Member
Re: SMTP sendmail for vb6.0
I think you are supposed to put the .dll in your system32 folder then go to references and browse to it... not sure tho, it's been a while.
-
Sep 28th, 2006, 08:04 AM
#3
Member
Re: SMTP sendmail for vb6.0
You need to add the vbSendMail project to your project and create a project group then the vbSendMail will appear in the ref list
-
Sep 28th, 2006, 08:05 AM
#4
Thread Starter
Hyperactive Member
Re: SMTP sendmail for vb6.0
already there is file sendmail.dll in system32.
So try to add that file in reference(browse..)
But i can't add the dll.
error:
Can't add a reference to the specified file?
-
Sep 28th, 2006, 08:43 AM
#5
Thread Starter
Hyperactive Member
Re: SMTP sendmail for vb6.0
I copied the sendmail.dll in local folder (not in System32)
and i added as a reference in my project.
Now it is fine.
I am really new for this sendmail thing
Can you please tell me is this alright?
I tried like this...No result..nothing
Any changes,Please Explain me..
VB Code:
Private WithEvents poSendMail As vbSendMail.clsSendMail
Private Sub Command1_Click()
'Module Level Declaration (WithEvents optional but recommended)
'poSendMail.SMTPHost = "gmail.com"
poSendMail.SMTPHost = "gmail.com"
poSendMail.From = "some@gmail.com"
poSendMail.FromDisplayName = "some"
poSendMail.Recipient = "some1@gmail.com"
poSendMail.RecipientDisplayName = "xx"
poSendMail.Subject = "xy"
poSendMail.Message = "thisMailMessage"
poSendMail.Send
End Sub
Private Sub Form_Load()
' initialize the component
Set poSendMail = New clsSendMail
End Sub
-
Sep 28th, 2006, 08:51 AM
#6
Member
Re: SMTP sendmail for vb6.0
VB Code:
Private Sub cmdSend_Click()
On Error GoTo ErrorHdl
lstStatus.Clear
Me.MousePointer = vbHourglass
'MsgBox poSendMail.GetIPAddress("internet.greenafrica.co.za")
poSendMail.SMTPHost = poSendMail.MXQuery("10.11.1.4")
'poSendMail.r
poSendMail.From = Replace(Trim(txtFrom), vbCrLf, "")
poSendMail.CcRecipient = Replace(Trim(txtCc), vbCrLf, "")
poSendMail.Recipient = Replace(Trim(txtTo.Text), vbCrLf, "")
poSendMail.RecipientDisplayName = Trim(txtTo.Text)
poSendMail.ReplyToAddress = Trim(txtFrom)
poSendMail.Subject = Trim(txtSubject.Text)
'poSendMail.Attachment = txtFileName.Text 'attached file name
poSendMail.Message = txtBody.Text
poSendMail.Send
Set poSendMail = Nothing
Me.MousePointer = vbNormal
If boolMail = True Then
Unload Me
Else
'Reset Mail class
Set poSendMail = New clsSendMail
End If
Exit Sub
ErrorHdl:
MsgBox Err.Description
End Sub
-
Sep 28th, 2006, 09:11 AM
#7
Thread Starter
Hyperactive Member
Re: SMTP sendmail for vb6.0
-
Sep 28th, 2006, 09:14 AM
#8
Member
Re: SMTP sendmail for vb6.0
upload it, its not difficult
-
Sep 28th, 2006, 09:23 AM
#9
Re: SMTP sendmail for vb6.0
poSendMail.SMTPHost = poSendMail.MXQuery("10.11.1.4") will only work if you're on a LAN and have an SMTP host at 10.11.1.4. You may be the only one in the entire world with an SMTP host at that address.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Sep 28th, 2006, 09:26 AM
#10
Thread Starter
Hyperactive Member
Re: SMTP sendmail for vb6.0
I tried with different options.
Using this small program i want to send a mail to gmail.
I changed like this?
VB Code:
On Error GoTo ErrorHdl
Private Sub cmdSend_Click()
Me.MousePointer = vbHourglass
MsgBox poSendMail.GetIPAddress("www.gmail.com")
Dim s As String
s = poSendMail.GetIPAddress("www.gmail.com")
poSendMail.SMTPHost = Trim(s)
poSendMail.From = Replace(Trim(txtFrom), vbCrLf, "")
poSendMail.Recipient = Replace(Trim(txtTo.Text), vbCrLf, "")
poSendMail.RecipientDisplayName = Trim(txtTo.Text)
poSendMail.ReplyToAddress = Trim(txtFrom)
poSendMail.Subject = Trim(txtSubject.Text)
poSendMail.Send
Set poSendMail = Nothing
Me.MousePointer = vbNormal
If boolMail = True Then
Unload Me
Else
'Reset Mail class
Set poSendMail = New clsSendMail
End If
Exit Sub
ErrorHdl:
MsgBox Err.Description '
End Sub
while executing this program it is waiting a few seconds at poSendMail.send
But no result
you have given me this address .10.11.1.4 What is this??
Thanks for the reply
-
Sep 28th, 2006, 09:27 AM
#11
Member
Re: SMTP sendmail for vb6.0
You can leave the ip out then it gets the default smtp server I just copied my code that works.
-
Sep 28th, 2006, 09:35 AM
#12
Thread Starter
Hyperactive Member
Re: SMTP sendmail for vb6.0
if i take ip out then what may be the the default smtp server
-
Sep 28th, 2006, 09:48 AM
#13
Member
Re: SMTP sendmail for vb6.0
do you have a username & password for www.gmail.com
-
Sep 28th, 2006, 09:52 AM
#14
Thread Starter
Hyperactive Member
Re: SMTP sendmail for vb6.0
-
Sep 28th, 2006, 10:05 AM
#15
Member
Re: SMTP sendmail for vb6.0
I cant create a GMail account from South-Africa, try to set the username and password options.
-
Jan 26th, 2007, 11:07 PM
#16
Addicted Member
Re: SMTP sendmail for vb6.0
gmail use SSL smtp,
does your component support ssl?
-
Jan 27th, 2007, 10:37 AM
#17
Thread Starter
Hyperactive Member
Re: SMTP sendmail for vb6.0
sorry.really i am zero in this program
what is ssl?
thanks
-
Jan 27th, 2007, 11:05 AM
#18
Re: SMTP sendmail for vb6.0
SSL is a strong encryption system used to send data across the internet. You will have to encrypt your data before sending, and decrypt upon receiving according to the SSL specification
http://www.webopedia.com/TERM/S/SSL.html
-
Oct 14th, 2009, 07:57 AM
#19
New Member
Re: SMTP sendmail for vb6.0
Green Africa : Can u help me regarding your VB Send Dll? Winsock .connect method always returns sckError constant(9). I have provide gmail username along with passowrd and also use the GetIPAddress method and pass "www.gmail.com".
-
Oct 14th, 2009, 10:20 AM
#20
Re: SMTP sendmail for vb6.0
I use googles smtp server in my vb program
Requirements:
smtp.server = smtp.gmail.com
Requires authenication = Yes
Requires SSL = yes
Port # = 25
Username = yes
Password = yes
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders
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
|