Home All Groups Group Topic Archive Search About
Author
13 Apr 2006 4:01 AM
Peter
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 = "nominated.per***@myaddress.com"
    .From="***@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

Author
13 Apr 2006 4:29 AM
Cor Ligthert [MVP]
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

Show quoteHide quote
"Peter" <Pe***@discussions.microsoft.com> schreef in bericht
news:B6CC2C8D-C8AE-4939-873D-C451C50D1023@microsoft.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 = "nominated.per***@myaddress.com"
>    .From="***@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
>
Author
13 Apr 2006 4:53 AM
Peter
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


Show quoteHide quote
"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:B6CC2C8D-C8AE-4939-873D-C451C50D1023@microsoft.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 = "nominated.per***@myaddress.com"
> >    .From="***@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
> >
>
>
>
Author
13 Apr 2006 5:08 AM
Cor Ligthert [MVP]
Peter,

I should have given you this link as well.

http://www.systemnetmail.com/

I hope this helps,

Cor

Show quoteHide quote
"Peter" <Pe***@discussions.microsoft.com> schreef in bericht
news:B6CC2C8D-C8AE-4939-873D-C451C50D1023@microsoft.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 = "nominated.per***@myaddress.com"
>    .From="***@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
>
Author
13 Apr 2006 11:47 AM
Herfried K. Wagner [MVP]
"Cor Ligthert [MVP]" <notmyfirstn***@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/>
Author
13 Apr 2006 12:17 PM
Cor Ligthert [MVP]
Herfried,

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
Author
13 Apr 2006 12:45 PM
Herfried K. Wagner [MVP]
"Cor Ligthert [MVP]" <notmyfirstn***@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/>
Author
13 Apr 2006 2:28 PM
Cor Ligthert [MVP]
>
> 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
Author
13 Apr 2006 11:09 AM
Andrew Morton
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
Author
13 Apr 2006 3:19 PM
Rick Kalifa
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.

Show quoteHide quote
"Peter" <Pe***@discussions.microsoft.com> wrote in message
news:B6CC2C8D-C8AE-4939-873D-C451C50D1023@microsoft.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 = "nominated.per***@myaddress.com"
>    .From="***@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
>