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
Printable View
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
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.
You need to add the vbSendMail project to your project and create a project group then the vbSendMail will appear in the ref list
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?
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
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
Sorry.
It is not working
upload it, its not difficult
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.
I tried with different options.
Using this small program i want to send a mail to gmail.
I changed like this?
while executing this program it is waiting a few seconds at poSendMail.sendVB 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
But no result
you have given me this address .10.11.1.4 What is this??
Thanks for the reply
You can leave the ip out then it gets the default smtp server I just copied my code that works.
if i take ip out then what may be the the default smtp server
do you have a username & password for www.gmail.com
of course,I have
I cant create a GMail account from South-Africa, try to set the username and password options.
gmail use SSL smtp,
does your component support ssl?
sorry.really i am zero in this program
what is ssl?
thanks
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
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".
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