Send Email from Access changing email address in From to be different than sending address

T

tomlebold

I have an Access form that sends an email to the email address in a
text box on the form.
Would like the From in the email received to be different than who sent
it.
The SentOnBehalfOfName properties results in System Administrator
invalid email address.

Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

objOutlookMsg.To = Me.EmailAddress
objOutlookMsg.Body = Me.Comments

objOutlookMsg.SentOnBehalfOfName = "(e-mail address removed)"

objOutlookMsg.Send
<
 

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