Quick Search for:  in language:    
ADDED,NEW,ever,want,easy,possibility,contact,
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,011,557. lines
 Jobs: 115. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for Visual Basic.
Click here to see a screenshot of this code!A#vb Undernet suczs
By Xasan on 6/30

(Screen Shot)

CAPS Trigger
By Trevor Burley on 6/30


Auto clip picture
By Kenneth. Jakobsen on 6/30


Click here to see a screenshot of this code!Game of life clone (cool math)
By Johannes B on 6/30

(Screen Shot)

String to CHR()
By Nikhil Raj on 6/30


Encryption Decryption Demo
By Nikhil Raj on 6/30


Click here to see a screenshot of this code!Serial Registration
By Christian (eXonite Team) on 6/30

(Screen Shot)

Click here to see a screenshot of this code!Danger:Can pc kill me? interesting article
By Xasan on 6/30

(Screen Shot)

AniViewer
By Jerrame Hertz on 6/30


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

SendBugReport NEW ROUTINE ADDED

Print
Email
 

Submitted on: 7/6/1999
By: Sebastian 
Level: Not Given
User Rating: By 100 Users
Compatibility:VB 4.0 (32-bit), VB 5.0, VB 6.0

Users have accessed this code 5956 times.
 
 
     Do you ever want to have a easy possibility to get in contact with your users? Here it is! You just have to add the form to your projekt and config it before you compile your projekt! Your users just have to write their comment or bug report in a textbox and hit the send button. You will love this! I ADDED A NEW ROUTINE TO PREVENT TIMEOUTS!!
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

'**************************************
' Name: SendBugReportNEW ROUTINE ADDED
' Description:Do you ever want to have a
'     easy possibility to get in contact with 
'     your users? Here it is! You just have to
'     add the form to your projekt and config 
'     it before you compile your projekt! Your
'     users just have to write their comment o
'     r bug report in a textbox and hit the se
'     nd button. You will love this!
I ADDED A NEW ROUTINE To PREVENT TIMEOUTS!!
' By: Sebastian
'
' Inputs:You must config it (before you 
'     compile it) with your personal data, lik
'     e:
E-Mail Adress 
E-Mail Server
Subjekt Line

...etc. See the code section For more info's ' ' Returns:It send an E-Mail after you hi ' t the Send Button! ' ' Assumes:Just copy the code below and p ' aste it in the notepad! Save it as SendB ' ug.frm and and add it to your projekt... ' ' ' Side Effects:Mail me if you find any! ' 'This code is copyrighted and has' limited warranties.Please see http://w ' ww.Planet-Source-Code.com/vb/scripts/Sho ' wCode.asp?txtCodeId=2359&lngWId;=1'for details.'************************************** 'Save it as SendBug.frm and compile it! '-------------------8< Cut here ----- ' ---------------------------------- VERSION 5.00 Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX" Begin VB.Form Form1 BorderStyle =0 'Kein Caption ="Send Bug Report" ClientHeight=3195 ClientLeft =0 ClientTop=0 ClientWidth =4680 LinkTopic="Form1" MaxButton=0'False MinButton=0'False ScaleHeight =3195 ScaleWidth =4680 StartUpPosition =2 'Bildschirmmitte Begin MSWinsockLib.Winsock Winsock1 Left=120 Top =120 _ExtentX=741 _ExtentY=741 _Version=393216 End Begin VB.CommandButton Exit Caption ="Exit" Height =255 Left=2280 TabIndex=2 Top =2880 Width=2295 End Begin VB.CommandButton Connect Caption ="Send Bug Report" Height =255 Left=120 TabIndex=1 Top =2880 Width=2055 End Begin VB.TextBox Bugreporttxt Height =2655 Left=120 MultiLine=-1 'True TabIndex=0 Top =120 Width=4455 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private bTrans As Boolean Private m_iStage As Integer Private strData As String '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ' !!!!!!!!!!!!!!!!!! 'CHANGE THIS SETTING LIKE YOU NEED IT '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ' !!!!!!!!!!!!!!!!!! Private Const mailserver As String = "your-mail-server.com" Private Const Tobox As String = "youre-mail@adress.com" Private Const Frombox As String = "theuser@ofthisprogram.com" Private Const Subject As String = "Heading of the E-Mail send To you!" '*************************************** ' ************************ 'Routine for connecting to the server '*************************************** ' ************************ Private Sub Connect_Click()
If Winsock1.State <> sckClosed Then Winsock1.Close Winsock1.LocalPort = 0 Winsock1.Protocol = sckTCPProtocol Winsock1.Connect mailserver, "25" bTrans = True m_iStage = 0 strData = "" Call WaitForResponse End Sub
'*************************************** ' ************************ 'Transmit the E-Mail '*************************************** ' ************************ Private Sub Transmit(iStage As Integer)
Dim Helo As String, temp As String Dim pos As Integer Select Case m_iStage Case 1: Helo = Frombox pos = Len(Helo) - InStr(Helo, "@") Helo = Right$(Helo, pos) Winsock1.SendData "HELO " & Helo & vbCrLf strData = "" Call WaitForResponse Case 2: Winsock1.SendData "MAIL FROM: <" & Trim(Frombox) & ">" & vbCrLf Call WaitForResponse Case 3: Winsock1.SendData "RCPT TO: <" & Trim(Tobox) & ">" & vbCrLf Call WaitForResponse Case 4: Winsock1.SendData "DATA" & vbCrLf Call WaitForResponse Case 5: '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ' !!!!!!!!!!!!!!!!!!!!!! 'If you want additional Headers like Dat ' e,Message-Id,...etc. ! 'simply add them below ! '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ' !!!!!!!!!!!!!!!!!!!!!! temp = temp & "From: " & Frombox & vbNewLine temp = temp & "To: " & Tobox & vbNewLine temp = temp & "Subject: " & Subject & vbNewLine 'Header + Message temp = temp & vbCrLf & Bugreporttxt.Text 'Send the Message & close connection Winsock1.SendData temp Winsock1.SendData vbCrLf & "." & vbCrLf m_iStage = 0 bTrans = False Call WaitForResponse End Select
End Sub
'*************************************** ' ************************ 'Routine for Winsock Errors '*************************************** ' ************************ Private Sub Winsock1_Error(ByVal number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
MsgBox "Error:" & Description, vbOKOnly, "Winsock Error!" ' Show error message If Winsock1.State <> sckClosed Then Winsock1.Close End If
End Sub
'*************************************** ' ************************ 'Routine for arraving Data '*************************************** ' ************************ Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim messagesent As String On Error Resume Next Winsock1.GetData strData, vbString '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ' !!!!!!!!!!!!!!!!!!!!!!! '!If you have problems with sending the ' E-Mail, you should ! '!activate the line below and add a Text ' box txtStatus, to ! '!see the Server's response! '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ' !!!!!!!!!!!!!!!!!!!!!!! 'txtStatus.Text = txtStatus.Text & strDa ' ta If bTrans Then m_iStage = m_iStage + 1 Transmit m_iStage Else If Winsock1.State <> sckClosed Then Winsock1.Close messagesent = MsgBox("Bug report sent! Hit Exit To End program.", vbOKOnly, "Bug Report") End If
End Sub
'*************************************** ' *********************** 'NEW! Waits until time out, while waitin ' g for response '*************************************** ' *********************** Sub WaitForResponse()
Dim Start As Long Dim Tmr As Long Start = Timer While Len(strData) = 0 Tmr = Timer - Start DoEvents ' Let System keep checking For incoming response 'Wait 50 seconds for response If Tmr > 50 Then MsgBox "SMTP service error, timed out While waiting For response", 64, "Error!" strData = "" End End If
Wend
End Sub
Private Sub Exit_Click()
On Error Resume Next If Winsock1.State <> sckClosed Then Winsock1.Close End End Sub


Other 11 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
7/6/1999 5:39:00 PM:Sheepy
No matter what I do - the connection 
always times out.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/6/1999 9:40:00 PM:Nick
Very nice code. made a little addition 
to it to the send button so they know 
that something was done. 
Dim 
messagesent As String
    messagesent 
= MsgBox("Bug report sent!, Hit exit to 
end program.", vbOKOnly, "Bug Report")
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/10/1999 4:55:00 PM:Kevino
The code works great.  However, the 
reqirement of knowing the end users 
mail server limits the usefullness (for 
me at least).  Any way to get the users 
mail server automatically??
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/15/1999 8:54:00 PM:vicky
my vb reported my winsock.ocx was 
outdated.
does anybody have the latest 
version ?
please help.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/13/1999 9:58:00 AM:Justin Woodard
Vicky, just goto yahoo and do a search 
for this string. "Dll files beginning 
with G". It seems that the site is 
totally off topic, but im sure you can 
find the ocx there
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/19/1999 9:17:00 AM:Mondor
Ah, come on! This is a useless code 
because of it's interface. I will never 
really put it to any my program. 
Moreover, the e-mailing can be resolved 
more beautiful. I dont mean something 
bad - just I expected more :) Well, 
seems its time to write by own hands 
:)))
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/26/1999 5:28:00 PM:-Q-2
There is a way to get the users Mail 
server, Its in the registry somewhere.  
I dont know where offhand, but its easy 
to find.  just open regedit, go to 
find, and type in your mail server, and 
wherever it is, is the location.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/19/1999 2:29:00 AM:Mike Williams
I am using my yahoo freemail account to 
send the bug report, but it requires 
authentication, how do I do 
that?
Regards
Mike Williams
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/16/2000 7:53:58 PM:Austin
you can use any public SMTP/mail-server 
right? I use mailhost.onramp.net on one 
of my dialup computers... try that. If 
that doesn't work, I guess you must be 
part of the network...
Hope this 
helps-
-Austin [austinlb@home.com]
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.