Hooks; i am my exchange admin!!!! ha ha and i have tried searching the microsoft sites and even looked through and Outlook forum, but to no avail i haven't been able to search for the option to disable it. Maybe you can ask your exchange guys for me??
I have also been working on IzyRider's idea of using redemption but have had a few errors in my code if someone can help. I am trying to create an instance of the Outlook.Application object explicitly. But having a compile error which i have highlighted in red any ideas?
The code that i was using before trying redemption is commented out.
Public Function SendEMail()
Dim db As DAO.Database
Dim MailList As DAO.Recordset
Dim SafeItem, oItem
'Dim MyOutlook As Outlook.Application
'Dim MyMail As Outlook.MailItem
Dim Subjectline As String
Dim BodyFile As String
Dim fso As FileSystemObject
Dim MyBody As TextStream
Dim MyBodyText As String
Set fso = New FileSystemObject
'Set MyOutlook = New Outlook.Application
Set db = CurrentDb()
Set MailList = db.OpenRecordset("QryCustomerReceiveEmailNewsletter")
Do Until MailList.EOF
Set SafeItem = CreateObject("Redemption.SafeMailItem")
'Create an instance of Redemption.SafeMailItem
Set OutlookApp = CreateObject("
Outlook.Application”)
'Sets application as Outlook
Set NS = OutlookApp.GetNamespace(“MAPI”)
NS.Logon
Set oItem = Application.CreateItem(0)
'Create a new message
SafeItem.Item = oItem
'set Item property
'Set MyMail = MyOutlook.CreateItem(olMailItem)
SafeItem.To = MailList("EMailAddress")
Subjectline$ = "Harrodian Flyer NewsLetter"
BodyFile$ = "c:\harrodianNewsLetter\EmailBody.txt"
' Check to make sure the file exists...
If fso.FileExists(BodyFile$) = False Then
MsgBox "The body file isn't where you say it is. " & vbNewLine & vbNewLine & _
"Quitting...", vbCritical, "I Ain't Got No-Body!"
Exit Function
End If
' Since we got a file, we can open it up.
Set MyBody = fs

penTextFile(BodyFile, ForReading, False, TristateUseDefault)
' and read it into a variable.
MyBodyText = MyBody.ReadAll
' and close the file.
MyBody.Close
'.Importance = olImportanceHigh 'High importance
'This gives it a subject
SafeItem.Subject = Subjectline$
'This gives it the body
SafeItem.Body = MyBodyText
'If you want to send an attachment
'uncomment the following line
' SafeItem.Attachments.Add "c:\harrodianNewsLetter\Harrodian Flyer Issue 2 .pdf", olByValue, 1, "Harrodian Flyer Issue 2"
'This sends it!
SafeItem.Send
'instead of automaticially sending it
'Uncomment the next line to see the email
'And comment the " SafeItem.Send" line above this.
' SafeItem.Display
'And on to the next one...
MailList.MoveNext
Loop
'Cleanup after ourselves
Set SafeItem = Nothing
'Uncomment the next line if you want Outlook to shut down when its done.
'Otherwise, it will stay running.
'MyOutlook.Quit
'Set MyOutlook = Nothing
MailList.Close
Set MailList = Nothing
db.Close
Set db = Nothing
End Function