Send Bug Report from Windows Form

R

rob

I have an win form app from which I want to be able to send bug
reports. My first approach was something like:

SmtpClient client = new SmtpClient( ????? );
MailAddress from = new MailAddress("(e-mail address removed)");
MailAddress to = new MailAddress("(e-mail address removed)");
MailMessage message = new MailMessage(from, to);
message.Body = "Email Body";
message.BodyEncoding = System.Text.Encoding.UTF8;
message.Subject = "Subject";
message.SubjectEncoding = System.Text.Encoding.UTF8;
client.Send(message);
message.Dispose();

I am having a couple of problems with this:

1) I don't want the user to have to specify the SMTP host. Is there a
way to figure that out programmatically and then set the appropriate
value?
2) On some machine I might need credentials. Is there a way around that
without having to prompt the user for this information?

Of course I am also open to other suggestion on other ways for the
customer to send bug reports without having to add any information
besides maybe some comment.

Thanks
 
J

Jim Hughes

Specify your own SMTP server and credentials and ensure that those
credentials have permission to send email via your SMTP server.

You may also want to specify a custom port instead of port 25 because some
ISPs are blocking outbound connections to port 25.

Even better might be to post the message to a web service that you host
instead of using email.
 
V

vj

Yes sure Web Service works great.. We have it implemented for all our
applications.., you can achieve something similar to Windows Error Reporting

VJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top