SMTP Listener Corrupting HTML?
Jan 30, 2009
I have an SMTP listener that accepts incoming connections and routes the message to a folder using FileStream. I have to add x-sender: email@address.com and x-receiver: email@address.com to the first two lines of the file so it can be put in a pickup folder for relay later. It seems as though this way of handling the incoming stream is corrupting the HTML in the email message body. Does anyone have a clue what I am doing wrong or a suggestion that would point me in the right direction regarding what I am missing?
View 7 Replies
ADVERTISEMENT
Jan 31, 2012
I am looking to make a SMTP (Port 25) listener to listen in and accept incoming mail, look at the message source, make changes if needed, and retransmit the message out another port. This iwll make it act like a sort-of intermediary service.how one would write a port listener in VB.net, that could listen in on the port, and display the message in a text box (the whole source, headers and all, since that's what the mail comes in as anyway).
View 3 Replies
Dec 3, 2010
I need to fix this email I am trying to send by using smtp. I don't know how to set the email as htmlbody as there is no option. When I make emails automated through Outlook I always set bodytype to html so I could configure the formating of the email bits and pieces, but now I don't know how.[code]
View 4 Replies
Aug 14, 2009
I'm using the TcpClient and TcpListener classes to read/write to the network when a request comes in on port 25. All I'm trying to do at the moment is make it so that my server program can receive SMTP messages from other SMTP servers. I've tested in Telnet - if I connect to my own IP on port 25 and type EHLO, MAIL FROM, RCPT TO, DATA etc then all works as it should and the details I entered are logged by the program (it doesnt do anything about delivering these details/email yet).all looks good... but then when I try and just send an email to my domain from my work account I can see that a connection is made to my program and the string "EHLO workdomain.com " is received by my program - my program responds to the remote SMTP server with "250-mydomain.com Hello" and then a CrLF and then "250-OK". After that point however, my app does not receive anything further at all from the server at work. I'm guessing I am doing something wrong with the data I'm returning when it sends EHLO but can anyone point me in the correct direction?
I was using telnet to test with, it seems that I have made it work only with telnet.In telnet each time I type a key the data is passed to the server, however with a real SMTP server it just sends each entire command in one go. So after altering my server a little I can now get it to respond with the 250-OK which I thought it already was doing.. but it still doesnt work. The remote server just sends EHLO and then thats it nothing more.Something interesting, at the moment I am ending all of my responses to the remote server with VbLf - if I change this to VbCrLf (which is what I believe it is meant to be according to the SMTP standard) then I get an infinite amount of empty strings sent to my program (or perhaps some other character that just shows as an empty string in intellisense when stepping through the code). Changing it back to just vbLf or ControlChars.Lf makes it go back to just sending EHLO and then nothing else..
View 4 Replies
Mar 5, 2009
I am having problems with the VS2008 (Professional Edition) hanging and corrupting files on my SBS2008 (64-bit) server. Once it hangs, attempting to delete, copy or rename the files on the server causes Windows Explorer on the server to hang and rebooting the server is the only way to regain access to the files. On my client machine, I'm running Vista Ultimate and VS2008 SP1, .NET 3.5 SP1. Constantly needing to reboot the server has become quite unpopular with other users I've moved my projects directory over to a secondary (32-bit) 2008 server to see if that helps things. My next guess (or maybe my first guess) is Symantec End Point Protection running on the server may be causing this...looking for other possibilities? I've seen other threads of VS2008 SP1 hanging but no real resolution.
View 4 Replies
Aug 22, 2010
So I've just started up my most recent website:[URL]and it would seem that every 5th or 6th time I publish my project out of VS 2005 the Web.Config file corrupts and loses its connection string to the database and a nasty exception gets thrown stating that the web.config file does not contain the connection string that all of my SQLDataSource objects use.
View 1 Replies
Nov 30, 2011
I'm coding an application, it gets you some info and then saves in a .txt file like every 10 seconds on a timer. Testing the app, everything goes okay, on "accidental" application exit it goes well doesn't "corrupt" the file that I'm saving. But on "accidental" system restart the file just turns blank. 0kb, nothing in it. I don't get it. Here's my code about the file I'm talking about, it's a simple streamwrite function.
[Code]...
View 20 Replies
Jun 8, 2012
I'm having a silly problem. Upon loading a form, I'm trying to change the value of a NumericUpDown. The form is being declared as following as a class-level private variable:
[Code]....
View 8 Replies
Nov 14, 2011
I'm writing an add on to an existing program through an API, but the event I need doesn't exist. How do i go about creating my own event in VB.
I'm writing a plug-in for a program called promis-e that works in conjunction with Microstation CAD platform to generate electrical drawings.I need to call a function I wrote when a new symbol is added to the active drawing, but that event isn't available in promise, so I was wondering if I could write my own event in Microstation that calls that function ?
View 1 Replies
Nov 1, 2009
How to add winsock listener in Vb 2008
View 1 Replies
Jan 16, 2010
I'm having a hard time getting the fundamentals down about these TCP Socket classes.
When you use TcpClient, you can set the IP Address or domain name to connect to the server end of the socket. I see examples that use "localhost" as the first parameter for TcpClient. Is this just a broadcast over the network to find the server that has a TcpListener listening on the dictated port of the second parameter of the TcpClient declaration? With any IP address for TcpClient (I realize that's an option, though), how does "localhost" find the TcpListener server?
View 8 Replies
Jan 4, 2010
create a http listener using vb .net.
View 1 Replies
Jan 22, 2012
When I stop my TCP Listener by the Stop command, I always get an error because I use BeginAcceptTcpClient to accept the clients. How can I stop a listener properly?
View 1 Replies
Dec 2, 2009
(Using vb 2008 express.)
I am trying to create a server to send clients text on request. I am using a tcp listener to accept clients then send each client to a thread in a threadpool which deals with each client's request then closes the client connection. It seems to work fine but I would like to know how it works. Using the listen loop below I cant help feeling I should be sending some values to the threaded sub. How does it know which client each thread is dealing with?
Sub ListenLoop()
Looop:
Client = Server.AcceptTcpClient
[Code].....
View 1 Replies
Apr 27, 2009
is there a way to use my tcpclient and listener to use a no-ip host because i am on a laptop
View 5 Replies
Jan 10, 2012
This may sound really stupid but I have to ask cause I'm not finding this answer anywhere.I have an application where the user will need to sign up for a new user account on the website [URL]..However when I am using Firefox's plug-in Firebug to view html I am getting something totally different than when I just right click on the site and view the page source.
What I am trying to do is to get the captcha from the website and display it in a picturebox on the application so the user can view the captcha, solve the captcha and then the app post is back to the service for a response.
Here is the source that I am getting using Firefox's Firebug to inspect the element:
<td>
<input type="hidden" value="Oo3Jo1I8bgzK68agMqo3s79ZZib2OkbK" name="iden">
<img class="capimage" src="/captcha/Oo3Jo1I8bgzK68agMqo3s79ZZib2OkbK.png" alt="i wonder if these things even work">
</td>
[Code]...
Why would the two be showing me two different versions of the HTML?
And how would you be able to grab that source to view in a picturebox using webclient?
View 2 Replies
Dec 16, 2010
I am trying to write a program that has a server/listener program and then 2 client programs, the 2 client programs are supposed to be able to chat with each other. Can anyone point me in the right direction on this?
View 4 Replies
Aug 23, 2011
I'm another newbie with VB (2010) so please bear with me. I am attempting to make a method that is event driven by data threads on the Ethernet port. Simply put, the method is to wait until a data thread from a "Control By Web" 5-input device sends an "information update" data packet to the application, with the application then processing the information. This application is on a private, well controlled network, with no access to the internet. I have a method that is working right now reading data packets when invoked with a timer (see code below) but I really need it to be event driven.
' this is added at the top of the class
Dim tcplistener As New TcpListener(IPAddress.Any, ip_port)
'this is added in the "form1_load" module
[code]....
View 1 Replies
May 1, 2012
I am trying to build a small window component, which has two buttons.
When I click on the Start button, my code needs to establish the connection to server and keep checking the status (this is infinite loop, I have a boolean global variable which is set to true and based on this loop will work).
When I click on stop button, it should stop checking (I will make global variable to false).
I have code to check my server status.
However, since it is kind of infinite loop, moment i click on start, window form is not taking any other actions, since the control not coming out of event listener of start button.
I have many scenarios like this kind of infinite loops.
How to resolve this, what kind of approch should i follow in vb.
View 8 Replies
Jul 7, 2011
I intend to write a .NET application that does logging and analytics to data using VS 2010. I want to link my application with an external non .NET application via intranet. This external application provides integration through URL triggers. When an event occurs it can send this event parameters to any application via HTTP/HTTPS POST or GET requests. It allows me to select the event parameters to be included in the HTTP request that will be sent as URL parameters. URL parameters consist of a name and a value, and are separated from the URL with a question mark (?).
So an example request can look like this: [URL] any dynamic elements in the URL are displayed in brackets (<>), and are replaced by the corresponding event used at run time.
Now what design method should I follow to create a component in my application to listen to the URL request and parse it's elements. Knowing that I want to protect my URL listener with a username and password.
View 1 Replies
Oct 9, 2009
I am using vb2008. I am creating a port listener. When I test the listener I get an exception in the code as shown below.I send one record through ("Hello") . When it tries to read again I get the error. This read would result in EOF. When this happens, shouldn't i go to 0? Instead it keeps its previous value of 5 which is the number of characters in "Hello"
m_blnStop = False
Dim server As TcpListener
server = Nothing
Try
[code]....
View 1 Replies
Apr 8, 2009
OK this is my third thread on TCP problems and the first two I managed to figure out for myself within 10 mins of posting before anyone had a chance to reply so lets see if it works again - failing that if you have any advice I'd be most grateful.
I have a server app which should be sitting and listening for messages on one port (4000) and then processing requests and sending data back via another TCP client on a different port (4001). My code is based on someone else's example and it works fine sending and receiving the first message, however after the first message the listener seems to stop listening and never gets any further messages.
Am I misunderstanding how they work? After I get the first message do I need to close the listener and create a new one, or should the same listener keep working until I close it?
[Code]...
View 7 Replies
Dec 23, 2011
I create a small program witch is a tcp client.I sent a asqii string to a tcp device over ethernet thads acts like a server.As soon as the device recieves the input string it will respond back with response data. The problem is i am not getting any response data back from the divice. The lenght of the string is max. 30 characters.When a use WireShark i see the reponse, but VB read nothing.I have read many threads with explenations about server/client connections but no example of a client with a tcp listener built in.I think thad the stream read is to late after the send instruction.
View 2 Replies
Jun 20, 2009
Usage: Users create pretty HTML news letters in another app. They post the newsletter to the web, but they also want to set the contents of the HTML news letter file as the body of an email and send it using Application In Question. The users understand to use absolute link and image references when sending an E Newsletter. Environment:
AIQ is a VB.Net app deployed via ClickOnce. It is an intranet app; one can be sure MS Office 2003 and the interop 11 dlls are on the target machines.
Restrictions: MAPI is out. It mangles the HTML. Since it is a ClickOnce deployment, we can't register dlls (I think, correct me if I am wrong). Therefore CDO and COM is out (again, I may be wrong.... I would be happy to be proven so).
View 1 Replies
Jan 30, 2009
I am totally new to socket connections, so I've pieced together code from the internet to try and start a TCP Listener object. [code] Is it possible to create a TCP listener that does not need a specific number of connections initialized? Can I just have it listen on an open port until data is received? I will be receiving a lot of data at once from many servers...
View 1 Replies
Sep 30, 2009
I'm wondering if it's possible to create a listener type application that would monitor webaddresses that the user attempts to go to. And can then either block or redirect the browser to another website. Purpose: I know this seems to sound a little weird but what I'm attempting to do is a NetNanny type application that can run on the user's PC and the allow, prevent, rewrite (would look for particular keywords and rewrite them "words I wouldn't want my 7yr old seeing or reading), or redirect to other webpages. I would also like to be able to handle both IE and Firefox browser with this one application.
[Code]...
View 6 Replies
Jan 22, 2010
but is there some way to create a program that would be able to listen to internet radio and possibly display live artist/song info from several stations on a windows form? Has anybody done anything like this or have any ideas as to how to tackle this?
View 1 Replies
Dec 9, 2009
Im trying to make a basic client and listener chat room but im having problems with method invoker.
Error: Error1Method 'Private Sub CliInfo(CliMess As String)' does not have a signature compatible with delegate 'Delegate Sub MethodInvoker()'
Imports System.Net.Sockets
Imports System.Threading
Imports System.Text[code]......
View 5 Replies
Mar 19, 2012
i have a task to create a TCP Server (a program that is listening on its network card interfaces for incoming data stream).I have search on the internet and i found that i can use two methods : Socket or TCPListener class.I have created an example for Socket class, but i wondering how could i test it? I need to check that if another computer in the network send some string data to the listener computer , then this message should be displayed.Here is the example from microsoft that i am using for TCP Server using Socket:
Public Shared Sub Main()
' Data buffer for incoming data.
Dim data = nothingc[code]....
But it does not work because of the PORT setting.If in the TCP Server i have "Dim localEndPoint As New IPEndPoint(ipAddress, 0)" the client crashes, but if i change the port from any (0) to 11000 for example,the client works fine.Do you know why?
Later edit2:Maybe i should have started with this question:Which method is recommended for my scope?asynchronous or synchronous method ?
View 2 Replies
Jul 27, 2011
Need a bit of help with HTML Agility Pack!Basically I want to grab plain-text withing the body node of the HTML. So far I have tried this in vb.net and it fails to return the innertext meaning no change is seen, well atleast from what I can see.
Dim htmldoc As HtmlDocument = New HtmlDocument
htmldoc.LoadHtml(html)
Dim paragraph As HtmlNodeCollection = htmldoc.DocumentNode.SelectNodes("//body")
[code]....
I have tried this:
Return htmldoc.DocumentNode.InnerText
But still no luck!
View 1 Replies