Automatic email conflict

G

Guest

I'm working with a database that automatically sends a email message when new
issue are submitted. When recently changed from a Pop3 Server to the
Microsoft Exchange Server. Now when a question is submitted, noone gets sent
a email. I get a error message, "You do not have the permission to send the
message on behalf of the specified user."
Below is some off the code...

Set objOutlook = Outlook.Application
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
.subject = "New Submission"
.Importance = olImportanceHigh
.To = "(e-mail address removed);[email protected]"
.sentonbehalfofname = "(e-mail address removed)"
.htmlbody
"
"
.send
End With
 
S

Sue Mosher [MVP-Outlook]

Change the SentOnBehalfOfName value to the name of a user that the currently logged in Outlook user *does* have permission to send on behalf of.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Well, I'm a user. When I submit a question, that's when I get that error
message. I'm a authorized user.
 
S

Sue Mosher [MVP-Outlook]

The key issue is whether (e-mail address removed) resolves to an Exchange mailbox user who has Send On Behalf Of permission for the currently logged in mailbox user. Whether that's the case is not clear from what you've posted so far.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Thanks for all the advice. Removing the sentonbehalfof, fix the problem. Now
the program is working again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top