|
I want add BCC all ountgoing and incoming emails. How can i do?
I think i have to control SMTP and POP3 port.
NOTE : This will be Server application.
|
|
|
|
|
I have to ask, why the incredibly long name? Couldn't you just shorten it up to "Greeky Creek" and stop wasting my screen space?
If you want a generic implementation that supports all mail applications, you'll have to write an app as a proxy server. The mail application would then log in to your server, which in turn will impersonate the person using his/her credentials, login to the real mail server, download all mail, go through each message and add the appropriate strings to the message, then return the altered mail to the client mail program.
The same goes for sending mail.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
First Pls Look Name ,
Second
I have a proxy server, Norton checking mails is installed on proxy. I donna how can i catch email network packets to alter? What will do use, socket programming, or net.mail namespace, Do u know any sample ? or any artical about this aim.?_
|
|
|
|
|
Just Greeky Creek wrote:
I donna how can i catch email network packets to alter?
You don't!
You have to write your own proxy server, just like Norton. If you check your email application configuration, you'll notice that it's connecting to your own machine using different ports than the normal POP3 and SMTP. The configuration in Norton is setup to connect to your ISP mail server.
You'll be writing something that does exactly the same thing. Except the configuration of your application will be the same as your email application. This will have your application connect to Norton so it can do it's job. The chain will go something like this:
Your email app configuration:
POP3 -> 127.0.0.1 on port 8001
SMTP -> 127.0.0.1 on port 8005
(or whatever ports you pick)
Your mail modification app listens on these two ports for connectios from your email app:
POP3 -> listen to 127.0.0.1 on port 8001
SMTP -> listen to 127.0.0.1 on port 8005
Your mail modification app will talk to your ISP mail server, in this case, your Norton app on:
POP3 -> talks to 127.0.0.1 on port ???? (whatever Norton is listening on)
SMTP -> talks to 127.0.0.1 on port ???? (whatever Norton is listening on)
Norton listens for connections from mail applications, in this case your modification app, on:
POP3 -> listen to 127.0.0.1 on port ???? (whatever it's configured for)
SMTP -> listen to 127.0.0.1 on port ???? (whatever it's configured for)
Finally, Norton will talk to your ISP mail server on:
POP3 -> talks to pop3.comcast.net on port 110 (or whatever server your ISP uses)
SMTP -> talks to smtp.comcast.net on port 25 (or whatever server your ISP uses)
Essentially, your writing a proxy application that must be both an email server (POP3 and SMTP) and an email client application. There are articles all over the web that discuss and demonstrate both applications independent of each other, but it'll be up to you to figure out how to put them together into one automated application. You'll also what to pickup the RFC documentation on how POP3 and SMTP clients and servers work. You'll need them for this project...
You might want to check out this[^] little artcle on CP for ideas behind a POP3 client. This will be just 1/5th of your application.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi guys
Can anyone guide me to a tool that converts vb6 code to vb.net,
it's a an access db application, and I was wondering whether it'll make it slower or not?
Thanks
|
|
|
|
|
This is already built into Visual Studio .NET. All you need to do is open Visual Studio, then click File->Open->Project. Navigate to the .VBP project file you want to convert and click Open. It's that simple...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I know what you mean but will it convert all the different syntax, db connection and all difference between vb6 and .net?
I doubt!
anyway i'll give a try,
thanx
|
|
|
|
|
No converter is going to convert everything properly. You WILL have to do some editing and the conversion tool lets you know this by putting comments into the code and generating a conversion report.
And as far as I know, this is the ONLY product that will convert your VB6 code to VB.NET.
But, IMHO, the best method for code conversion, by far, is to rewrite it yourself...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
when u open a VB6 project file (*.vbp) in DotNet IDE, the migration utility for conversion popps up... just follow the instructions.....
finally it will generate a list of errors or code which it was unable to convert into VB.NET... for that some perticular help is also provided...
by just following those steps u can get ur work done...
all the best....
- thanks and regards,
Basavaraj P.Umadi
|
|
|
|
|
Microsoft(R) guys have already provided you with such a tool in .NET development environment itself. Go to Tools on the menu
Luckyhuss
|
|
|
|
|
i have connected access97 with vb6 ..
now, when i put data control on the form
and when trying to put value
on proprty RecordSourse
vb6 answer me by the messag:
"unorgnizet database format"
what is the solution?
|
|
|
|
|
I suggest you pick a more current ADO reference. Go to Projects menu then click Reference i.e Projects->Reference and when the reference dialog pops up, check the A.D.O 3.6 or most recent ADO reference.
or try this:
option explicit
dim cn as new ADODB.connection
dim rst as new ADODB.recordset
dim sql as string
in the form load event
with cn
.provider="Microsoft.jet.oledb.315"
.cursorlocation=aduseclient
.open
end with
try to read more about ADO
|
|
|
|
|
|
Hy everyone!
I do want to change the columwidth dynamically, meaning depending on the length of the text/string entered.
I had a look in the VBA help but could only find an assignment of fixed values.
What I want to do is something similar to
Cells(lrow,lcolumn).Width=Length(mystring)
But well I guess Excel or VBA respectively is not able to get the length, or does it?
Thanks!
Stephan.
|
|
|
|
|
Rather sad u didn't mention the type of control. Do this by responding to the event that is called anytime the items in the control change. Just loop through all the items in the control and get the maximum width to the lengthiest string.
|
|
|
|
|
I do not use any control.
I do want to calculate using data from one sheet in Excel and printing the results to another sheet. Then I do want to change the cellsize to make it fit to it's contains.
So what I want to do is implement the same function which you get by sizing a column to optimal size in Excel.
And because I do not know which strings or integers will be copied to the sheet (meaning as result) I do want to print the data to the sheet and change the size afterwards.
Thanks.
Stephan.
|
|
|
|
|
I found a solution. To get the optimal size of the cell in Excel via VBA you have to use the .autofit operation
syntax
Columns(index).Autofit
This is the easiest solution!
Stephan.
|
|
|
|
|
hello
i am developing a term project of sending sms in pakistan and aslo world wide i have searched so many webservices.one is tiscali webservices. actually when i send message the notification message appear that message has been sent but i did not receive message please help me give me early reply and please send me links of webservices. thanks. ok bye
|
|
|
|
|
Reply to what? You haven't given us code snippet of how your sending this message and, therefore, nothing to help you with. But, my first 2 questions would be:
Are you using any publicly available SMS server sites to actually send the message?
Does the site work with the mobile service you're using?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi ,
I have a requirement in my application where in a list of
properties are show in the property grid control.
The senario right now is , i use the property grid control
provided in .net to show a set of properties by creating a
class with private members and defining their get set
methods and assigning the object of the class to the
property control's selectedobject thus creating the
property grid, going 1 step further i would like to add
more properties to this control at runtime depending on
certain values fetched from the DB, as i cannot add members
to the class at runtime i am looking at alternative
solution to do so.
Thanks in advance.
|
|
|
|
|
Hi, I used open file dialog control in vb.net. I used the .InitialDirectory property to open the file folder and set to Application.ExecutablePath . I found that when it start the first time it browse at the C:\Program Files... something like that. But my purpose it open the first is the My Document folder. I don't know the code that it write, could any one give me some idea about that???
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Kind of complicated because you have to get the location of the My Documents folder from the shell. The following is the code for a simple form with a single brows button that finds the My Documents folder and opens a file dialog to that folder.
You should break out the shell code into a module so you can reuse it. I just included it in a form so you can cut and paste until you understand how it works. Create a form, add a button - btnBrowse and a FileDialog control, and the add the code as follows:
____________________________________________________________________________________________
'Import the InteropServices Class to enable PInvoke calls
Imports System.Runtime.InteropServices
'Import the Text Class to enable string functions
Imports System.Text
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
(This code was deleted for purpose of this example)
#End Region
'Visual Basic representation of the IMalloc interface.
<InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("00000002-0000-0000-C000-000000000046")> _
Private Interface IMalloc
<PreserveSig()> Function Alloc(ByVal cb As Integer) As IntPtr
<PreserveSig()> Function Realloc(ByVal pv As IntPtr, ByVal cb As Integer) As IntPtr
<PreserveSig()> Sub Free(ByVal pv As IntPtr)
<PreserveSig()> Function GetSize(ByVal pv As IntPtr) As Integer
<PreserveSig()> Function DidAlloc(ByVal pv As IntPtr) As Integer
<PreserveSig()> Sub HeapMinimize()
End Interface
'Function used to allocate memory when needed by the Shell APIs
Private Declare Function SHGetMalloc Lib "shell32" Alias "SHGetMalloc" _
(ByRef ppMalloc As IMalloc) _
As Integer
'Function to retrieve the PPIDL code for a special folder such as the Desktop folder.
Private Declare Function SHGetSpecialFolderLocation Lib "shell32" Alias "SHGetSpecialFolderLocation" _
(ByVal hwndOwner As IntPtr, _
ByVal nFolder As Integer, _
ByRef ppidl As IntPtr) _
As Integer
'Function to retrieve the string path for a folder from an input PPIDL code.
Private Declare Function SHGetPathFromIDList Lib "shell32" Alias "SHGetPathFromIDList" _
(ByVal pidl As IntPtr, _
ByVal Path As StringBuilder) _
As Integer
'Define a constant for Maximum folder path length
Private Const MAX_PATH As Integer = 260
'Define constants for standard IDL's of special folders
Private Const CSIDL_DESKTOP As Integer = &H0 'Desktop
Private Const CSIDL_INTERNET As Integer = &H1 'Internet Explorer Folder
Private Const CSIDL_PROGRAMS As Integer = &H2 'Start Menu\Programs Folder
Private Const CSIDL_CONTROLS As Integer = &H3 'Control Panel
Private Const CSIDL_PERSONAL As Integer = &H5 'MyDocuments
Private Const CSIDL_FAVORITES As Integer = &H6 'Favorites
Private Const CSIDL_STARTUP As Integer = &H7 'Start Menu\Programs\Startup
Private Const CSIDL_STARTMENU As Integer = &HB 'Start Menu
Private Const CSIDL_DRIVES As Integer = &H11 'MyComputer
Private Const CSIDL_WINDOWS As Integer = &H24 'Windows Folder
Private Const CSIDL_SYSTEM As Integer = &H25 'WinSys Folder
Private Const CSIDL_PROGRAM_FILES As Integer = &H26 'C:\Program Files
Private Const CSIDL_MYPICTURES As Integer = &H27 'C:\Program Files\My Pictures
'Helper function that returns the IMalloc interface used by the shell.
Private Function GetSHMalloc() As IMalloc
Dim malloc As IMalloc
SHGetMalloc(malloc)
Return malloc
End Function
'Call this function with one of the above contants to return path string
Private Function GetSpecialFolderPath(ByVal csidlFolder As Integer) As String
'Declare and initialize a variable for the folder pidl
Dim pidlFolder As IntPtr = IntPtr.Zero
'Declare and initialize a variable for the owner handle - can be null in this case
Dim hWndOwner As IntPtr = IntPtr.Zero
'Get the IDL for the specifed Folder.
SHGetSpecialFolderLocation(hWndOwner, csidlFolder, pidlFolder)
'Check to make sure we got a pointer to the folder
If (pidlFolder.Equals(IntPtr.Zero) = True) Then
'Error handling here
End If
Dim sbFolderPath As StringBuilder = New StringBuilder(MAX_PATH)
'Get the string path from the pidl
If (0 = SHGetPathFromIDList(pidlFolder, sbFolderPath)) Then
'Error handling here
End If
'Free memory
Dim malloc As IMalloc = GetSHMalloc()
If (pidlFolder.Equals(IntPtr.Zero) = False) Then
malloc.Free(pidlFolder)
End If
' Convert to a string and return.
Return sbFolderPath.ToString()
End Function
'Click browse button to open to My Documents
Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click
Dim strMyDocsPath As String = GetSpecialFolderPath(CSIDL_PERSONAL)
Me.OpenFileDialog1.InitialDirectory = strMyDocsPath
Me.OpenFileDialog1.ShowDialog()
End Sub
End Class
_____________________________________________________________________________________________
|
|
|
|
|
All that code just to do this?!?!
Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click
Dim strMyDocsPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Personal)
OpenFileDialog1.InitialDirectory = strMyDocsPath
OpenFileDialog1.ShowDialog()
End Sub
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks, did not know about the Environment class. NET 2002 contains no support for the folder browser, so I accustomed to doing everything with the the shell APIs.
Robert
|
|
|
|
|
Thank you very much for your help. Anyway I still keep your valuable idea and code to be analyse and further uses.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|