469,647 Members | 1,787 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,647 developers. It's quick & easy.

Send email while knowing nothing

I want to send a bug report automatically from my VB.NET program. I won't
know the end user's smtp server or what email client they are using.

The Process.Start with mailto is almost what I need, but the amount of
information that will fit in the body is too small for a stack dump and other
information.

I like the way that it would go into the outbox, but oh well, have to move on.

My next choice is Indy or System.Web.Mail, but I don't know their SMTP server.

Can I get it from the registry or some other method? How do programs that
allow me to register for support from email do it? Do they access their own
SMTP servers?
Nov 21 '05 #1
10 1388
John,

If this is about a user using your program on his computer than this is in
my opinion a kind of hacking if the user is not attended first and has the
right to deny that message.

If it is about a webapplication working on your server, than you can sent it
from that server.

I hope this helps,

Cor
Nov 21 '05 #2
Hello John
I was in a simular situation as you are right now ( only with a VB6
project ) i wanted to send some reports to our product manageres when the
items in our catalogue were wrong.

first i shelled out to the local installed e-mail client , then i used the
freevbcode`s vbsendmail.dll they worked both but as always both with there
flaws
( not working with outloook , Domino , sealed networks etc etc etc )

then i found the perfect solution : :-)

i wrote a webservice ( and webpage as a wrapper for my vb6 prog ) that
performs the sending of the e-mail , so i post ther required values to my
webservice the webservice creates a nice HTML formatted e-mail and sends it
from the webserver to the endpoint .

with this method the end user does not even need to have an e-mail account
to send mails to our product management
if you want more info feel free to ask
regards

Michel Posseth
"John Davies" <Jo********@discussions.microsoft.com> schreef in bericht
news:1C**********************************@microsof t.com...
I want to send a bug report automatically from my VB.NET program. I won't
know the end user's smtp server or what email client they are using.

The Process.Start with mailto is almost what I need, but the amount of
information that will fit in the body is too small for a stack dump and
other
information.

I like the way that it would go into the outbox, but oh well, have to move
on.

My next choice is Indy or System.Web.Mail, but I don't know their SMTP
server.

Can I get it from the registry or some other method? How do programs that
allow me to register for support from email do it? Do they access their
own
SMTP servers?

Nov 21 '05 #3
Michael,

With one disadvantage, the user should not be behind a firewall and be on
line.

In my opinion is needed a privaty statement as well, I am not sure if this
what you do is allowed by all laws (if it is not explicitly known by the
user).

What is in your case of course not the situation because it is a kind of
internal application.

Cor
Nov 21 '05 #4
> My next choice is Indy or System.Web.Mail, but I don't know their SMTP
server.

I have had success with this:

System.Web.Mail.SmtpMail.Send( _
Nothing, "to address goes here", "subject", "multiline body")

From address is Nothing.
System.Web.Mail.SmtpMail.SmtpServer is blank (untouched by my code).

On Windows XP systems, it seems to figure everything out, and the email
arrives from the default email account of the machine running the program.
No guarantees for other environments, but it sounds like an easy experiment
to try in your environment.

Nov 21 '05 #5
That's why I liked the mailto option so much. They could see exactly what was
being sent.

Since I couldn't do that, I was going to put up a dialog box for them to see
what was being sent and allow them to add a note. I was also planning on
having a Send and Cancel button.

I wouldn't like a program sending email behind my back either. But I like
the idea that bugs are easily reported.
Nov 21 '05 #6
That sounds really good. I like the idea of XP figuring it out for me.
Nov 21 '05 #7
John,
That's why I liked the mailto option so much. They could see exactly what
was
being sent.

Since I couldn't do that, I was going to put up a dialog box for them to
see
what was being sent and allow them to add a note. I was also planning on
having a Send and Cancel button.

I wouldn't like a program sending email behind my back either. But I like
the idea that bugs are easily reported.


I think that a combination of this with a webservice as Michael suggest is
one of the best things you can do. You can than let them type in their
emailaddress or references you have already in your program and let them
self push a sent and make the connection if needed.

Creating a webservice for this is in my opinion a piece of cake with VBNet.

Just store the message in a file or better in a Database on your server.

I hope this helps,

Cor
Nov 21 '05 #8
John,
That sounds really good. I like the idea of XP figuring it out for me.


Be aware that this only works on workstations with NT5 or newer NT.

If you have an open mailserver of your own, you can use that, if you use
withouth permission one of somebody else than it is AFAIK really a kind of
hard way hacking.

Just my thought,

Cor
Nov 21 '05 #9

Hello Cor ,
With one disadvantage, the user should not be behind a firewall and be on
line.
Well if they are not online and have RAS configured i connect for them

A firewall is no problem as i do a posting with my VB6 program to a aspx
page with the webbrowser control ( port 80 is always open on a firewall
-) ) then the server takes care of the rest
only the local software firewall on the users computer might complain that a
program wants to access the internet however in my situation this is already
allowed because of the auto update feature

In my opinion is needed a privaty statement as well, I am not sure if this
what you do is allowed by all laws (if it is not explicitly known by the
user).
It is known by the user as he is the one pressing the button to send the
complaint or question to product management

regards

Michel
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl... Michael,

With one disadvantage, the user should not be behind a firewall and be on
line.

In my opinion is needed a privaty statement as well, I am not sure if this
what you do is allowed by all laws (if it is not explicitly known by the
user).

What is in your case of course not the situation because it is a kind of
internal application.

Cor

Nov 21 '05 #10
John,
In addition to the other comments.

I normally store the SMTP server's name in the app.config file. Then set the
app.config during install of the app.

Be careful with using a blank SmtpServer property. It indicates to use
"local SMTP server", which I understand to mean localhost.

http://msdn.microsoft.com/library/de...ervertopic.asp

Localhost may not be installed or configured to send SMTP mail to the
correct server. I know some corporations don't install this component as it
was an easy way to send viruses... Plus some firewalls & ISPs place
restrictions on who's port 25 you can connect to.

If your "local SMTP server" is configured properly, your firewall allows it,
and your ISP allows it, then I agree a blank SmtpServer is the way to go...

The following site is an excellent resource on System.Web.Mail:

http://www.systemwebmail.net/

Hope this helps
Jay

"John Davies" <Jo********@discussions.microsoft.com> wrote in message
news:1C**********************************@microsof t.com...
|I want to send a bug report automatically from my VB.NET program. I won't
| know the end user's smtp server or what email client they are using.
|
| The Process.Start with mailto is almost what I need, but the amount of
| information that will fit in the body is too small for a stack dump and
other
| information.
|
| I like the way that it would go into the outbox, but oh well, have to move
on.
|
| My next choice is Indy or System.Web.Mail, but I don't know their SMTP
server.
|
| Can I get it from the registry or some other method? How do programs that
| allow me to register for support from email do it? Do they access their
own
| SMTP servers?
|
|
Nov 21 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Salim Afţar | last post: by
7 posts views Thread by Mario Leduc | last post: by
11 posts views Thread by hazz | last post: by
10 posts views Thread by Mike Charney | last post: by
6 posts views Thread by Adam Honek | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.