Results 1 to 10 of 10
  1. #1
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do I bypass Outlook & use an IP addr for SMTP (2003)

    I need to bypass our default Outlook and use our SMTP IP address. Is there a
    way to set the IP address for our SMTP server so the SendObject will use that
    address and not the default.
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How do I bypass Outlook & use an IP addr for SMTP (2003)


  3. #3
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do I bypass Outlook & use an IP addr for SMTP (2003)

    Thank you Hans
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

  4. #4
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do I bypass Outlook & use an IP addr for SMTP (2003)

    Could it be that I ned another reference. I'm still getting the error
    'Fields update failed. For further information, examine the Status property of individual field objects.'
    on the .UPDATE. It's as if i don't have updating available to me. I did find an example where ADODB.Fields was used but when I use it ,update is not available.
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How do I bypass Outlook & use an IP addr for SMTP (2003)

    You need to set a reference to the Microsoft CDO n Library (n = 1.21 on my PC) or to the Microsoft CDO for Exchange n Library (n = version of Exchange you use).

    I'm sorry, I don't know anything about CDO, so I can't really help you with this.

  6. #6
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do I bypass Outlook & use an IP addr for SMTP (2003)

    Thanks for your help Hans.

    I'm using 'Microsoft CDO for Windows 2000 Library'.

    I'll look to see if there is a newer version that I need to use.
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

  7. #7
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do I bypass Outlook & use an IP addr for SMTP (2003)

    Hans,
    I'm having trouble understanding how to connect to CDO. When I run the code I get the attached error. Under MS/Access I'm not sure what I need to define FLDS as.

    ' Send by connecting to port 25 of the SMTP server.
    Dim iMsg
    Dim iConf
    Dim Flds
    Dim strHTML
    Const cdoSendUsingPort = 25
    set iMsg = CreateObject("CDO.Message")
    set iConf = CreateObject("CDO.Configuration")
    Set Flds = iConf.Fields
    ' Set the CDOSYS configuration fields to use port 25 on the SMTP server.
    With Flds
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "<nn.nn.nnn.nn>"
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
    .Update <font color=blue>' <==== Error is here</font color=blue>
    End With
    ' Build HTML for message body.
    strHTML = "<HTML>"
    strHTML = strHTML & "<HEAD>"
    strHTML = strHTML & "<BODY>"
    strHTML = strHTML & " This is the test HTML message body</br>"
    strHTML = strHTML & "</BODY>"
    strHTML = strHTML & "</HTML>"
    ' Apply the settings to the message.
    With iMsg
    Set .Configuration = iConf
    .To = "<bdkxxx@budget.state.ny.us>" 'ToDo: Enter a valid email address.
    .From = "<bdklans@budget.state.ny.us>" 'ToDo: Enter a valid email address.
    .Subject = "This is a test CDOSYS message (Sent via Port 25)"
    .HTMLBody = strHTML
    .Send
    End With

    ' Clean up variables.
    Set iMsg = Nothing
    Set iConf = Nothing
    Set Flds = Nothing

    MsgBox "Mail Sent!"



    Within Access i created a module and have changed the following

    Dim iMsg As CDO.Message
    Dim iConf As CDO.Configuration
    Dim Flds As ???????? '<======<font color=blue>Now sure what to do here</font color=blue>
    Dim strHTML As String

    <img src=/S/confused.gif border=0 alt=confused width=15 height=20>
    Edited a mail id.
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How do I bypass Outlook & use an IP addr for SMTP (2003)

    Flds should be a Variant, so you can use

    Dim Flds As Variant

    or

    Dim Flds

    since Variant is the default variable type. Try removing the < and > from the IP address:

    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "nn.nn.nn.nn"

  9. #9
    New Lounger
    Join Date
    Jan 2003
    Location
    Colorado Springs, Colorado, USA
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do I bypass Outlook & use an IP addr for S

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

    You might look at jmail http://www.dimac.net
    It makes it really easy to send e-mail without the hassle of mapi controls or other cumbersome means.

  10. #10
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How do I bypass Outlook & use an IP addr for S

    Thanks Mike.

    Sorry I didn't get back sooner but I've been on vacation.
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •