SMTP Mail Server Coding - Write A Port Listener And Display The Message In A Text Box?

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


ADVERTISEMENT

Cannot Send Mail Using Gmail Smtp Server

Aug 22, 2010

Here is my code

Dim message As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()
message.To.Add("from textbox field")
message.Subject = "Testing"

[Code].....

View 2 Replies

Ping Server Before Sending Mail With Smtp?

Jan 30, 2010

below is my code

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ProgressBar1.Value = 5
Dim strTo As String = setting.tosett.ToString[code].....

i want the program to ping the server before sending the mail; if server is available then send mail if not then message box with warning appears notifying user to check VPN connection and sending of mail is canceled.

View 39 Replies

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

Send E-mail With Gmail SMTP And System.Net.Mail?

Apr 8, 2011

Sending email in .NET through Gmail

I tried sending e-mail with Gmail SMTP and System.Net.Mail as follows[code]....

View 2 Replies

SMTP Mail.CC And Mail.Bcc Gets Error Property Cc Is ReadOnly?

Mar 30, 2012

I'm teaching myself vb.net and found this VB.NET SMTP codeand I wanted to add a mail.cc and mail.bcc but get an error Property cc is ReadOnly.and don't know how to fix. then I found this code

Dim CC As MailAddress = New MailAddress(TextBox5.Text) 'For some reason it's required field
mail.CC.Add(CC)

[code].....

View 8 Replies

.NET 1.1, System.Web.Mail And Windows 2003 Server Error Message?

Apr 14, 2009

I have a project that up until recently has been working fine. It sends an email message to a user once a file has been successfully uploaded, registered and/or approved to use the website. It is written in VB.NET framework 1.1, running ASP.NET on a Windows 2003 server SE sp2.

First the code
Public Sub EmailAfterRegister(ByVal sEmail As String, ByVal sUser As String)
Try

[code]....

This has worked for over one or two years. Today I realized upon testing I get the following error:The procedure entry point IstrcmpiI could not be located in the dynamic link library MSDART.DLL.Upon some research I found that maybe I needed to install MDAC 2.8, which i downloaded and installed today, however i still get the same error. I have had my communications and network admins check traffic and connectivity to the smtp server and all is working fine. Yet I still get the error.

View 2 Replies

Vb2008 Creating A Port Listener?

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

VS 2008 Server Program Can Receive SMTP Messages From Other SMTP Servers

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

Reading Mail Message Body Text

May 25, 2010

I am trying to learn a little more about reading and writing Outlook mail messages. So I've written a small app to read my mail messages and pull certain lines from the body. When I run the app I get to a certain point and start getting error messages telling me I have a limit on the number of messages I can have open. With that I figured something is not closing properly. All of the examples I've checked out (I've been at this most of the morning) I've not seen one thing where the code is closing the message after it's been read. I've included the code and as you can tell there's not much to it.

[Code]...

View 2 Replies

VS 2008 TCP Listener - Only Responds To 1st Message?

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

IDE :: Sending Mail Via Smtp?

Feb 17, 2009

I want to send an email that contains an attachment via vb.net and smtp. I used gmail as smtp server. This project works correctly when the size of attachment size is lower than 1Mb. When the size of the file is bigger than this size it makes an error. The message is this: "ContextSwitchDeadlock was detectedMessage: The CLR has been unable to transition from COM context 0x652fd8 to COM context 0x653148 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations."I extended the timeout period but this message is shown.

View 3 Replies

Sending E-mail Without Using Smtp?

Jun 19, 2009

I have been searching for the answer to this for quite a while but none answer me exactly. Here is my problem, I want my user to be able to send an e-mail by clicking on a button "Send" and for this e-mailk to take the e-mail address from a text box and the message from a text box (Subject can be hard coded as it will always be the same) but I need to do it without using SMPT protocols as I don't want the user to have to input lots of information regarding their e-mail etc. Is there any way to do this.

View 7 Replies

SMTP E-Mail Sending

May 20, 2011

I Started to create an application in vb.net and the application mainly monitors the drives and when the drive's free space is below a certain percentage it sends an e-mail to recipient chosen.. Now ive done this using the smtp server and unfortunately i'm on a domain so sending emails within the office is permitted but as soon as i try to mail to an external e-mail ex. [URL] it throughs and exception and states the following:

[Code]...

View 2 Replies

Cannot Display Message Box On Dev Server In Asp.net?

Oct 7, 2011

I have a code block that is supposed to display a windows style message box to the user in my asp.net application. The user performs an action on an asp.net page, that page then processes data on another aspx page. The second aspx page is where the message box code is to be displayed.The box is displayed on my local machine, and another developers local machine. But the dev server does not display it. Nothing in the error log either.

[code]...

How can I resolve this issue (need to display the message box when app is migrated to the dev server)

View 4 Replies

Make A Smtp Mail Sender?

Nov 29, 2008

I just started with vb 2008 and I was trying to make an smtp mail sender , and I am allmost sure that I done everything like how it should be but it does really nothing when I clcik on SEND, no errors nothing :S

Here is my code :

Imports System.Net.Mail
Public Class Mail
Private Sub btnSend_Click_1(ByVal sender As System.Object, ByVal e As

[Code]......

View 7 Replies

Send A Mail Via Smtp With 2008?

Jul 25, 2010

I use in vb.net 2008 and outlook 2007 I want to send mail in my work via the work net to other workers by smtp/outlook.

View 11 Replies

Send E-mail Via SMTP In Program?

Oct 14, 2010

I'm running VB.Net 2010. What is the best way to send e-mail via SMTP in this version? Is it still System.NetMail.SmtpClient or is there something built in/more intuitive, or...?

View 3 Replies

Send Smtp Mail From IIS FormatException?

Dec 1, 2009

Well i got a page that sends emails and everything runs fine in the developer web server but when i publish to a IIS Server i get a FormatException when i try to send the mail.... ex.Message = "the specified string is not in the form required for an e-mail address."

the email is in this sample someone@gmail.com

Im using the "SmtpClient" and the "MailMessage" classes to send mails..

And the server runs windows server 2003

Edit: Im using same smtp settings on the Dev Webserver as im doing in IIS.

View 3 Replies

Sending Mail Through Gmail Using SMTP?

Jan 6, 2011

I am trying to send an email through following code

CODE
Dim MyMailMessage As New MailMessage()
'From requires an instance of the MailAddress type
MyMailMessage.From = New MailAddress("a@gmail.com")

[Code]....

NOTE : I have tried SMTPServer.Port = 587 too but still its not working

View 2 Replies

SMTP - Script That Sends Me Mail

Mar 18, 2010

I have a question. i have a script that sends me mail but theres one part that i dont know how to fix.

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim mail As New MailMessage()
Dim SmtpServer As New SmtpClient

[CODE]...

The part highlighted is what im having trouble with.

View 5 Replies

SMTP Receive Mail Sound?

Jul 6, 2009

Could you possibly make a code where you will hear a beep or something when you receive mail?

View 1 Replies

Communications :: How To Send Simple SMTP Mail

May 27, 2009

I'm using the following code to send simple SMTP mail. the code sends successfully on the development PC however, as soon as i move this to another environment (another PC) the message delivery fails..

Observations:
>> Locally I'm using a version of .Net (2.0.50727) (under application properties > references)
>> The remote machines for which this is failing on has various version of .net 1, 2, 3
>> I'm using the VS2005 and publishing with the wizard
>> Used a packet sniffer to monitor the network interface connected to the network and the no traffic is being generated by the source/sending PC.

Imports System.Net
Imports System.Net.Mail

Code:
Public Sub SendEmail(ByVal Email_To As String, _
ByVal Email_CC As String, _
ByVal Email_From As String, _
ByVal Subject As String, _
[Code] .....

View 1 Replies

Sending Email Using In.smtp.mail Is Not Working?

Sep 5, 2009

i am trying to send a mail using yahoo.in smtp server. But it is throwing an error . i am not able to figure it out

View 1 Replies

Sending Mail Failure: SMTP Exception?

Aug 4, 2010

This code throws the exception ("SMTP Exception")

Public Function SendAnEmail(ByVal MsgBody As String)
Try
Dim MsgFrom As String = "amolkadam.a@gmail.com"
Dim MsgTo As String = "amolkadam.a@gmail.com"

[code]....

View 1 Replies

Smtp - Check If Mail Was Successfully Sent With SMTPClient

Jul 13, 2011

I'm trying to create an application that sends an email to an smtp-server. The server is not set fixed, but will be looked up according to the domainpart of the email-address where the email should be sent to.

[Code]...

It would be quite useful, to know if the message was accepted by the mailserver and the message was successfully sent. What I am able so far is, that I can get the SMTP-Server error code (if there was an error (StatusCode 5xx) by using the System.Net.Mail.SMTPClient Object and its SendAsync Function. There, if there was an error, I get an Exception-Object in the Callback-Event of the SMTPClient

I'm well aware that not every mailserver will tell me if the mailaccount truly exists and then reject my mail with an errorcode but instead just accept the message and then delete it. Therefore I would be grateful for another Method to check if the mail was sent (note: not read, that would be the read confirmation)

The final purpose would be: Try to send an email to a recipient using it's domains mailserver and if it fails, proceed according to the errorcode (user does not exist -> abort / mailserver did not respond -> use another mailserver if available).

View 1 Replies

VS 2008 : Smtp Mail Sending Via Proxy?

Mar 4, 2011

i am using this script in my program for sending mail

Dim mail As New MailMessage()
Dim SmtpServer As New SmtpClient
SmtpServer.Credentials = New Net.NetworkCredential("test@gmail.com", "test")
SmtpServer.Port = 587

[code]....

Now what i wanted is to send this mail through a proxy server of

Proxy Address - "192.168.0.254"
Port - "4480"

View 1 Replies

Vb2005 - Get The Message In Sql Server 2005 And Display Them In Vb?

Aug 27, 2007

I am working on vb2005 with sql server 2005. How to get the messages generated by sql and display them in vb?

View 3 Replies

Sending Text Messages Using 2005 With A Mail Server?

Apr 15, 2009

I've been working on this personal project of mine and this has me stumped. I told my friend what i was trying to do and hes going to let me use his mail server that he uses at work. I have already looked on google for a sample application, but the only one i could find is not the one im looking for. Ive never worked with System.Net.Mail before so this is new to me. Im sure it would be something like this:

Imports System.Net.Mail
Dim toPhoneNumber As String = "DestinationPhoneNumber";
Dim login As String =

[code].....

View 2 Replies

Write A Simple Windows Form That Will Make It Easy To Record A Voice Message Before Uploading It To A Remote Web Server?

Oct 2, 2011

I'd like to write a simple Windows form that will make it easy to record a voice message before uploading it to a remote web server and sending the URL to the recipient(s):

[URL]

Currently, the user has to use Sound Record to record the message, use an FTP client to upload it to a web server, and finally, use an e-mail client to send the URL. I'd like to combine those three features into one.

View 14 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved