in

SharePoint University

Clean slate. Nothing but SharePoint.
Go, SharePoint!

Send a mail from a customfield type

Last post 08-18-2008 4:57 AM by spdaneels. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 08-07-2008 6:17 AM

    Send a mail from a customfield type

     Hello,

    I've made a customfield type c#.
    When there occures an error, i wan't the customfield type to send a mail to the administrator.

    Is this possible?

    I've tryed to open the default-email client from the client's pc but it won't work, i think it's blocked by sharepoint to start an new proces.

    Any one an idee or an other way to report errors?

     Thanks

     Spdaneels

    Filed under: ,
  • 08-18-2008 3:17 AM In reply to

    Re: Send a mail from a customfield type

    Hi, spdaneels

    I am not very sure if this solution can solve your problem, because your requirement is not very clear in your description.

    http://www.sharepointboost.com/alerttutorial.html

    It can set sending conditions and include email addresses as sending targets. I think your custom field type may be included into the sending conditions, and I hope it can help you!

     

    www.SharePointBoost.com
    SharePoint Add-ons: Enhancement for Alert, Reminder, Permission, Lookup, RichText, Password change,List Collection, List Form Validation, Lookup Boost

    services@sharepointboost.com
  • 08-18-2008 3:30 AM In reply to

    Re: Send a mail from a customfield type

    Hi Daissyy,

    i'll try to explain a bit more,

    I've a custom field type in c#. The field is dropdownlist with information from an sql server.
    Sometimes there is an error when the customfield try's to get it's information from the sql server.
    Now is the question, is there some code in c# to automatic mail the error code to the administrator.
    Alert is not an option.

    thx

  • 08-18-2008 4:13 AM In reply to

    Re: Send a mail from a customfield type

    Hello,

    Not sure I understand the problem properly, but if you have code that fails, you should at least wrap it in try-catch blocks. That way you can catch any exception and send email, log to event log, hack the pentagon, or whatever you desire, whenever an exception is raised.

    .b

    My new book is now available for pre-order at Amazon!
    Blog for my new developer book on the SharePoint User Experience


    My SharePoint blog with articles, reviews, and code samples.

    Anonymized questions and answers may be posted to my blog.

    If, after a few days, I have not responded to a thread in which you have requested my assistance, please let me know by email furuknap<[at]>gmail.com. I am not ignoring you but I do get 20-30 requests each day and some responses might be lost.
  • 08-18-2008 4:25 AM In reply to

    Re: Send a mail from a customfield type

    Thx for your reply,

    There is already a try catch and in the catch i want to send a mail to the admin, But i don't know how.

    That's what i'm looking for.

    Thx

  • 08-18-2008 4:42 AM In reply to

    Re: Send a mail from a customfield type

    Oh... Well, look at my article at http://furuknap.blogspot.com/2008/07/send-sharepoint-document-library-file.html where you will find code to send email from SharePoint, or any .net app for that matter, at bit down on the page. Code begins in code line 52 :-)

    .b

    My new book is now available for pre-order at Amazon!
    Blog for my new developer book on the SharePoint User Experience


    My SharePoint blog with articles, reviews, and code samples.

    Anonymized questions and answers may be posted to my blog.

    If, after a few days, I have not responded to a thread in which you have requested my assistance, please let me know by email furuknap<[at]>gmail.com. I am not ignoring you but I do get 20-30 requests each day and some responses might be lost.
  • 08-18-2008 4:57 AM In reply to

    Re: Send a mail from a customfield type

    i'll try that code.

    Now i first need to find out what the mail server is and what the mailport is on for my mail server.

    Thx for the fast reply !!

     

Page 1 of 1 (7 items)

Need SharePoint Training? Attend a SharePoint Bootcamp!
Forum content (c) original posters. Everything else (c) 2008 SharePoint Experts, Inc.