Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 251495

Re: Formating output to mail

$
0
0

In which application is the attachment opened ?

It depends also on the application how the LF or CR-LF is interpreted.

There is for example a difference between Notepad and Wordpad.

 

Btw the Send-MailMessage cmdlet is a lot easier to use.

 

Try something like this

 

Start-Transcript-Path$Filename
...
Stop-Transcript

[
string]::Join("`r`n",(Get-Content$Filename)) |Out-File$Filename
Send-MailMessage
-From$EmailFrom-To$EmailTo-Subject$EmailSubject-SmtpServer$SMTPSRV-Attachments$Filename

Viewing all articles
Browse latest Browse all 251495

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>