Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Fri, 22 Aug 2008 11:39:01 +0200,    group: microsoft.public.platformsdk.mapi        back       


MAPI Sending data from a database   
Hallo

Being a Newbe I regret not to understand the functioning of MAPI. So I would 
be grateful for some help:

The details to be sent are contained in a database:

AAAA Originalmail  1

BBBB copy of A to be sent a s blind BCC    (RecipType = 3)

CCCC copy of A to be sent as blind BCC    (RecipType = 3)



DDDD Originalmail 2

To be sent without copy

EEEE Originalmail 3

To be sent without copy

FFFF Originalmail 4

GGG copy of 4 to be sent as CC  (receivers are shown in the mail, Reciptype 
2 )

HHH copy of 4 to be sent as CC (receivers are shown in the mail Reciptype = 
2 )



I imagine filling the MAPIcommands by a loop, however all my endeavours 
failed. In paricular the MAPI seems not to accept ToName and ToMail from the 
rstMail"ToName and rstMail!Toname fields of the database :

Is it required to open a new session for every Originalmail  or  do I have 
to open  the session only once with  signon before the do and signoff after 
exit of the loop?

(ALTERNATIV  1)

X = 0

MapiSession.Signon

MapiMessages.Compose


Do While Not rstMail.EOF

MAPIMessages1.RecipIndex = X

MAPIMessages1.RecipType = rstMail!RecipType ' 1 = Einzel, 2 = CC, 3 = BC

MAPIMessages1.MsgSubject = rstMail!Subject ' Betreff : Testmail

MAPIMessages1.RecipDisplayName = rstMail!ToName ' Wilhelm

MAPIMessages1.RecipAddress = rstMail!ToMail ' Testmann@mailadresse.de

MAPIMessages1.MsgNoteText = rstMail!Data ' Text

rstMail.MoveNext

X = X + 1

Loop

MAPIMessages.send

MAPISession.signoff

##################################################################################

(ALTernative 2)


X = 0

Do While Not rstMail.EOF

MapiSession.Signon

MapiMessages.Compose

MAPIMessages1.RecipIndex = X

MAPIMessages1.RecipType = rstMail!RecipType ' 1 = Einzel, 2 = CC, 3 = BC

MAPIMessages1.MsgSubject = rstMail!Subject ' Betreff : Testmail

MAPIMessages1.RecipDisplayName = rstMail!ToName ' Wilhelm

MAPIMessages1.RecipAddress = rstMail!ToMail ' Testmann@mailadresse.de

MAPIMessages1.MsgNoteText = rstMail!Data ' Text

MAPIMessages1.send

rstMail.MoveNext

X = X + 1

Loop

MAPISession.signoff



Thanks in advance

Kurt
date: Fri, 22 Aug 2008 11:39:01 +0200   author:   klaus peters

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us