[AccessD] Strange send e-mail from Access+Outlook 2003 behavior.

Erwin Craps Erwin.Craps at ithelps.be
Tue Nov 25 12:18:46 CST 2003


Hi group
The extract below is a function I'm using for 2 or 3 years now and
always done the job.
I recently installed Outlook 2003 (a week ago) and this function is
behaving very bizar.
 
It's a routine to check in a database I  need to send out some new
passwords and does this for me.
For security reasons I send the mail to the user and myself.
Today I noticed that I did not received my copy as I normaly do.
I called the user and he did not received his copy.
I checked my send items and the mail is in my sent items with the
correct adresses.
But No one has got it.
How can it be posible that the mail is in my sent items and I nor the
user has received the mail!!!
So I start looking to my code and found that when I remove the  lines:
mItem.ReplyRecipients.Add "Staff at boxoffice.be
<mailto:Staff at boxoffice.be> "
mItem.SentOnBehalfOfName = "Staff at boxoffice.be
<mailto:Staff at boxoffice.be> "
My e-mail does get received by both users!!!
I always had Sent-on-Behalf rights so I checked with a manual typed
e-mail with identical adresses and same send-on-behalf user and guess
what. The mail does arrive at both adresses
 
Is this a bug or a security measure, and why does get in my sent items
without actulay sending it???
 
So while I was writing this I tried the same thing on another computer
with Outlook 2002 and gues what.
Everything works fine....
 
Is this a bug?
Anyone out there who can report this to MS?
 
Below is the code.
 
Erwin
 
    
 
 
Set mOutlookApp = CreateObject("Outlook.Application")
    Set mNameSpace = mOutlookApp.GetNamespace("MAPI")
    
    With rstWebSec
        Do While rstWebSec.EOF = False
            If !WEBEmailedPassword = False And Trim(!Email) <> "" Then
                strBody = strBodyHeader & vbCrLf
                strBody = strBody & vbCrLf
                strBody = strBody & !Company & vbCrLf
                strBody = strBody & !Title & " " & !FirstName & " " &
!SurName & vbCrLf
               strBody = strBody & vbCrLf
                strBody = strBody & strBodyFooter & vbCrLf
                
                Application.SysCmd acSysCmdUpdateMeter,
rstWebSec.AbsolutePosition
                Set mItem = mOutlookApp.CreateItem(olMailItem)
                mItem.Recipients.Add !Email
                mItem.Recipients.Add "Erwin.Craps at ithelps.be
<mailto:Erwin.Craps at ithelps.be> "
                mItem.Subject = strSubject
                mItem.Body = strBody
                mItem.ReplyRecipients.Add "Staff at boxoffice.be
<mailto:Staff at boxoffice.be> "
                mItem.SentOnBehalfOfName = "Staff at boxoffice.be
<mailto:Staff at boxoffice.be> "
                'mItem.Display
                mItem.Send
                DoEvents
                Set mItem = Nothing
                .Edit
                !WEBEmailedPassword = True
                .Update
            End If
            .MoveNext
            DoEvents
        Loop
    End With
    Set mNameSpace = Nothing
    Set mOutlookApp = Nothing

 

 

Erwin Craps

Zaakvoerder 

www.ithelps.be/jonathan

 

This E-mail is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and E-mail confirmation to
the sender.

IT Helps - I.T. Help Center  ***  Box Office Belgium & Luxembourg

www.ithelps.be <http://www.ithelps.be/>   *  www.boxoffice.be
<http://www.boxoffice.be/>   *  www.stadleuven.be
<http://www.stadleuven.be/> 

IT Helps bvba* ** Mercatorpad 3 **  3000 Leuven

IT Helps  *  Phone: +32 16 296 404  *  Fax: +32 16 296 405 E-mail:
Info at ithelps.be 

Box Office **  Fax: +32 16 296 406 **  Box Office E-mail:
Staff at boxoffice.be <mailto:figures at boxoffice.be> 

 


More information about the AccessD mailing list