[quoted text, click to view] "Karen Middleton" <karenmiddleol@yahoo.com> wrote in message
news:a5fd468a.0409210356.17377533@posting.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"