A
A
Anton Ulanov2017-06-07 16:44:13
Windows
Anton Ulanov, 2017-06-07 16:44:13

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

2 answer(s)
D
Dmitry, 2017-06-07
@Tabletko

send mail + powershell

R
Roman Molchanov, 2017-06-07
@Dobryak88

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 question

Ask a Question

731 491 924 answers to any question