8000 Add Obsolete message to Send-MailMessage by TravisEz13 · Pull Request #9178 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Add Obsolete message to Send-MailMessage#9178

Merged
TravisEz13 merged 7 commits intoPowerShell:masterfrom
TravisEz13:marke_send_mailmessage_obsolete
Mar 22, 2019
Merged

Add Obsolete message to Send-MailMessage#9178
TravisEz13 merged 7 commits intoPowerShell:masterfrom
TravisEz13:marke_send_mailmessage_obsolete

Conversation

@TravisEz13
Copy link
Member
@TravisEz13 TravisEz13 commented Mar 20, 2019

PR Summary

Add Obsolete message to Send-MailMessage

PR Context

See PowerShell/PowerShell-RFC#160

PR Checklist

/// <summary>
/// Implementation for the Send-MailMessage command.
/// </summary>
[Obsolete("This cmdlet only supports sending mail from insecure SMTP servers. While there is no immediate replacement available in PowerShell, we recommend you do not use Send-MailMessage at this time.")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"from"? Maybe "insecure connect to"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pinged @joeyaiello who wrote the message

@TravisEz13 TravisEz13 marked this pull request as ready for review March 21, 2019 18:55
/// <summary>
/// Implementation for the Send-MailMessage command.
/// </summary>
[Obsolete("This cmdlet only supports sending mail from insecure SMTP servers. While there is no immediate replacement available in PowerShell, we recommend you do not use Send-MailMessage at this time.")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add test to validate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WarningVariables does not capture this warning.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try using powershell.invoke and then check the streams.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have a xUnit test suite for all public APIs to have API contract.


$null = $powershell.AddCommand("Send-MailMessage").AddParameters($InputObject).AddParameter("ErrorAction","SilentlyContinue")

#Send-MailMessage @InputObject -ErrorAction SilentlyContinue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this.

TravisEz13 and others added 2 commits March 22, 2019 10:18
…d-MailMessage.cs

Co-Authored-By: TravisEz13 <travis.plunk@microsoft.com>
…d-MailMessage.cs

Co-Authored-By: TravisEz13 <travis.plunk@microsoft.com>
@TravisEz13 TravisEz13 requested a review from SteveL-MSFT March 22, 2019 19:05
@TravisEz13 TravisEz13 merged commit 94616f1 into PowerShell:master Mar 22, 2019
@TravisEz13 TravisEz13 deleted the marke_send_mailmessage_obsolete branch March 22, 2019 19:52
@TravisEz13 TravisEz13 added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Mar 22, 2019
@TravisEz13 TravisEz13 added this to the 6.2.0-GA-Consider milestone Mar 22, 2019
TravisEz13 added a commit that referenced this pull request Mar 25, 2019
Add Obsolete message to Send-MailMessage

## PR Context

See PowerShell/PowerShell-RFC#160

Co-authored-by: Steve Lee <slee@microsoft.com>
Co-authored-by: Ilya <darpa@yandex.ru>
# Conflicts:
#	test/powershell/Modules/Microsoft.PowerShell.Utility/Send-MailMessage.Tests.ps1
@TravisEz13 TravisEz13 modified the milestones: 6.2.0-GA-Consider, 6.2.0 Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0