Undeliverable problem 
Author Message
 Undeliverable problem

Hi All,

I am using the following code in Access 2000 (pc is running Outlook 2K and
Windows 2K.) The code works most of the time but sometimes we get an error
"Unable to deliver the message due to a recipient problem"

I am not setting a recipient. The user is selected the recipient using the
To button on the mail form. If you go to the sent items folder a try to open
the message you get "Can't open this item. Unknown error"

Any help would be appreciated.

Jerry

    strSubject = "Requested Control Number(s)"
    Open "C:\message.txt" For Input As #newFileNumber

        strMessage = Input(LOF(newFileNumber), newFileNumber)
    Close #newFileNumber

    Call SendOutlookMail(strSubject, strMessage)

Private Sub SendOutlookMail(Subject As String, Message As String)

On Error GoTo errorHandler
Dim oLapp As Object
Dim oItem As Outlook.MailItem 'As Object

Set oLapp = CreateObject("Outlook.application")
Set oItem = oLapp.CreateItem(0)
oItem.Display

With oItem

   .Subject = Subject
   .Body = Message

End With

Set oLapp = Nothing
Set oItem = Nothing

Exit Sub



Sun, 02 May 2004 00:37:53 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Trap undeliverable email message

2. Reading the Body of an Undeliverable e-mail

3. unwanted emails retruned undeliverable

4. Monitor UnDeliverable Items?

5. Forwarding Undeliverable Messages

6. System Undeliverable

7. ___ATTN___DON THOMAS_____mail returned "undeliverable" please read

8. Trap undeliverable email message

9. What type of item is an undeliverable email message from the system administrator?

10. problems problems problems

11. Problems, Problems, Problems.....

12. Problem!Problem!Grid Problem!

 

 
Powered by phpBB® Forum Software