Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automation email via Outlook and security niveau

Status
Not open for further replies.

checkOut

Technical User
Oct 17, 2002
153
NL
Access2000-user

I made several automated emailFunctions. The basis for this function is build on fctnOutlook(..) a function I found on this forum (many thanks to the builder).
The problem is: By the company I want to install the program (with the functions) is a securitylevel installed. This security stops automated email and asked the user for let them through or not, I don't like that. Further the security initiate that a name is picked up from the users adressbook (the second irritated level where the user can interact my code).
The link below leads through the MS site where they explain the problems. My question is: is somebody in this forum clever enough to broke that security ;) or another easier way to handle this?


Many thanx in advance,
Gerard
 
Hmm. There is something called Outlook Redemption you could try - it works around limitations imposed by the Outlook Security Patch and Service Pack 2 of MS Office 2000 and Office XP (which includes Security Patch). These are what cause your users to have to confirm that it's OK for your database to send e-mails on your behalf. You can get Outlook Redemption from
Note: I haven't ever got around to implementing this myself, so I don't know how good it is. Look promising though.

Also, if the fctnOutlook you're using came from then I wrote it, so thanks for your feedback. It's recently been updated to enable you to specify an attachment too.

HTH. [pc2]
 
HTH,

I will give it a try and bring the results back. Yes that's the way I got the function ;0)
I also seen ur update but not used it already, maybe in the future. I also maked a trivial revision in ur function:
to read a string of adresses; f.e.: mail@mail.com;mail1@mail.com and so on.
 
Interesting, although it shouldn't need a revision to accept multiple addresses, just separate them with semi-colons, as shown in the example at the website address given in my previous post.

I look forward to hearing how you get on with Outlook Redemption.

Cheers,
MP9 [pc2]
 
Hi MP9,

ur function in redemption form ;)
This way u can go behind the ms security.
The redemption doesn't understand the outlook.recipient object so This object I get out,


Function fctnOutlook(Optional FromAddr, Optional Addr, Optional cc, Optional BCC, _
Optional Subject, Optional MessageText, Optional Vote As String = vbNullString, _
Optional Urgency As Byte = 1, Optional EditMessage As Boolean = True)

' Code sample from Accessory
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim TestEmail As Variant, I As Integer
Dim SafeItem
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
Set SafeItem = CreateObject("Redemption.SafeMailItem")
'Create an instance of Redemption.SafeMailItem
SafeItem.Item = objOutlookMsg 'set Item property
With SafeItem

If Not IsMissing(FromAddr) Then
.SentOnBehalfOfName = FromAddr
End If

If Not IsMissing(Addr) Then
TestEmail = Split(Addr, ";")
For I = 0 To UBound(TestEmail)
' .Recipients.Add (TestEmail(I))
.Recipients.Add(TestEmail(I)).type = olTo
Next I

End If

If Not IsMissing(cc) Then
TestEmail = Split(cc, ";")
For I = 0 To UBound(TestEmail)
' .Recipients.Add (TestEmail(I))
.Recipients.Add(TestEmail(I)).type = olCC
Next I
End If

If Not IsMissing(BCC) Then
' .Recipients.Add (BCC)
.Recipients.Add(BCC).type = olBCC
End If

If Not IsMissing(Subject) Then
.Subject = Subject
End If

If Not IsMissing(MessageText) Then
.Body = MessageText
End If

If IsNull(Vote) = False Then
.VotingOptions = Vote
End If

Select Case Urgency
Case 2
.Importance = olImportanceHigh
Case 0
.Importance = olImportanceLow
Case Else
.Importance = olImportanceNormal
End Select
.Recipients.ResolveAll

If EditMessage Then
.Display
Else
.Save
.Send
End If

End With
Set objOutlook = Nothing

End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top