Hi, Sorry no documentation here....I hope this is of some help. I have used this class in the past and here is a sample below: StringDictionary messageHeaders = new StringDictionary(); messageHeaders.Add("to", sTo); messageHeaders.Add("cc", sCc); messageHeaders.Add("bcc", sBcc); messageHeaders.Add("from", sFrom); messageHeaders.Add("subject", sSubject); SPUtility.SendEmail(spWeb, messageHeaders, sBody); I should warn you that while the method does return true/false it doesn't guarantee the message was delivered successfully even though TRUE was returned. Wes From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone Sent: Thursday, June 30, 2011 8:22 PM To: ozMOSS Subject: RE: Send Email
OK then. Can anyone provide any decent documentation for the SPUtility.SendEmail method? No links to MSDN please. I've seen them all. :) From: ozmoss-boun...@ozmoss.com<mailto:ozmoss-boun...@ozmoss.com> [mailto:ozmoss-boun...@ozmoss.com]<mailto:[mailto:ozmoss-boun...@ozmoss.com]> On Behalf Of Paul Noone Sent: Thursday, 30 June 2011 3:49 PM To: ozMOSS (ozmoss@ozmoss.com<mailto:ozmoss@ozmoss.com>) Subject: Send Email I'm using a custom class using System.Net.Mail to send emails from a SharePoitn site. The emails get sent without problem when submitted from a provisioned page in the _layouts directory. But throw an "Object..." on the user supplied address when the exact same form and code is used in a web part within a publishing page. Do I need to write another class that uses the SPUtility.SendEmail method in order to do this from a SharePoint page? The reason for the custom class is that it includes an additional parameter to specify the XML template to be used. If need be I could dispense this this and just supply the body as a string. Kind regards, Paul Noone --------------------------------------------------- Online Developer/SharePoint Administrator Infrastructure Team, ICT Catholic Education Office, Sydney p: (02) 9568 8461 f: (02) 9568 8483 e: paul.no...@ceosyd.catholic.edu.au<mailto:paul.no...@ceosyd.catholic.edu.au> w: http://www.ceosyd.catholic.edu.au/
_______________________________________________ ozmoss mailing list ozmoss@ozmoss.com http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss