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

Remove the need of Smtp.Host config when using PickupDirectoryLocation #11548

Merged
merged 4 commits into from
Dec 14, 2021

Conversation

mikecp
Copy link
Contributor

@mikecp mikecp commented Oct 29, 2021

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes #11249 (addition to current fix)

Description

In the continuation of PR #11253 that was merge a few days ago, I noticed afterwards that when using the PickupDirectoryLocation SMTP setting, the "forgot password" link on the backoffice login page would only be displayed in case we also specified a Host in the SMTP settings, which is kind of illogic.

This PR solves that issue and now the display of the "forgot password" link on the login page is displayed when either Host, either PickupDirectoryLocation is specified.

Testing:

Specify a valid PickupDirectory location and a From address in the appsettings.json (or appsettings.development.json), cf. example below , and check that the "forgot password" link is displayed on the login screen.

"Umbraco": {
"CMS": {
"Examine": {
"LuceneDirectoryFactory": "TempFileSystemDirectoryFactory"
},
"Global": {
"Smtp": {
"PickupDirectoryLocation": "D:\Mails Pickup",
"From": "[email protected]",
//"Host": "localhost"
// "Port": "25"
}
},

@shearer3000
Copy link

hello- should this be fixed in umbraco 9.1.0 now? I tried the following settings and the 'forgot password' link still doesn't show:

"Smtp": { "From": "[email protected]", "DeliveryMethod": "SpecifiedPickupDirectory", "PickupDirectoryLocation": "C:\\Temp\\MailDrop\\" }

thanks
Andrew

@mikecp
Copy link
Contributor Author

mikecp commented Nov 19, 2021

Hi @andrewdeans ,

This PR has not been merged yet, so it is not available in umbraco 9.1.0. Let's hope it makes it to 9.2.0 😁🤞

Cheers,

Michael.

@shearer3000
Copy link

ok thanks @mikecp yes lets hope 🤞

@harvzor
Copy link
Contributor

harvzor commented Jan 18, 2022

Seems to work in Umbraco 9.2!

My project has been upgraded from version 7 and I was using SmtpClient to send email before. This client didn't seem to take notice of my appsettings.json setup:

{
  "Umbraco": {
      "Global": {
        "Smtp": {
          "DeliveryMethod": "SpecifiedPickupDirectory",
          "PickupDirectoryLocation": "C:\\D\\Dev\\Tech\\artists-name-plates\\Mail",
          "From": "[email protected]"
        }
      }
    }
  }
}

I switched to using IEmailSender (as documented here https://codeshare.co.uk/blog/how-to-send-emails-in-umbraco-9-using-iemailsender/) and it finally worked.

Thanks!

@mikecp
Copy link
Contributor Author

mikecp commented Jan 18, 2022

Hey @harvzor , glad you got it working 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The SMTP PickupDirectoryLocation option doesn't do anything
4 participants