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

Undelivered mail notification sends to group mailbox 1

Status
Not open for further replies.

MikeAuz1979

Programmer
Aug 28, 2006
80
AU
Hi,

Using access 2000 and outlook 2003 I'm using the below code to send emails from an outlook group mailbox(all good)

The problem with this is the sent email is still in my email box and any undelivereds return to me also. Does anyone have any idea how I can get emails to send from the group box, have the sent mail saved in the group mailbox and all undelivered mail notifications also saved in the group mailbox. (The reason behind this is I'm automatically sending emails on behalf of the whole sales team but we want them to monitor sucessful/failed sending as well as any undelivereds.)

Thanks for any help
Mike

---Code Start (Assembled from various help sources)---
Sub SendMail(Recip, ccRecip, ReplyTo, Sender)
Dim subject, bodytext As String
Dim objOutlook, olMailItem, objEMail As Variant

Set objOutlook = CreateObject("outlook.application")
Set objEMail = objOutlook.CreateItem(olMailItem)

With objEMail
.To = Recip
.SentOnBehalfOfName = Sender
.cc = ccRecip
.subject = subject
.body = bodytext
.Save
.send
End With

Set objOutlook = Nothing
Set objEMail = Nothing

End Sub
 
Thanks Remou!

It will take me a while to check this out but great research.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top