By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,609 Members | 3,812 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,609 IT Pros & Developers. It's quick & easy.

Send email

P: n/a
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
Share this Question
Share on Google+
9 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
"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

P: n/a
>
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.