Answer the question
In order to leave comments, you need to log in
How to send an email with an attachment?
Good afternoon, how to send a letter to the task scheduler with an attachment in the form of any file from a specific directory, only using the OS itself?
Answer the question
In order to leave comments, you need to log in
On Windows, PowerShell or VisualBasicScript is included in the standard installation.
Option Explicit
Dim objMessage
Set objMessage = WScript.CreateObject("CDO.Message")
objMessage.Subject = "Subject"
objMessage.From = "Sender"
objMessage.To = "Receiver"
objMessage.TextBody = "Message body "
objMessage.AddAttachment " C:\folder\file"
{...}
In Linux, with a basic installation, in my opinion, the functionality is not enough, but sendmail is installed from native repositories, for example.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question