473,321 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Send email

I have created a small windows app that gathers some user entered data, then
prints it to a designated printer.
A specific person then collects the prints from the printer and processes
the info contained thereon.
This all happens within an organisation and no external communication is
required whatsoever.
This works quite well, but now I have been asked to have the application
send an email to the nominated person, informing them that there is a
document on the printer to collect.

Well... it all went south from there.

This is what I have done.

Sub MailUser()
Dim obj As System.Web.Mail.SmtpMail
Dim mail As New System.Web.Mail.MailMessage()

With Mail
.To = "no**************@myaddress.com"
.From="yo*@youraddress.com"
.BodyFormat=MailFormat.Text
.Subject="Subject goes here"
.Body="This is the body of the mail"
End With

obj.SmtpServer="myserver"
obj.Send(Mail)
End Sub

No go - it was generating a CDO message error, looking a little deeper, the
inner exception is

"System.Runtime.InteropServices.COMException (0x80040213): The transport
failed to connect to the server."

I thought it may have been an smtp problem, perhaps I had the syntax of the
server wrong? I have tried every potentially viable variant that I can think
of, such as the IP, the UNC path, the smtp name, the server name etc. Same
result with all.

We are using Exchange 2003 and this mail is purely for a LAN application, no
attachments, no fancy formatting, just a small text mail, easy - or so I
thought.

Any thoughts appreciated.

We have VS .Net 2002 with .NET 1.0 SP3

Regards - Peter

Apr 13 '06 #1
9 2432
Peter,

In 80% of the situations is this an SMTP mail server problem.

You can use any SMTP mail server that has access to the outer world an can
be used by the program.

In fact is that mostly any SMTP mail server on earth as long as it is as the
sentence above. It has not to be yours although as you do it to much the
admin from that server will probably put you in his firewall.

I hope this helps a little bit.

Cor

"Peter" <Pe***@discussions.microsoft.com> schreef in bericht
news:B6**********************************@microsof t.com...
I have created a small windows app that gathers some user entered data,
then
prints it to a designated printer.
A specific person then collects the prints from the printer and processes
the info contained thereon.
This all happens within an organisation and no external communication is
required whatsoever.
This works quite well, but now I have been asked to have the application
send an email to the nominated person, informing them that there is a
document on the printer to collect.

Well... it all went south from there.

This is what I have done.

Sub MailUser()
Dim obj As System.Web.Mail.SmtpMail
Dim mail As New System.Web.Mail.MailMessage()

With Mail
.To = "no**************@myaddress.com"
.From="yo*@youraddress.com"
.BodyFormat=MailFormat.Text
.Subject="Subject goes here"
.Body="This is the body of the mail"
End With

obj.SmtpServer="myserver"
obj.Send(Mail)
End Sub

No go - it was generating a CDO message error, looking a little deeper,
the
inner exception is

"System.Runtime.InteropServices.COMException (0x80040213): The transport
failed to connect to the server."

I thought it may have been an smtp problem, perhaps I had the syntax of
the
server wrong? I have tried every potentially viable variant that I can
think
of, such as the IP, the UNC path, the smtp name, the server name etc. Same
result with all.

We are using Exchange 2003 and this mail is purely for a LAN application,
no
attachments, no fancy formatting, just a small text mail, easy - or so I
thought.

Any thoughts appreciated.

We have VS .Net 2002 with .NET 1.0 SP3

Regards - Peter

Apr 13 '06 #2
Thanks Cor,

that certainly confirms the train of thought that I had and I am sure that
your opinion on the matter is worth considerably more than mine. I will keep
trying different things, until I can find something to make a difference -
even a different error would be helpful at this stage.
--
Regards - Peter
"Cor Ligthert [MVP]" wrote:
Peter,

In 80% of the situations is this an SMTP mail server problem.

You can use any SMTP mail server that has access to the outer world an can
be used by the program.

In fact is that mostly any SMTP mail server on earth as long as it is as the
sentence above. It has not to be yours although as you do it to much the
admin from that server will probably put you in his firewall.

I hope this helps a little bit.

Cor

"Peter" <Pe***@discussions.microsoft.com> schreef in bericht
news:B6**********************************@microsof t.com...
I have created a small windows app that gathers some user entered data,
then
prints it to a designated printer.
A specific person then collects the prints from the printer and processes
the info contained thereon.
This all happens within an organisation and no external communication is
required whatsoever.
This works quite well, but now I have been asked to have the application
send an email to the nominated person, informing them that there is a
document on the printer to collect.

Well... it all went south from there.

This is what I have done.

Sub MailUser()
Dim obj As System.Web.Mail.SmtpMail
Dim mail As New System.Web.Mail.MailMessage()

With Mail
.To = "no**************@myaddress.com"
.From="yo*@youraddress.com"
.BodyFormat=MailFormat.Text
.Subject="Subject goes here"
.Body="This is the body of the mail"
End With

obj.SmtpServer="myserver"
obj.Send(Mail)
End Sub

No go - it was generating a CDO message error, looking a little deeper,
the
inner exception is

"System.Runtime.InteropServices.COMException (0x80040213): The transport
failed to connect to the server."

I thought it may have been an smtp problem, perhaps I had the syntax of
the
server wrong? I have tried every potentially viable variant that I can
think
of, such as the IP, the UNC path, the smtp name, the server name etc. Same
result with all.

We are using Exchange 2003 and this mail is purely for a LAN application,
no
attachments, no fancy formatting, just a small text mail, easy - or so I
thought.

Any thoughts appreciated.

We have VS .Net 2002 with .NET 1.0 SP3

Regards - Peter


Apr 13 '06 #3
Peter,

I should have given you this link as well.

http://www.systemnetmail.com/

I hope this helps,

Cor

"Peter" <Pe***@discussions.microsoft.com> schreef in bericht
news:B6**********************************@microsof t.com...
I have created a small windows app that gathers some user entered data,
then
prints it to a designated printer.
A specific person then collects the prints from the printer and processes
the info contained thereon.
This all happens within an organisation and no external communication is
required whatsoever.
This works quite well, but now I have been asked to have the application
send an email to the nominated person, informing them that there is a
document on the printer to collect.

Well... it all went south from there.

This is what I have done.

Sub MailUser()
Dim obj As System.Web.Mail.SmtpMail
Dim mail As New System.Web.Mail.MailMessage()

With Mail
.To = "no**************@myaddress.com"
.From="yo*@youraddress.com"
.BodyFormat=MailFormat.Text
.Subject="Subject goes here"
.Body="This is the body of the mail"
End With

obj.SmtpServer="myserver"
obj.Send(Mail)
End Sub

No go - it was generating a CDO message error, looking a little deeper,
the
inner exception is

"System.Runtime.InteropServices.COMException (0x80040213): The transport
failed to connect to the server."

I thought it may have been an smtp problem, perhaps I had the syntax of
the
server wrong? I have tried every potentially viable variant that I can
think
of, such as the IP, the UNC path, the smtp name, the server name etc. Same
result with all.

We are using Exchange 2003 and this mail is purely for a LAN application,
no
attachments, no fancy formatting, just a small text mail, easy - or so I
thought.

Any thoughts appreciated.

We have VS .Net 2002 with .NET 1.0 SP3

Regards - Peter

Apr 13 '06 #4
Peter wrote:
<snip not connecting to smtp server>
Any thoughts appreciated.


A frequent recommendation for trouble-shooting that problem is to use telnet
to connect to the smtp server:-
http://www.yuki-onna.co.uk/email/smtp.html

Andrew
Apr 13 '06 #5
"Cor Ligthert [MVP]" <no************@planet.nl> schrieb:
I should have given you this link as well.

http://www.systemnetmail.com/


You mean <URL:http://www.systemwebmail.net/>, didn't you?

;-)

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Apr 13 '06 #6
Herfried,
http://www.systemnetmail.com/


You mean <URL:http://www.systemwebmail.net/>, didn't you?

Your thought was the same as me, however he has a new link. But on both is a
link that goes visa versa. 1.x and 2.0

:-)

Cor
Apr 13 '06 #7
"Cor Ligthert [MVP]" <no************@planet.nl> schrieb:
http://www.systemnetmail.com/


You mean <URL:http://www.systemwebmail.net/>, didn't you?

Your thought was the same as me, however he has a new link. But on both is
a link that goes visa versa. 1.x and 2.0

:-)


The right URL seems to be <URL:http://www.systemwebmail.com/> ;-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Apr 13 '06 #8
>
The right URL seems to be <URL:http://www.systemwebmail.com/> ;-).

--


You are right, accoording to the question from Peter I had better given
direct systemwebmail (that link direct in systemnetmail in the header goes
however to systemwebmail and not as is showed system.web.mail)

Cor
Apr 13 '06 #9
I ran into a similar problem using vbscript. I ended up adding the SMTP
service to the OS where the script runs and left out pointing to a different
server. That worked for me in vbscript.

Also, not sure if this pertains, but the exchange server may not have
forwarding turned on.

RK.

"Peter" <Pe***@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com...
I have created a small windows app that gathers some user entered data,
then
prints it to a designated printer.
A specific person then collects the prints from the printer and processes
the info contained thereon.
This all happens within an organisation and no external communication is
required whatsoever.
This works quite well, but now I have been asked to have the application
send an email to the nominated person, informing them that there is a
document on the printer to collect.

Well... it all went south from there.

This is what I have done.

Sub MailUser()
Dim obj As System.Web.Mail.SmtpMail
Dim mail As New System.Web.Mail.MailMessage()

With Mail
.To = "no**************@myaddress.com"
.From="yo*@youraddress.com"
.BodyFormat=MailFormat.Text
.Subject="Subject goes here"
.Body="This is the body of the mail"
End With

obj.SmtpServer="myserver"
obj.Send(Mail)
End Sub

No go - it was generating a CDO message error, looking a little deeper,
the
inner exception is

"System.Runtime.InteropServices.COMException (0x80040213): The transport
failed to connect to the server."

I thought it may have been an smtp problem, perhaps I had the syntax of
the
server wrong? I have tried every potentially viable variant that I can
think
of, such as the IP, the UNC path, the smtp name, the server name etc. Same
result with all.

We are using Exchange 2003 and this mail is purely for a LAN application,
no
attachments, no fancy formatting, just a small text mail, easy - or so I
thought.

Any thoughts appreciated.

We have VS .Net 2002 with .NET 1.0 SP3

Regards - Peter

Apr 13 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Google Mike | last post by:
I've got RH9 Linux with default PHP. Is there a way to send email on Linux to an Exchange Server from PHP and/or other tools when there is *NOT* SMTP access? Has anyone figured out a way to...
40
by: ian | last post by:
Hi, I'm a newbie (oh no I can here you say.... another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the...
0
by: David Burson | last post by:
Hi, I have a VB.NET windows app that needs to automatically send a simple text email when my users run a new version of the app for the first time. I thought this would be simple, but after...
9
by: Bob Jones | last post by:
We have developed a commercial ASP.net application (personal nutrition management and tracking); we want to send smtp email from within it. For our development box, we use WinXP Pro, IIS 5.5,...
3
by: Gerard | last post by:
Hello I have created a windows service to monitor a database, it starts some checks when a timer elapses. The checks send emails depending on their findings. My issue is that when I created a...
14
by: supz | last post by:
Hi, I use the standard code given below to send an email from an ASP.NET web form. The code executes fine but no Email is sent. All emails get queued in the Inetpub mail queue. I'm using my...
8
by: shapper | last post by:
Hello, I am trying to send an email using Asp.Net 2.0. I am getting the following error: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: No such...
9
by: Mahernoz | last post by:
Can i send an email from JavaScript? Is it possible? If yes please the code to send email using javascript...
2
by: Malli mindwave | last post by:
Hi, We are using the yahoowebHostiing service for my company website, In that one screen of the SendComments/FeedBack section is there, I'm basically dot.net develeoper ,but yahoowebhosting not...
5
by: Mike | last post by:
I have a page with a textbox that a user can enter in mutliple email addresses such as: user1@yahoo.com;user2@yahoo.com;user3@gmail.com; and so on, I then have a foreach loop to get all of the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.