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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook message "...sending email on your behalf..." 1

Status
Not open for further replies.

Kanaan

MIS
Apr 9, 2002
58
US
Hi!

I have a group of users that recently received new PCs with Windows 2000 Pro, Outlook 2000 and Access 97. They have an Access 97 database that is a main part of their job. A feature that the developer added to this database was that it sends email out when a job is assigned through the database.

However, with these new PCs the users are now getting a message each time Access tries to send the email, "a program is trying to send an email on your behalf..." If they wait a minute, it eventually sends it but the message is becoming a nuisance.

Any ideas on how to get rid of it? Thanks!
 
Any help here?
A program is trying to access e-mail addresses
thread605-806280
 
Actually, I already read through that other thread and it was close but no cigar. I am not getting a message that another program is trying to access email addresses in Outlook. Instead, it is "another program is trying to send messages on your behalf."

Word is not selected as the email editor. We don't have SpamNet, or any other third party anti-spam software installed as mentioned in that other thread.

Yes, Office 2000 SP3 IS installed and if that is the cause of the issue, I will try uninstalling Office and reinstalling it with SP2.

Thanks!
Phil
 
I wasn't paying attention (you did specify Outlook 2K). You can find several discussions of this between here and the Office forum (forum68). As you already seem to have surmised, this is a result of the SP. Here's one recent discussion: thread605-761383
 
Kanaan, I have found several ways to get rid of the annoying security prompt. The solutions depend on whether the email that is being sent from Access contains attached objects, such as a report or a query. Are they using DoCmd.SendObject to send the email message? If it is necessary to send an MSAccess object as an attachment, then I probably can't help you...I need a solution to this issue. However, if there is no need for an attachment or if the attachments (if necessary) are stored on the PC or network, then the following may help.

Two references have to be registered. They are 1) Microsoft ActiveX Data Object 2.5 Library and 2) Microsoft CDO For Exchange 2000 Library.

Public Sub Send_Email()
On Error GoTo err_routine

Dim iConf As New CDO.Configuration
Dim Flds As ADODB.Fields
Set Flds = iConf.Fields

' The full field name strings are used below to illustrate this process.
' The CDO for Windows 2000 type library contains string Modules
' that provide these values as named constants.
' Use these module constants to avoid typos and so on.

Flds(" = "1.1.1.1" ' email server IP address
Flds(" = 25 ' default port
Flds(" = cdoSendUsingPort ' CdoSendUsing enum value = 2
Flds(" = "MyAccountName"
Flds(" = "myemailaddress@mydomain.com" ' your email address <example@example.com>"
Flds(" = cdoBasic

' IMPORTANT: Storing user names and passwords inside source code
' can lead to security vulnerabilities in your software. Do not
' store user names and passwords in your production code.

Flds(" = "uid" ' your domain\username
'**** this is your user name that is used to log on to your desktop
Flds(" = "pwd" ' your password
Flds.Update ' this is your password that is used to log on to your desktop.

Dim iMsg As New CDO.Message
Set iMsg.Configuration = iConf
With iMsg
.To = "email1@domain1.com"
.From = "myemailaddress@mydomain.com"
.Subject = "MySubject"
.TextBody = "MyMessage."
.AddAttachment "c:\temp\fileattachment.xls"
.Send
End With

Set iMsg = Nothing

Exit Sub

exit_routine:
Exit Sub

err_routine:

MsgBox Err.Number & ": " & Err.Description
Resume exit_routine

End Sub


I hope this helps.

If anyone knows how to attach an Access object and get around this, please let me know.
 
Hello everyone,

I am using code similar to this. A new client has lots of databases that used dif code and can't shortly because of an upgrade from Access 97 to 2003, so they are going to use this code. However, a lot of their DBs store user names rather than email addresses. Is there a way with this code to automatically resolve the email address from the user name?

Thanks everyone.

~SoulErrant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top