Outlook Auto Email (1 Viewer)

Jack III

Registered User.
Local time
Today, 19:02
Joined
Jan 7, 2004
Messages
17
Does anyone know how to disable the warning message from Outlook when sending an auto email from access?

Thanks!
 
Which warning message is that?

Is it blocking attachments? If so, you will need to amend your registry settings. Let me know the wording of your message.
 
e-mail warning message

I have an auto email being sent on an "After Update" and a warning message comes up and says that a program is attempting to send a message, would you like to continue? If you select yes, it sends the message.

I would like to disable the warning.

Thanks!
 
Is this message actually coming from outlook? Are you sure the warning is not coming from a firewall (ie ZoneAlarm)
 
I also think it may be Zone Alarm giving the warning

I get the same message when sending mine.
 
zone alarm

is there a way to disable the zone Alarm?
 
What code are you using to send the mail?
 
Yep Sounds like good old ZA to me --- had similar prob, tell ZA what u r doing and it should go away.
 
any suggestions would be appreciated


Private Sub Move_Completed_AfterUpdate()
Dim NameSpace As Object
Dim EmailSend As TaskItem 'for the task item
Dim EmailApp As Object
Dim strProjectID As Integer
Dim strEmail As Object


Set strEmail = Me.Email
Set strID = Me.Project_ID
Set EmailApp = CreateObject("Outlook.Application") 'outlook object
Set NameSpace = EmailApp.getNameSpace("MAPI")
Set EmailSend = EmailApp.CreateItem(3) 'CreateItem(0)Mail Item
'CreateItem(1)Appointment Item
'CreateItem(2)Contact Item
'CreateItem(3)Task Item
'CreateItem(4)Journal Item
'CreateItem(5)Note Item
'CreateItem(6)Post Item
'CreateItem(0)Dist. List Item

EmailSend.Subject = "Update for Project" & " " & strID 'task subject
EmailSend.Body = "The Move is complete for Project" & " " & strID 'task body
EmailSend.Recipients.Add (strEmail) 'first add the email or user as a recipient

EmailSend.Display ' Remove if you don't want to view email before being sent.
EmailSend.Assign 'assign previously added recipient to the task
EmailSend.Send 'send the task
End Sub
 
It's not ZA it's Outlook's Automation Security

Does anyone know the code to get by Outlooks Automation Security?

Thanks
 
Try adding
Code:
      Set EmailApp = Nothing
      Set NameSpace = Nothing
      Set EmailSend = Nothing
under your code "EmailSend.Send 'send the task"
 
Thanks for the Input, but it didin't work for me

thanks
 
Outlook Email

This works for me:


Private Sub Email()
On Error GoTo Email_Err

Dim myOlApp As Outlook.Application
Dim myItem As Outlook.MailItem
Dim strTo As String
Dim strCCs As String
Dim strFileName As String
Dim strPathName As String
Dim strReportName As String
Dim myAttachments As Attachments
Dim BodyMsg As String

'Open or use Outlook
Set myOlApp = New Outlook.Application
Set myItem = myOlApp.CreateItem(olMailItem)


strTo = "my email address "

'if you want an attachment do this,
'create doc file for sending as an attachment
DoCmd.OutputTo acOutputReport, strReportName, acFormatRTF, strInputFile
BodyMsg = "some message" & vbCrLf & vbCrLf & vbCrLf

'This Creates an Outlook attachment
Set myAttachments = myItem.Attachments
With myAttachments
.Add strPathName & strFileName
End With

With myItem
.To = strTo
.CC = strCCs
.subject = "some subject"
.Body = BodyMsg
.Display
End With


Set myOlApp = Nothing
Set myItem = Nothing


Exit_Email_Click:
Exit Sub
Email_Err:
MsgBox "Default email program could not be started." & vbCrLf & "Please check your settings.", vbCritical, "Email Error"
Resume Exit_Email_Click
End Sub
 
Here's a work around

The code below works. Does anyone know if you can capture the sender's e-mail automatically without specifying in the code?


Const cdoSendUsingPort = 2
Const cdoSendUsingPickup = 1
Const strSmartHost = "AppEmail.Tgt.Com"


dim OMsg
Set OMsg = CreateObject("CDO.Message")
Set Iconf = OMsg.Configuration
With iConf.Fields
.item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
.Update
End With


oMsg.To = "jack.lapan@target.com"
oMsg.From = "jack.lapan@target.com"
oMsg.Subject = "Test"
oMsg.HTMLBody = "test"
oMsg.Send

Set oMsg = Nothing
set Iconf = nothing

Msgbox("Done")
 
almost

I get an error that says "default e-mail program could not be started please check your settings. Any suggestions?
 
Did you set a reference to the Outlook 10.0 object library?
 

Users who are viewing this thread

Back
Top Bottom