Email failure

SteveE

Registered User.
Local time
Today, 07:03
Joined
Dec 6, 2002
Messages
221
have a DB which is working fine on most PCs (approx 15 users) I do however have a problem sending emails from some machines (using a macro to do the send object as example below) The mail program used is Outlook 2000 / 2003

DoCmd.SendObject acReport, "Returns Notice", "SnapshotFormat(*.snp)", "to a defind list", True, ""
This works fine BUT on most machines but on a couple we get a fail message when attempting to send, this message is unspecific. I cannot find any different settings on the machines in question, the op system is 2000 / XP.

I operate the same program on my PC running XP prof servpk 2 and although 99% of the time the emails go through without issue I do sometimes have the same problem. Re-booting does not resolve it! and I can find no trend as to why I have the problem.
Any thought or advise welcome.
 
Steve,

You're not the only one, I'm having the same problem. Although, it seems to work most of the time, but occasionally the user is getting the same message. I haven't been able to get this error on my machine though. This one has me stumped :confused:

I tried to look through Outlook settings, but can't find anything.

-Ken
 
I use this code in the onclick event of a command button with no issues in either 2000 or 2003:


Dim email As String

Dim notes As String

'create variables for Outlook
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem


'Verify the various fields have entries
If IsNull(YourFieldName) Then
MsgBox "You have to enter something in Your Field!", , "Your Text Here!"
YourFieldName.SetFocus
End If

'^^^^^Repeat as necessary

'gathers information from the form. This sets the string variable to the fields
'email = Me!mail Field 'If you want to get the e-mail address from a field
Field = Me!YourField
Field1 = Me!YourField1
Field2 = Me!YourField2

'creates an instance of Outlook
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
'Set objEmail = objOutlook.CreateItem(OutlookMailItem)


'creates and sends email
With objEmail
.To = Someone@Somewhere.com 'Or - email ..... can be taken from a field as well
.Subject = "Your Subject Goes Here"
.Body = "Whatever you want in the body of your mail" & notes
' SetForegroundWindow = objOutlook

'.Display
.Send 'sends the email in Outlook. Change to DISPLAY if you want to be able to
'modify or see what you have created before sending the email


End With
 

Users who are viewing this thread

Back
Top Bottom