﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server 2005 General Discussion  / how to Sending Appointments to Outlook ics File-from sql server Email / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Fri, 24 May 2013 11:01:40 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: how to Sending Appointments to Outlook ics File-from sql server Email</title><link>http://www.sqlservercentral.com/Forums/Topic403478-149-1.aspx</link><description>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[code="sql"]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'[/code]</description><pubDate>Wed, 16 Dec 2009 05:29:48 GMT</pubDate><dc:creator>GrahameHorner</dc:creator></item><item><title>RE: how to Sending Appointments to Outlook ics File-from sql server Email</title><link>http://www.sqlservercentral.com/Forums/Topic403478-149-1.aspx</link><description>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.</description><pubDate>Wed, 03 Oct 2007 07:57:45 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: how to Sending Appointments to Outlook ics File-from sql server Email</title><link>http://www.sqlservercentral.com/Forums/Topic403478-149-1.aspx</link><description>what i need isonly to generate from sql mail the file "ICS" and to send it as email attachmentcan i get any help to do thisTNX</description><pubDate>Wed, 03 Oct 2007 03:07:09 GMT</pubDate><dc:creator>midan1</dc:creator></item><item><title>RE: how to Sending Appointments to Outlook ics File-from sql server Email</title><link>http://www.sqlservercentral.com/Forums/Topic403478-149-1.aspx</link><description>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.</description><pubDate>Tue, 02 Oct 2007 05:57:58 GMT</pubDate><dc:creator>bledu</dc:creator></item><item><title>RE: how to Sending Appointments to Outlook ics File-from sql server Email</title><link>http://www.sqlservercentral.com/Forums/Topic403478-149-1.aspx</link><description>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.</description><pubDate>Mon, 01 Oct 2007 21:29:59 GMT</pubDate><dc:creator>Steve Jones - SSC Editor</dc:creator></item><item><title>RE: how to Sending Appointments to Outlook ics File-from sql server Email</title><link>http://www.sqlservercentral.com/Forums/Topic403478-149-1.aspx</link><description>no answer ????</description><pubDate>Mon, 01 Oct 2007 13:28:12 GMT</pubDate><dc:creator>midan1</dc:creator></item><item><title>how to Sending Appointments to Outlook ics File-from sql server Email</title><link>http://www.sqlservercentral.com/Forums/Topic403478-149-1.aspx</link><description>how to send Email from sql server 2005 with Appointments to Outlook ics FileSending Appointments to an Outlook  Calendar from sql server 2005 TNX</description><pubDate>Thu, 27 Sep 2007 07:28:54 GMT</pubDate><dc:creator>midan1</dc:creator></item></channel></rss>