Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

how to Sending Appointments to Outlook ics File-from sql server Email Expand / Collapse
Author
Message
Posted Thursday, September 27, 2007 7:28 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, July 28, 2008 8:42 AM
Points: 302, Visits: 271
how to send Email from sql server 2005 with Appointments to Outlook ics File

Sending Appointments to an Outlook Calendar from sql server 2005

TNX



Post #403478
Posted Monday, October 1, 2007 1:28 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, July 28, 2008 8:42 AM
Points: 302, Visits: 271
no answer ????


Post #405216
Posted Monday, October 1, 2007 9:29 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:46 AM
Points: 33,097, Visits: 15,205
You would need the format of the Appointment email and then build that in SQL Server. I don't know of a solution off hand for this.

Is it using Exchange? There was a product (Search sqlexchange) to update Exchange with data from SQL Server.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #405377
Posted Tuesday, October 2, 2007 5:57 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Tuesday, February 5, 2013 4:24 AM
Points: 685, Visits: 104
my thinking is you can use the outlook programming model so you could probably use the .net runtime. create a dll which has the outlook calendar objects etc.. and add a clr udf to your server.



Everything you can imagine is real.

Post #405552
Posted Wednesday, October 3, 2007 3:07 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, July 28, 2008 8:42 AM
Points: 302, Visits: 271
what i need is
only to generate from sql mail the file "ICS" and to send it as email attachment
can i get any help to do this
TNX



Post #406082
Posted Wednesday, October 3, 2007 7:57 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:46 AM
Points: 33,097, Visits: 15,205
If you need help to generate an ICS file, you probably need to go to an Exchange or .NET site dealing with mail. Once that is done, we can help with the mailing, but this isn't necessarily the best place for a programming task like that.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #406215
Posted Wednesday, December 16, 2009 5:29 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, May 26, 2011 2:20 AM
Points: 1, Visits: 4
Here is a sample t-sql script; it uses a query to generate an attachment that has the ics format of an appointment;
hope it helps

EXEC msdb.dbo.sp_send_dbmail
@recipients = 'GrahameHorner@thinkpositive.com'
-- ,@copy_recipients = 'copy_recipient [ ; ...n ]'
-- ,@blind_copy_recipients = 'blind_copy_recipient [ ; ...n ]'

-- ,@subject = 'subject'
, @body = 'test'
-- , @body_format = 'body_format'
-- , @importance = 'importance'
--- , @sensitivity = 'sensitivity'
, @query =
'
--
SET NOCOUNT ON;
--
SELECT ''BEGIN:VCALENDAR''
+ CHAR(13)
+ ''PRODID:-//PositiveSolutions//Extranet//EN''
+ CHAR(13)
+ ''VERSION:1.0''
+ CHAR(13)
+ ''METHOD:PUBLISH''
+ CHAR(13)
+ ''BEGIN:VEVENT''
+ CHAR(13)
+ ''CLASS:PUBLIC''
+ CHAR(13)
+ REPLACE(''DESCRIPTION:{appointmentDescription}'',''{appointmentDescription}'',a.appointmentDescription)
+ CHAR(13)
+ REPLACE(''DTEND:{appointmentFinish}Z'',''{appointmentFinish}'',REPLACE(REPLACE(CONVERT ( varchar(19), a.appointmentFinish , 127 ), ''-'', ''''),'':'',''''))
+ CHAR(13)
+ REPLACE(''DTSTART:{appointmentStart}Z'',''{appointmentStart}'',REPLACE(REPLACE(CONVERT ( varchar(19), a.appointmentStart , 127 ), ''-'', ''''),'':'',''''))
+ CHAR(13)
+ REPLACE(''LOCATION:{appointmentLocation}'',''{appointmentLocation}'',a.appointmentLocation)
+ CHAR(13)
+ ''END:VEVENT''
+ CHAR(13)
+ ''END:VCALENDAR''
FROM
[Extranet].[dbo].[tblAppointment] a
'
, @attach_query_result_as_file = 1
, @query_result_header = 0
, @query_result_separator = 'CHAR(10)+CHAR(13)'
, @exclude_query_output = 1
, @query_attachment_filename = 'appointment.ics'

Post #835001
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse