473,287 Members | 1,964 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Send Bug Report from Windows Form

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("fr**@from.com");
MailAddress to = new MailAddress("to@to.com");
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

Mar 15 '06 #1
3 4986
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.

"rob" <rm*******@yahoo.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
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("fr**@from.com");
MailAddress to = new MailAddress("to@to.com");
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

Mar 15 '06 #2
How about let's forget about smtp and send the bug report to your webservice?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"rob" wrote:
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("fr**@from.com");
MailAddress to = new MailAddress("to@to.com");
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

Mar 15 '06 #3
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

"rob" <rm*******@yahoo.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
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("fr**@from.com");
MailAddress to = new MailAddress("to@to.com");
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

Mar 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Kurien Baker Fenn | last post by:
How to send data from an ASP form to a visual basic form? Please help
2
by: Carl | last post by:
When my report opens my pop-up form (which is not modal) appears on top of the report. I use the on No Data event to show a message to the user if no records are to be displayed and then when OK...
2
by: Fatih BOY | last post by:
Hi, I want to send a report from a windows application to a web page like 'report.asp' Currently i can send it via post method with a context like local=En&Username=fatih&UserId=45&Firm=none...
0
by: Dean Sabella | last post by:
Hi, I was trying to run a crystal report in the .net sample application given at: http://support.crystaldecisions.com/communityCS/FilesAndUpdates/ cppnet_win_subreport_basic.exe.asp (I've...
0
by: Rahul Chatterjee | last post by:
Hello All I have designed a dotnet application using VB which basically takes a selection and passes value to a crystal report which in turn passes the value to a Stored procedure. After the...
0
by: dreamsoul620 via AccessMonster.com | last post by:
Hi all! I'm trying to set up an email application for my database. I tried linking to my Outlook address book, but when reading from the table, I receive an error message saying I need to restart...
1
by: pixie | last post by:
Hi. Access 2003. The database stores contract information. I have a query for each person that is responsible for contracts. The query checks to see if there are reports due either this week,...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
0
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, My C# application trys to access directorycontext during Form loading. Try and Catch if there is an exception. I then output an error message and then "this.Close();" to exit the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.