Help:Run-time error while implementing code:protocol unknown

Hello everyone,
Iam trying to implent a code that sends e-mail attachments.
Code is here

I am getting the following error at Msg.send.

“-2146697203(8000c000d): the specified protocol is unknown”

Has anyone faced this kind of problem?
Any comment is highly appreciated.


john_ed (BOB member since 2004-09-08)

I know I’m kicking up a very old thread, but I just thought it would be interesting for anyone who (like me) hits upon this through Google.

The issue may be that, while Microsoft specifies that you need to provide a URL to the file you want to attach, you can also provide a normal path. When I do this, it works for me.

Here’s the code I used:

    With iMsg
        Set .Configuration = iConf
        .To = toname
        .From = fromname
        .Subject = "test mail"
        .TextBody = "this is a test mail with attachment"
        .AddAttachment "c:\winnt\comsetup.log"
        .send
    End With

I used a couple literals to test it, but of course, you can replace these with any string specifier you want (string variables, string constants).

Hope this helps anyone.

regards,
peter


peterh (BOB member since 2005-06-02)