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

sending mail without smptserver

P: n/a
Hello,

I just want to send an e-mail from my windows form application without
specifying SmtpServer.

On my computer, when i specify my smtpserver, SmtpMail.Send( aMail ) works
fine, but without specifuing SmtpMail.SmtpServer, the message is never
sent.. I tried various things like SmtpMail.SmtpServer = "" or
SmtpMail.SmtpServer = "localhost" or
SmtpMail.SmtpServer.Insert"0,"localhost""), ... the result was the same

Someone know how to do that? or how to know the SmtpServer of the current
user?

thanks in advance,

Pascal
Nov 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Trying to send email without an SMTP server is like trying to send a letter
without a Post Office.

an SMTP Server is a service that runs on a machine. The Server's location is
the IP address of the machine. It listens on TCP Port 25 of that machine.
"localhost" is a Host Name for the local machine, and is recognized as such
by most OS's today. It maps to IP address 127.0.0.1, the local loopback
address for the machine. Using "localhost" will work as long as the machine
on which the code resides has an SMTP Server.

Note: A "current user" has no SMTP server. Only a machine can. IIS comes
with an SMTP Server, which may or may not be installed on the server.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Pascal Cloup" <pa**********@biogesta.fr> wrote in message
news:uM**************@TK2MSFTNGP11.phx.gbl...
Hello,

I just want to send an e-mail from my windows form application without
specifying SmtpServer.

On my computer, when i specify my smtpserver, SmtpMail.Send( aMail ) works
fine, but without specifuing SmtpMail.SmtpServer, the message is never
sent.. I tried various things like SmtpMail.SmtpServer = "" or
SmtpMail.SmtpServer = "localhost" or
SmtpMail.SmtpServer.Insert"0,"localhost""), ... the result was the same

Someone know how to do that? or how to know the SmtpServer of the current
user?

thanks in advance,

Pascal

Nov 18 '05 #2

P: n/a
thanks for your explanations Kevin,

but after verifying, my computer have IIs with smtp services installed. So
the problem is elsewher.
Never mind, as it will not be always the case for the computer of the users
of my applications, is there a way to obtain the smtp server?

thanks in advance,

Pascal

"Kevin Spencer" <ks******@takempis.com> a écrit dans le message de news:
es**************@TK2MSFTNGP14.phx.gbl...
Trying to send email without an SMTP server is like trying to send a
letter
without a Post Office.

an SMTP Server is a service that runs on a machine. The Server's location
is
the IP address of the machine. It listens on TCP Port 25 of that machine.
"localhost" is a Host Name for the local machine, and is recognized as
such
by most OS's today. It maps to IP address 127.0.0.1, the local loopback
address for the machine. Using "localhost" will work as long as the
machine
on which the code resides has an SMTP Server.

Note: A "current user" has no SMTP server. Only a machine can. IIS comes
with an SMTP Server, which may or may not be installed on the server.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Pascal Cloup" <pa**********@biogesta.fr> wrote in message
news:uM**************@TK2MSFTNGP11.phx.gbl...
Hello,

I just want to send an e-mail from my windows form application without
specifying SmtpServer.

On my computer, when i specify my smtpserver, SmtpMail.Send( aMail )
works
fine, but without specifuing SmtpMail.SmtpServer, the message is never
sent.. I tried various things like SmtpMail.SmtpServer = "" or
SmtpMail.SmtpServer = "localhost" or
SmtpMail.SmtpServer.Insert"0,"localhost""), ... the result was the same

Someone know how to do that? or how to know the SmtpServer of the current
user?

thanks in advance,

Pascal


Nov 18 '05 #3

P: n/a
Hi Pascal,

You're still misunderstanding me. There is no SMTP server on the client
machine, any more than there is a Web Server. The SMTP Server is on the web
server, or another server having an SMTP server is used.

Your problem is probably due to the configuration of the SMTP server on your
server. If, for example, you are attempting to send an email in which the
"From" domain is not the same domain as the server's domain, and the server
doesn't allow relaying (most do not, as this is typically used by SPAMMERs),
the email will not be sent.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Pascal Cloup" <pa**********@biogesta.fr> wrote in message
news:u#**************@TK2MSFTNGP09.phx.gbl...
thanks for your explanations Kevin,

but after verifying, my computer have IIs with smtp services installed. So
the problem is elsewher.
Never mind, as it will not be always the case for the computer of the users of my applications, is there a way to obtain the smtp server?

thanks in advance,

Pascal

"Kevin Spencer" <ks******@takempis.com> a écrit dans le message de news:
es**************@TK2MSFTNGP14.phx.gbl...
Trying to send email without an SMTP server is like trying to send a
letter
without a Post Office.

an SMTP Server is a service that runs on a machine. The Server's location is
the IP address of the machine. It listens on TCP Port 25 of that machine. "localhost" is a Host Name for the local machine, and is recognized as
such
by most OS's today. It maps to IP address 127.0.0.1, the local loopback
address for the machine. Using "localhost" will work as long as the
machine
on which the code resides has an SMTP Server.

Note: A "current user" has no SMTP server. Only a machine can. IIS comes
with an SMTP Server, which may or may not be installed on the server.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Pascal Cloup" <pa**********@biogesta.fr> wrote in message
news:uM**************@TK2MSFTNGP11.phx.gbl...
Hello,

I just want to send an e-mail from my windows form application without
specifying SmtpServer.

On my computer, when i specify my smtpserver, SmtpMail.Send( aMail )
works
fine, but without specifuing SmtpMail.SmtpServer, the message is never
sent.. I tried various things like SmtpMail.SmtpServer = "" or
SmtpMail.SmtpServer = "localhost" or
SmtpMail.SmtpServer.Insert"0,"localhost""), ... the result was the same
Someone know how to do that? or how to know the SmtpServer of the current user?

thanks in advance,

Pascal



Nov 18 '05 #4

P: n/a
ok, thanks for explanation (as you undertood, i'm not a web specialist),

So what must i do to allow the users of my software (on their computer) to
send me an e-mail from my application without have to provide their smtp
server name?

Thanks in advance,

Pascal

"Kevin Spencer" <ks******@takempis.com> a écrit dans le message de news:
%2******************@TK2MSFTNGP15.phx.gbl...
Hi Pascal,

You're still misunderstanding me. There is no SMTP server on the client
machine, any more than there is a Web Server. The SMTP Server is on the
web
server, or another server having an SMTP server is used.

Your problem is probably due to the configuration of the SMTP server on
your
server. If, for example, you are attempting to send an email in which the
"From" domain is not the same domain as the server's domain, and the
server
doesn't allow relaying (most do not, as this is typically used by
SPAMMERs),
the email will not be sent.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Pascal Cloup" <pa**********@biogesta.fr> wrote in message
news:u#**************@TK2MSFTNGP09.phx.gbl...
thanks for your explanations Kevin,

but after verifying, my computer have IIs with smtp services installed.
So
the problem is elsewher.
Never mind, as it will not be always the case for the computer of the

users
of my applications, is there a way to obtain the smtp server?

thanks in advance,

Pascal

"Kevin Spencer" <ks******@takempis.com> a écrit dans le message de news:
es**************@TK2MSFTNGP14.phx.gbl...
> Trying to send email without an SMTP server is like trying to send a
> letter
> without a Post Office.
>
> an SMTP Server is a service that runs on a machine. The Server's location > is
> the IP address of the machine. It listens on TCP Port 25 of that machine. > "localhost" is a Host Name for the local machine, and is recognized as
> such
> by most OS's today. It maps to IP address 127.0.0.1, the local loopback
> address for the machine. Using "localhost" will work as long as the
> machine
> on which the code resides has an SMTP Server.
>
> Note: A "current user" has no SMTP server. Only a machine can. IIS
> comes
> with an SMTP Server, which may or may not be installed on the server.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> I get paid good money to
> solve puzzles for a living
>
> "Pascal Cloup" <pa**********@biogesta.fr> wrote in message
> news:uM**************@TK2MSFTNGP11.phx.gbl...
>> Hello,
>>
>> I just want to send an e-mail from my windows form application without
>> specifying SmtpServer.
>>
>> On my computer, when i specify my smtpserver, SmtpMail.Send( aMail )
>> works
>> fine, but without specifuing SmtpMail.SmtpServer, the message is never
>> sent.. I tried various things like SmtpMail.SmtpServer = "" or
>> SmtpMail.SmtpServer = "localhost" or
>> SmtpMail.SmtpServer.Insert"0,"localhost""), ... the result was the same >>
>> Someone know how to do that? or how to know the SmtpServer of the current >> user?
>>
>> thanks in advance,
>>
>> Pascal
>>
>>
>
>



Nov 18 '05 #5

P: n/a
Hi all,

I found a solution.
the Smtp Server can retrieved from the registry under the Key:
HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts

and with a subkey depending on the account that you are looking for.

Pascal

"Pascal Cloup" <pa**********@biogesta.fr> a écrit dans le message de news:
OO*************@TK2MSFTNGP11.phx.gbl...
ok, thanks for explanation (as you undertood, i'm not a web specialist),

So what must i do to allow the users of my software (on their computer) to
send me an e-mail from my application without have to provide their smtp
server name?

Thanks in advance,

Pascal

"Kevin Spencer" <ks******@takempis.com> a écrit dans le message de news:
%2******************@TK2MSFTNGP15.phx.gbl...
Hi Pascal,

You're still misunderstanding me. There is no SMTP server on the client
machine, any more than there is a Web Server. The SMTP Server is on the
web
server, or another server having an SMTP server is used.

Your problem is probably due to the configuration of the SMTP server on
your
server. If, for example, you are attempting to send an email in which the
"From" domain is not the same domain as the server's domain, and the
server
doesn't allow relaying (most do not, as this is typically used by
SPAMMERs),
the email will not be sent.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Pascal Cloup" <pa**********@biogesta.fr> wrote in message
news:u#**************@TK2MSFTNGP09.phx.gbl...
thanks for your explanations Kevin,

but after verifying, my computer have IIs with smtp services installed.
So
the problem is elsewher.
Never mind, as it will not be always the case for the computer of the

users
of my applications, is there a way to obtain the smtp server?

thanks in advance,

Pascal

"Kevin Spencer" <ks******@takempis.com> a écrit dans le message de news:
es**************@TK2MSFTNGP14.phx.gbl...
> Trying to send email without an SMTP server is like trying to send a
> letter
> without a Post Office.
>
> an SMTP Server is a service that runs on a machine. The Server's

location
> is
> the IP address of the machine. It listens on TCP Port 25 of that

machine.
> "localhost" is a Host Name for the local machine, and is recognized as
> such
> by most OS's today. It maps to IP address 127.0.0.1, the local
> loopback
> address for the machine. Using "localhost" will work as long as the
> machine
> on which the code resides has an SMTP Server.
>
> Note: A "current user" has no SMTP server. Only a machine can. IIS
> comes
> with an SMTP Server, which may or may not be installed on the server.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> I get paid good money to
> solve puzzles for a living
>
> "Pascal Cloup" <pa**********@biogesta.fr> wrote in message
> news:uM**************@TK2MSFTNGP11.phx.gbl...
>> Hello,
>>
>> I just want to send an e-mail from my windows form application
>> without
>> specifying SmtpServer.
>>
>> On my computer, when i specify my smtpserver, SmtpMail.Send( aMail )
>> works
>> fine, but without specifuing SmtpMail.SmtpServer, the message is
>> never
>> sent.. I tried various things like SmtpMail.SmtpServer = "" or
>> SmtpMail.SmtpServer = "localhost" or
>> SmtpMail.SmtpServer.Insert"0,"localhost""), ... the result was the

same
>>
>> Someone know how to do that? or how to know the SmtpServer of the

current
>> user?
>>
>> thanks in advance,
>>
>> Pascal
>>
>>
>
>



Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.