Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlDatabaseMail: Support for SMTP server credentials #1215

Open
NReilingh opened this issue Sep 5, 2018 · 1 comment · May be fixed by #1374
Open

SqlDatabaseMail: Support for SMTP server credentials #1215

NReilingh opened this issue Sep 5, 2018 · 1 comment · May be fixed by #1374
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.

Comments

@NReilingh
Copy link
Contributor

Details of the scenario you tried and the problem that is occurring

The SqlServerDatabaseMail resource only supports connecting to SMTP servers that do not require authentication, and does not allow for defining a username and password for the SMTP connection. Depending on the user's environment, this could be a requirement of using DatabaseMail, but another example use case would be for using an email testing service like mailtrap.io, which uses unique SMTP credentials to send incoming emails to one organization's user account or another.

Verbose logs showing the problem

N/A

Suggested solution to the issue

Microsoft.SqlServer.Management.Smo.Mail.MailServer contains settable properties for UseDefaultCredentials and UserName, and provides a method for SetPassword.

Rudimentary testing suggests that if the account requires a password, it must be set for the SMO object regardless of which property is being altered, else the password for the account is unset.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

N/A

SQL Server edition and version the target node is running

N/A

SQL Server PowerShell modules present on the target node

N/A

The operating system the target node is running

N/A

Version and build of PowerShell the target node is running

N/A

Version of the DSC module that was used ('dev' if using current dev branch)

dev

@johlju johlju added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Sep 6, 2018
@johlju
Copy link
Member

johlju commented Sep 6, 2018

A great enhancement! Love to see PR for this. 🙂

@t3mi t3mi linked a pull request Jun 6, 2019 that will close this issue
9 tasks
@johlju johlju changed the title SqlServerDatabaseMail: Support for SMTP server credentials SqlDatabaseMail: Support for SMTP server credentials Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants