Error when SaveMailboxEntry runs

Topics: Customizing BugNET
Nov 19, 2012 at 3:54 PM

For 1.2.231, I am getting this error when SaveMailboxEntry runs as my POP3 mailbox is polled by BugNET:

  System.NullReferenceException: Object reference not set to an instance of an object.

This occurs in line 249:

...Projects\BugNet\BugNET-1.2.231-Source\src\BugNET.MailboxReader\MailboxReader.cs:line 249

It looks like Config.BodyTemplate is the culprit. 

I think if I can solve this then the POP3 read function might work.

Regards,
-- Jon 

 

Developer
Nov 19, 2012 at 4:10 PM

See http://bugnet.codeplex.com/discussions/403743 make sure that the file exists and the setting in the Application config is correct.

Nov 19, 2012 at 4:57 PM

[I apologize--I usually check your discussion groups before posting...]

Nevertheless--OMG!!!!!!!!!!!!!!!!!!!!!!!!!!!! THIS IS JUST TOOOOOOOOOOOO COOL FOR WORDS! IT WORKS!

I always thought it would be super-cool to be able to auto-process incoming (POP3) mails and log them into a database--and to see it actually happen?! I am obviously ecstatic! I can't thank you and everyone at BugNet enough! You guys really did a great job!

I hope this helps someone else: When I installed 1.2.231, the Application Configuration | POP3 Mailbox | Issue Detail Template setting was left as: 

      <div >Sent by:{1} on: {2}<br>{0}</div>

One thing that might be helpful is to rename the label for the Issue Detail Template text box to Issue Detail Template Path. In addition, this is a file-system path (not a URL path) so it might be useful to give an example (to the right of the text box perhaps). I worked out the correct path using the debugger just to see how the Path.Combine function was merging the Issue Detail Template Path value with the supplied path variable. Here is how I had to set my template path (I am using the default template for now):

      templates\\newmailboxissue.xslt 

When I re-ran the solution, voila! My inbound mail was processed!

If you don't hear it often enough, you guys are FANTASTIC. I am so thankful to you William and to Dubeaud for all your help in getting me up-and-running and for all the help even over the past weekend. I can now spend the afternoon customizing the application a bit.

Regards,
-- Jon 

Coordinator
Nov 19, 2012 at 5:01 PM

Just noticed that for new installs , the setting was not changed to include the path of the template like we do on upgrades.

Nov 19, 2012 at 5:13 PM

Yes, I was just downloading the source from the Source file download, extracting, and running. Are there instructions on the right way to do BugNET upgrades once everything is up and running? I have actually been keeping a log of things I needed to do after downloading the source but if I can go through an upgrade process then it seems that I will avoid certain pitfalls.

Thanks,
-- Jon