1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Sending Email through VBA

Discussion in 'Software Development' started by eWreck, Nov 16, 2004.

Thread Status:
Not open for further replies.
Advertisement
  1. eWreck

    eWreck Thread Starter

    Joined:
    Nov 3, 2003
    Messages:
    44
    Previously i was helped with code to send a static email through outlook express. Which work perfectly in my home network but when I took it to my work network I could not get the emails to send. Here is the code that worked at my network at home:

    Code:
    Public Sub Email()
    
        Dim iMsg As Object
        Dim iConf As Object
        Dim WBname As String
        Set iMsg = CreateObject("CDO.Message")
        Set iConf = CreateObject("CDO.Configuration")
     
        With iMsg
            Set .Configuration = iConf
            .To = "[email protected]"
            .CC = ""
            .BCC = ""
            .From = """test"" <[email protected]>"
            .Subject = "test"
            .TextBody = "message"
            .AddAttachment ""
            .send
            End With
        
        End Sub
    The only major difference that is obvious, is the email at the office requires SPA where as my home network does not. Any thoughts Would be great!

    Eric
     
  2. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    Does your work server allow email relaying? Did you have an SMTP server running at home that sent the email?
     
  3. eWreck

    eWreck Thread Starter

    Joined:
    Nov 3, 2003
    Messages:
    44
    relaying might be part of the problem, I was Setting up outlook express and the email going out would give me error: 550 relaying prohibited.
    At home I use just the isp's email servers.
     
  4. eWreck

    eWreck Thread Starter

    Joined:
    Nov 3, 2003
    Messages:
    44
    I don't know what that means though.
    is there a workaround? Also the way I had to set up outlook express is: For the username I had to enter the network name and user name ie... network/user.
    Does this mean anything to the way the code is used to send emails?

    Thanks,
    Eric
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/297097

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice