Skip to content

SmtpClient doc correction for .net core. Fixes #4705 - #4706

Merged
rpetrusha merged 2 commits into
dotnet:masterfrom
maryamariyan:fix-smtpclient
Mar 21, 2018
Merged

rpetrusha merged 2 commits into
dotnet:masterfrom
maryamariyan:fix-smtpclient

Conversation

@maryamariyan

Copy link
Copy Markdown
Contributor

Summary

SmtpClient doc correction for .net core.

Fixes #4705

cc: @mairaw

@rpetrusha rpetrusha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for adding information on .NET Core, @maryamariyan. I've made a couple of comments and suggestions.

Comment thread xml/System.Net.Mail/SmtpClient.xml Outdated
To include an attachment with an email message, first create the attachment by using the <xref:System.Net.Mail.Attachment> class, and then add it to the message by using the <xref:System.Net.Mail.MailMessage.Attachments%2A?displayProperty=nameWithType> property. Depending on the email reader used by the recipients and the file type of the attachment, some recipients might not be able to read the attachment. For clients that cannot display the attachment in its original form, you can specify alternate views by using the <xref:System.Net.Mail.MailMessage.AlternateViews%2A?displayProperty=nameWithType> property.

You can use the application or machine configuration files to specify default host, port, and credentials values for all <xref:System.Net.Mail.SmtpClient> objects. For more information, see [&lt;mailSettings&gt; Element (Network Settings)](~/docs/framework/configure-apps/file-schema/network/mailsettings-element-network-settings.md).
In .NET Framework you can use the application or machine configuration files to specify default host, port, and credentials values for all <xref:System.Net.Mail.SmtpClient> objects. For more information, see [&lt;mailSettings&gt; Element (Network Settings)](~/docs/framework/configure-apps/file-schema/network/mailsettings-element-network-settings.md). But in .NET Core we don't support setting defaults. As a workaround you need to set the relevant properties on SmtpClient directly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • comma after .NET Framework
  • The .NET Core sentence should be rephrased to remove "But" and "we": ".NET Core does not support setting defaults. As a workaround, you must set the relevant properties on SmtpClient directly.
  • fence SmtpClient (`SmtpClient`)

@maryamariyan maryamariyan Mar 20, 2018 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks @rpetrusha . How do I fence SmtpClient?
this way: SmtpClient
or
this way: < xref:System.Net.Mail.SmtpClient >

@rpetrusha

Copy link
Copy Markdown
Contributor

Incidentally, @maryamariyan, it wasn't necessary to open an issue, since this is a minor correction.

@rpetrusha

Copy link
Copy Markdown
Contributor

This looks good. Thanks for making the additional changes, @maryamariyan. We'll merge now.

@rpetrusha
rpetrusha merged commit 28cc5d1 into dotnet:master Mar 21, 2018
@mairaw mairaw added this to the Sprint 133 (3/17/18 - 4/06/18) milestone Mar 22, 2018
@mairaw mairaw assigned maryamariyan and unassigned maryamariyan Mar 22, 2018
@mairaw mairaw removed this from the Sprint 133 (3/17/18 - 4/06/18) milestone Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants