dbTalk Databases Forums  

How to email from DTS to Lotus notes users

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


Discuss How to email from DTS to Lotus notes users in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Karen Middleton
 
Posts: n/a

Default How to email from DTS to Lotus notes users - 09-21-2004 , 06:56 AM






We are running Lotus Notes as our mail system. I want SQL Server to
send emails to Notes users can somebody please explain how to setup a
mail profile to send emails to Notes users.

Many Thanks
Karen

Reply With Quote
  #2  
Old   
Beema
 
Posts: n/a

Default Re: How to email from DTS to Lotus notes users - 09-21-2004 , 08:59 AM







"Karen Middleton" <karenmiddleol (AT) yahoo (DOT) com> wrote

Quote:
We are running Lotus Notes as our mail system. I want SQL Server to
send emails to Notes users can somebody please explain how to setup a
mail profile to send emails to Notes users.

Many Thanks
Karen

I have SQL "email" tables set up , in which a DTS or any other SQL system
can insert emails into - basically with a MsgTo, MsgSubject, MsgeBody type
structure.

I then have a front-end application which polls the tables for new emails,
opens a Notes session via the API calls (pasted below) and sends the mail
off.

It wasn't easy, and isn't robust, but it's chugging along...... I'd been
interested to find a simpler way to do it.

Ben


---------------------------------------------------------------------------
-- Notes API Calls which starts sessions, sends mails through Notes etc.
---------------------------------------------------------------------------

// Initiailises the VIM functions
PUBLIC FUNCTION LONG VIMInitialize () LIBRARY "VIM32.DLL"

// Terminates the VIM functions
FUNCTION LONG VIMTerminate () LIBRARY "VIM32.DLL"

// Gets session info
FUNCTION LONG VIMGetDefaultSessionInfo( &
int sizePath, &
Ref String psPathSpec, &
int sizeName, &
Ref String psName ) LIBRARY "VIM32.DLL"

FUNCTION LONG VIMQueryCapability( &
Long selType, &
int sizeData, &
ref any pData ) LIBRARY "VIM32.DLL"

// Opens a session
FUNCTION LONG VIMOpenSession( &
Ref String psPathSpec, &
Ref String psName, &
Ref String psPass, &
Long dwVersion, &
Long selCharSet, &
Ref long pSesion ) LIBRARY "VIM32.DLL"

// Close a session
FUNCTION LONG VIMCloseSession( long psesion ) LIBRARY "VIM32.DLL"

// Create a message
FUNCTION LONG VIMCreateMessage( &
long psesion, &
string psType, &
Ref Long pMensaje ) LIBRARY "VIM32.DLL"

// Close a message
FUNCTION LONG VIMCloseMessage (long pmsg) LIBRARY "VIM32.DLL"

// Send Message
FUNCTION LONG VIMSendMessage( &
Long mensaje, &
long pCallbackParam, &
long callback ) LIBRARY "VIM32.DLL"

// Adds recipient
FUNCTION LONG VIMSetMessageRecipient( &
Long mensaje, &
Long class, &
Ref str_vim_recipient pRecip ) LIBRARY "VIM32.DLL"

// Add body or attachment
FUNCTION LONG VIMSetMessageItem( &
Long mensaje, &
Long selClass, &
String psType, &
Long selFlags, &
String psName, &
Ref str_vim_bufffiledesc pDesc ) LIBRARY "VIM32.DLL"

// Set Subject, priority & other info
FUNCTION LONG VIMSetMessageHeader ( &
LONG pmsg, &
LONG VIMSELSUBJECT, &
Int size, &
Ref string subject ) LIBRARY "VIM32.DLL"

// Return Message Status
FUNCTION LONG VIMStatusText( long psesion, &
long pstatus, &
int wTextSize, &
Ref string pText, &
int wExtTextSize, &
Ref string pExtText ) LIBRARY "VIM32.DLL"

// Open Address Book
FUNCTION LONG VIMOpenAddressBook( long psesion, &
string psName, &
ref string pAddressBook ) LIBRARY "VIM32.DLL"




Reply With Quote
  #3  
Old   
Peter A. Schott
 
Posts: n/a

Default Re: How to email from DTS to Lotus notes users - 09-21-2004 , 12:28 PM



I went to the SQLDev website and downloaded Gert Drapers' excellent SMTP
Sendmail extended proc and stored proc wrapper. Makes sending notices quite a
bit easier if you can use SMTP.

http://www.sqldev.net/xp/xpsmtp.htm
http://www.sqldev.net/xp/sp_smtp_sendmail.htm

I believe a lot of this work formed the basis for iMail in SQL2005 - it at
least gets away from the MAPI dependencies, but you lose the ability to send
the output of queries directly.

I've built some ActiveX steps that populate my ExecSQL task with the
appropriate parameters and attachments. It works really well for me.


I think that you'll find this works a little easier than Notes API calls as
well if you can get that internal SMTP server running.

-Pete

"Beema" <none (AT) supplied (DOT) com> wrote:

Quote:
"Karen Middleton" <karenmiddleol (AT) yahoo (DOT) com> wrote in message
news:a5fd468a.0409210356.17377533 (AT) posting (DOT) google.com...
We are running Lotus Notes as our mail system. I want SQL Server to
send emails to Notes users can somebody please explain how to setup a
mail profile to send emails to Notes users.

Many Thanks
Karen


I have SQL "email" tables set up , in which a DTS or any other SQL system
can insert emails into - basically with a MsgTo, MsgSubject, MsgeBody type
structure.

I then have a front-end application which polls the tables for new emails,
opens a Notes session via the API calls (pasted below) and sends the mail
off.

It wasn't easy, and isn't robust, but it's chugging along...... I'd been
interested to find a simpler way to do it.

Ben


---------------------------------------------------------------------------
-- Notes API Calls which starts sessions, sends mails through Notes etc.
---------------------------------------------------------------------------

// Initiailises the VIM functions
PUBLIC FUNCTION LONG VIMInitialize () LIBRARY "VIM32.DLL"

// Terminates the VIM functions
FUNCTION LONG VIMTerminate () LIBRARY "VIM32.DLL"

// Gets session info
FUNCTION LONG VIMGetDefaultSessionInfo( &
int sizePath, &
Ref String psPathSpec, &
int sizeName, &
Ref String psName ) LIBRARY "VIM32.DLL"

FUNCTION LONG VIMQueryCapability( &
Long selType, &
int sizeData, &
ref any pData ) LIBRARY "VIM32.DLL"

// Opens a session
FUNCTION LONG VIMOpenSession( &
Ref String psPathSpec, &
Ref String psName, &
Ref String psPass, &
Long dwVersion, &
Long selCharSet, &
Ref long pSesion ) LIBRARY "VIM32.DLL"

// Close a session
FUNCTION LONG VIMCloseSession( long psesion ) LIBRARY "VIM32.DLL"

// Create a message
FUNCTION LONG VIMCreateMessage( &
long psesion, &
string psType, &
Ref Long pMensaje ) LIBRARY "VIM32.DLL"

// Close a message
FUNCTION LONG VIMCloseMessage (long pmsg) LIBRARY "VIM32.DLL"

// Send Message
FUNCTION LONG VIMSendMessage( &
Long mensaje, &
long pCallbackParam, &
long callback ) LIBRARY "VIM32.DLL"

// Adds recipient
FUNCTION LONG VIMSetMessageRecipient( &
Long mensaje, &
Long class, &
Ref str_vim_recipient pRecip ) LIBRARY "VIM32.DLL"

// Add body or attachment
FUNCTION LONG VIMSetMessageItem( &
Long mensaje, &
Long selClass, &
String psType, &
Long selFlags, &
String psName, &
Ref str_vim_bufffiledesc pDesc ) LIBRARY "VIM32.DLL"

// Set Subject, priority & other info
FUNCTION LONG VIMSetMessageHeader ( &
LONG pmsg, &
LONG VIMSELSUBJECT, &
Int size, &
Ref string subject ) LIBRARY "VIM32.DLL"

// Return Message Status
FUNCTION LONG VIMStatusText( long psesion, &
long pstatus, &
int wTextSize, &
Ref string pText, &
int wExtTextSize, &
Ref string pExtText ) LIBRARY "VIM32.DLL"

// Open Address Book
FUNCTION LONG VIMOpenAddressBook( long psesion, &
string psName, &
ref string pAddressBook ) LIBRARY "VIM32.DLL"



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.