Title: Send-MailMessage incorrectly handling ValueFromPipelineByPropertyName parameters · Issue #7591 · PowerShell/PowerShell · GitHub
Open Graph Title: Send-MailMessage incorrectly handling ValueFromPipelineByPropertyName parameters · Issue #7591 · PowerShell/PowerShell
X Title: Send-MailMessage incorrectly handling ValueFromPipelineByPropertyName parameters · Issue #7591 · PowerShell/PowerShell
Description: The current implementation is processing parameters in BeginProcessing. While this works for parameters that are explicitly passed to the cmdlet, it fails for parameters that are populated form properties of the pipeline object because p...
Open Graph Description: The current implementation is processing parameters in BeginProcessing. While this works for parameters that are explicitly passed to the cmdlet, it fails for parameters that are populated form pro...
X Description: The current implementation is processing parameters in BeginProcessing. While this works for parameters that are explicitly passed to the cmdlet, it fails for parameters that are populated form pro...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/7591
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Send-MailMessage incorrectly handling ValueFromPipelineByPropertyName parameters","articleBody":"The current implementation is processing parameters in BeginProcessing. While this works for parameters that are explicitly passed to the cmdlet, it fails for parameters that are populated form properties of the pipeline object because parameters are not set until the pipeline object is sent to ProcessRecord.\r\n\r\nThe logic for parameters bound from the pipleline needs to be moved to ProcessRecord.\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n```powershell\r\n$object = [PSCustomObject]@{To = $address; From = $address; Subject = $subject; Body = $body; SmtpServer = '127.0.0.1'}\r\n$object | Send-MailMessage\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\nThe mail is sent.\r\n\r\nActual behavior\r\n---------------\r\nSystem.ArgumentNullException: Value cannot be null\r\nParameter name: address\r\n","author":{"url":"https://github.com/dantraMSFT","@type":"Person","name":"dantraMSFT"},"datePublished":"2018-08-21T21:13:35Z","url":"https://github.com/PowerShell/PowerShell/issues/7591"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3ab660f1-e540-2bf0-9089-bc2c3ef0d6b8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9302:2ADB95:3CBDBB:56C314:6AFD6CCB |
| html-safe-nonce | c023a7cdd92208d72440853c940b0bfa941e2b7d99fac6506a75a340cb97f71d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzAyOjJBREI5NTozQ0JEQkI6NTZDMzE0OjZBRkQ2Q0NCIiwidmlzaXRvcl9pZCI6IjU5MjgyMzM2MDY4Njk1MTEzNzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3e66e1e56691fee7648cc44d06a7674e8bc359af01b322da0f2d7cf7a9dd1eee |
| hovercard-subject-tag | issue:352712501 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/7591/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9110ac30507f21f548a62e7c0edea353785445a2ba4651ce526e26b43129a2a6/PowerShell/PowerShell/issues/7591 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9110ac30507f21f548a62e7c0edea353785445a2ba4651ce526e26b43129a2a6/PowerShell/PowerShell/issues/7591 |
| og:image:alt | The current implementation is processing parameters in BeginProcessing. While this works for parameters that are explicitly passed to the cmdlet, it fails for parameters that are populated form pro... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dantraMSFT |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9985ca2e21b59673104d4d830d4afeb946c67f248f273ab2e824c31c8db46e4a |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0db9e8d463c3f4540570e6ad3c501a06db9dc02a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width