dbTalk Databases Forums  

How to send outlook appointment request / "mail" from SQL server ?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss How to send outlook appointment request / "mail" from SQL server ? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
M. Gabriel
 
Posts: n/a

Default How to send outlook appointment request / "mail" from SQL server ? - 08-23-2004 , 02:29 AM






Hello dts-world,

i am using sql server 2000 and would like to send an
outlook appointment / outlook meeting request to a exchange
server 5.5 mailling list (?distribution list).

Since I already have a DTS-Package which is able to send
e-mail, i hope that sending an appointment request should
not be to difficult either?!.

If there is another convenient way to send outlook
appointments from SQL Server (by using MAPI or CDO for
instance) i would be glad to hear about it.

Best Regards and thanks for reading this.

M. Gabriel


To hopefully help others unable to send an email with sql
server i include the vb code used to send that e-mail:

'************************************************* ***************
'Microsoft SQL Server 2000
'Visual Basic file generated for DTS Package
'File Name: D:\pms_30_04_04\sqlServer\sendMail.bas
'Package Name: SendMailFromDTS
'Package Description:
'Generated Date: 23.08.2004
'Generated Time: 08:50:46
'************************************************* ***************

Option Explicit
Public goPackageOld As New DTS.Package
Public goPackage As DTS.Package2
Private Sub Main()
set goPackage = goPackageOld

goPackage.Name = "SendMailFromDTS"
goPackage.WriteCompletionStatusToNTEventLog = False
goPackage.FailOnError = False
goPackage.PackagePriorityClass = 2
goPackage.MaxConcurrentSteps = 4
goPackage.LineageOptions = 0
goPackage.UseTransaction = True
goPackage.TransactionIsolationLevel = 4096
goPackage.AutoCommitTransaction = True
goPackage.RepositoryMetadataOptions = 0
goPackage.UseOLEDBServiceComponents = True
goPackage.LogToSQLServer = False
goPackage.LogServerFlags = 0
goPackage.FailPackageOnLogFailure = False
goPackage.ExplicitGlobalVariables = False
goPackage.PackageType = 0



'---------------------------------------------------------------------------
' create package steps information
'---------------------------------------------------------------------------

Dim oStep as DTS.Step2
Dim oPrecConstraint as DTS.PrecedenceConstraint

'------------- a new step defined below

Set oStep = goPackage.Steps.New

oStep.Name = "DTSStep_DTSSendMailTask_1"
oStep.Description = "Send Mail with DTS-Package"
oStep.ExecutionStatus = 4
oStep.TaskName = "DTSTask_DTSSendMailTask_1"
oStep.CommitSuccess = False
oStep.RollbackFailure = False
oStep.ScriptLanguage = "VBScript"
oStep.AddGlobalVariables = True
oStep.RelativePriority = 3
oStep.CloseConnection = False
oStep.ExecuteInMainThread = False
oStep.IsPackageDSORowset = False
oStep.JoinTransactionIfPresent = False
oStep.DisableStep = False
oStep.FailPackageOnError = False

goPackage.Steps.Add oStep
Set oStep = Nothing

'---------------------------------------------------------------------------
' create package tasks information
'---------------------------------------------------------------------------

'------------- call Task_Sub1 for task
DTSTask_DTSSendMailTask_1 (Send Mail with DTS-Package)
Call Task_Sub1( goPackage )

'---------------------------------------------------------------------------
' Save or execute package
'---------------------------------------------------------------------------

'goPackage.SaveToSQLServer "(local)", "sa", ""
goPackage.Execute
goPackage.Uninitialize
'to save a package instead of executing it, comment out the
executing package line above and uncomment the saving
package line
set goPackage = Nothing

set goPackageOld = Nothing

End Sub


'------------- define Task_Sub1 for task
DTSTask_DTSSendMailTask_1 (Send Mail with DTS-Package)
Public Sub Task_Sub1(ByVal goPackage As Object)

Dim oTask As DTS.Task
Dim oLookup As DTS.Lookup

Dim oCustomTask1 As DTS.SendMailTask
Set oTask = goPackage.Tasks.New("DTSSendMailTask")
Set oCustomTask1 = oTask.CustomTask

oCustomTask1.Name = "DTSTask_DTSSendMailTask_1"
oCustomTask1.Description = "Send Mail with DTS-Package"
oCustomTask1.Profile = "Microsoft Outlook"
oCustomTask1.ToLine = "your (AT) mail (DOT) Ending"
oCustomTask1.Subject = "DTS-Paket Mailversand"
oCustomTask1.MessageText = "Send a mail from sql Server to
a certain e-mail account"
oCustomTask1.IsNTService = False
oCustomTask1.SaveMailInSentItemsFolder = True

goPackage.Tasks.Add oTask
Set oCustomTask1 = Nothing
Set oTask = Nothing

End Sub





Reply With Quote
  #2  
Old   
Jordan Green
 
Posts: n/a

Default Exchange Server SQL Server communication Adding Appointment Entry - 08-24-2004 , 03:03 AM






I assume you are better of at one of the exchange groups.
Since i am not sure which one would fit best i did a
crosspost to the misc group.

Original posting can be found here:
http://communities.microsoft.com/New...reviewFrame.as
p?
ICP=GSS3&sLCID=US&sgroupURL=microsoft.public.sqlse rver.dts&
sMessageID=%253Cb22001c488e2%2524f9e027e0%
2524a601280a (AT) phx (DOT) gbl%253E

hth

------

Quote of posting follows:

Hello dts-world,

i am using sql server 2000 and would like to send an
outlook appointment / outlook meeting request to a exchange
server 5.5 mailling list (?distribution list).

Since I already have a DTS-Package which is able to send
e-mail, i hope that sending an appointment request should
not be to difficult either?!.

If there is another convenient way to send outlook
appointments from SQL Server (by using MAPI or CDO for
instance) i would be glad to hear about it.

Best Regards and thanks for reading this.

M. Gabriel


To hopefully help others unable to send an email with sql
server i include the vb code used to send that e-mail:

'************************************************* *********
******
'Microsoft SQL Server 2000
'Visual Basic file generated for DTS Package
'File Name: D:\pms_30_04_04\sqlServer\sendMail.bas
'Package Name: SendMailFromDTS
'Package Description:
'Generated Date: 23.08.2004
'Generated Time: 08:50:46
'************************************************* *********
******

Option Explicit
Public goPackageOld As New DTS.Package
Public goPackage As DTS.Package2
Private Sub Main()
set goPackage = goPackageOld

goPackage.Name = "SendMailFromDTS"
goPackage.WriteCompletionStatusToNTEventLog = False
goPackage.FailOnError = False
goPackage.PackagePriorityClass = 2
goPackage.MaxConcurrentSteps = 4
goPackage.LineageOptions = 0
goPackage.UseTransaction = True
goPackage.TransactionIsolationLevel = 4096
goPackage.AutoCommitTransaction = True
goPackage.RepositoryMetadataOptions = 0
goPackage.UseOLEDBServiceComponents = True
goPackage.LogToSQLServer = False
goPackage.LogServerFlags = 0
goPackage.FailPackageOnLogFailure = False
goPackage.ExplicitGlobalVariables = False
goPackage.PackageType = 0



'----------------------------------------------------------
-----------------
' create package steps information
'----------------------------------------------------------
-----------------

Dim oStep as DTS.Step2
Dim oPrecConstraint as DTS.PrecedenceConstraint

'------------- a new step defined below

Set oStep = goPackage.Steps.New

oStep.Name = "DTSStep_DTSSendMailTask_1"
oStep.Description = "Send Mail with DTS-Package"
oStep.ExecutionStatus = 4
oStep.TaskName = "DTSTask_DTSSendMailTask_1"
oStep.CommitSuccess = False
oStep.RollbackFailure = False
oStep.ScriptLanguage = "VBScript"
oStep.AddGlobalVariables = True
oStep.RelativePriority = 3
oStep.CloseConnection = False
oStep.ExecuteInMainThread = False
oStep.IsPackageDSORowset = False
oStep.JoinTransactionIfPresent = False
oStep.DisableStep = False
oStep.FailPackageOnError = False

goPackage.Steps.Add oStep
Set oStep = Nothing

'----------------------------------------------------------
-----------------
' create package tasks information
'----------------------------------------------------------
-----------------

'------------- call Task_Sub1 for task
DTSTask_DTSSendMailTask_1 (Send Mail with DTS-Package)
Call Task_Sub1( goPackage )

'----------------------------------------------------------
-----------------
' Save or execute package
'----------------------------------------------------------
-----------------

'goPackage.SaveToSQLServer "(local)", "sa", ""
goPackage.Execute
goPackage.Uninitialize
'to save a package instead of executing it, comment out the
executing package line above and uncomment the saving
package line
set goPackage = Nothing

set goPackageOld = Nothing

End Sub


'------------- define Task_Sub1 for task
DTSTask_DTSSendMailTask_1 (Send Mail with DTS-Package)
Public Sub Task_Sub1(ByVal goPackage As Object)

Dim oTask As DTS.Task
Dim oLookup As DTS.Lookup

Dim oCustomTask1 As DTS.SendMailTask
Set oTask = goPackage.Tasks.New("DTSSendMailTask")
Set oCustomTask1 = oTask.CustomTask

oCustomTask1.Name = "DTSTask_DTSSendMailTask_1"
oCustomTask1.Description = "Send Mail with DTS-
Package"
oCustomTask1.Profile = "Microsoft Outlook"
oCustomTask1.ToLine = "your (AT) mail (DOT) Ending"
oCustomTask1.Subject = "DTS-Paket Mailversand"
oCustomTask1.MessageText = "Send a mail from sql
Server to
a certain e-mail account"
oCustomTask1.IsNTService = False
oCustomTask1.SaveMailInSentItemsFolder = True

goPackage.Tasks.Add oTask
Set oCustomTask1 = Nothing
Set oTask = Nothing

End Sub


Reply With Quote
  #3  
Old   
David Sengupta [MVP]
 
Posts: n/a

Default Re: Exchange Server SQL Server communication Adding Appointment Entry - 08-25-2004 , 11:25 PM



crossposted into m.p.e2k.dev ... they may be able to assist

--
David Sengupta M.T.S., B.Sc., MCSE, Exchange MVP, CCA
Ottawa, Canada

My E-mail Policy BLOG: http://p0stmaster.blogspot.com



"Jordan Green" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I assume you are better of at one of the exchange groups.
Since i am not sure which one would fit best i did a
crosspost to the misc group.

Original posting can be found here:
http://communities.microsoft.com/New...reviewFrame.as
p?
ICP=GSS3&sLCID=US&sgroupURL=microsoft.public.sqlse rver.dts&
sMessageID=%253Cb22001c488e2%2524f9e027e0%
2524a601280a (AT) phx (DOT) gbl%253E

hth

------

Quote of posting follows:

Hello dts-world,

i am using sql server 2000 and would like to send an
outlook appointment / outlook meeting request to a exchange
server 5.5 mailling list (?distribution list).

Since I already have a DTS-Package which is able to send
e-mail, i hope that sending an appointment request should
not be to difficult either?!.

If there is another convenient way to send outlook
appointments from SQL Server (by using MAPI or CDO for
instance) i would be glad to hear about it.

Best Regards and thanks for reading this.

M. Gabriel


To hopefully help others unable to send an email with sql
server i include the vb code used to send that e-mail:

'************************************************* *********
******
'Microsoft SQL Server 2000
'Visual Basic file generated for DTS Package
'File Name: D:\pms_30_04_04\sqlServer\sendMail.bas
'Package Name: SendMailFromDTS
'Package Description:
'Generated Date: 23.08.2004
'Generated Time: 08:50:46
'************************************************* *********
******

Option Explicit
Public goPackageOld As New DTS.Package
Public goPackage As DTS.Package2
Private Sub Main()
set goPackage = goPackageOld

goPackage.Name = "SendMailFromDTS"
goPackage.WriteCompletionStatusToNTEventLog = False
goPackage.FailOnError = False
goPackage.PackagePriorityClass = 2
goPackage.MaxConcurrentSteps = 4
goPackage.LineageOptions = 0
goPackage.UseTransaction = True
goPackage.TransactionIsolationLevel = 4096
goPackage.AutoCommitTransaction = True
goPackage.RepositoryMetadataOptions = 0
goPackage.UseOLEDBServiceComponents = True
goPackage.LogToSQLServer = False
goPackage.LogServerFlags = 0
goPackage.FailPackageOnLogFailure = False
goPackage.ExplicitGlobalVariables = False
goPackage.PackageType = 0



'----------------------------------------------------------
-----------------
' create package steps information
'----------------------------------------------------------
-----------------

Dim oStep as DTS.Step2
Dim oPrecConstraint as DTS.PrecedenceConstraint

'------------- a new step defined below

Set oStep = goPackage.Steps.New

oStep.Name = "DTSStep_DTSSendMailTask_1"
oStep.Description = "Send Mail with DTS-Package"
oStep.ExecutionStatus = 4
oStep.TaskName = "DTSTask_DTSSendMailTask_1"
oStep.CommitSuccess = False
oStep.RollbackFailure = False
oStep.ScriptLanguage = "VBScript"
oStep.AddGlobalVariables = True
oStep.RelativePriority = 3
oStep.CloseConnection = False
oStep.ExecuteInMainThread = False
oStep.IsPackageDSORowset = False
oStep.JoinTransactionIfPresent = False
oStep.DisableStep = False
oStep.FailPackageOnError = False

goPackage.Steps.Add oStep
Set oStep = Nothing

'----------------------------------------------------------
-----------------
' create package tasks information
'----------------------------------------------------------
-----------------

'------------- call Task_Sub1 for task
DTSTask_DTSSendMailTask_1 (Send Mail with DTS-Package)
Call Task_Sub1( goPackage )

'----------------------------------------------------------
-----------------
' Save or execute package
'----------------------------------------------------------
-----------------

'goPackage.SaveToSQLServer "(local)", "sa", ""
goPackage.Execute
goPackage.Uninitialize
'to save a package instead of executing it, comment out the
executing package line above and uncomment the saving
package line
set goPackage = Nothing

set goPackageOld = Nothing

End Sub


'------------- define Task_Sub1 for task
DTSTask_DTSSendMailTask_1 (Send Mail with DTS-Package)
Public Sub Task_Sub1(ByVal goPackage As Object)

Dim oTask As DTS.Task
Dim oLookup As DTS.Lookup

Dim oCustomTask1 As DTS.SendMailTask
Set oTask = goPackage.Tasks.New("DTSSendMailTask")
Set oCustomTask1 = oTask.CustomTask

oCustomTask1.Name = "DTSTask_DTSSendMailTask_1"
oCustomTask1.Description = "Send Mail with DTS-
Package"
oCustomTask1.Profile = "Microsoft Outlook"
oCustomTask1.ToLine = "your (AT) mail (DOT) Ending"
oCustomTask1.Subject = "DTS-Paket Mailversand"
oCustomTask1.MessageText = "Send a mail from sql
Server to
a certain e-mail account"
oCustomTask1.IsNTService = False
oCustomTask1.SaveMailInSentItemsFolder = True

goPackage.Tasks.Add oTask
Set oCustomTask1 = Nothing
Set oTask = Nothing

End Sub




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.