Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fourfinger 24 posts 44 karma points
    Mar 09, 2012 @ 11:07
    Fourfinger
    0

    Umbraco password storage

    Hello guys,

    First let me say, happy weekend! ;-)

    I'm working on this website in Umbraco, and I've built a usercontrol that contains a contactform, which will send an email on submit. Now, I'm trying to make it as generic as possible, and my question now is wether it's safe or not to store the password to an smtp server in the dictionary?

     

    Grtz, Christophe

  • Mike Chambers 636 posts 1253 karma points c-trib
    Mar 09, 2012 @ 11:40
    Mike Chambers
    0

    Why not hash/encrypt it before storing it in the dictionary if you are concerned about security... I might be tempted not to store in the dictionary at all though as that is designed to be a front end facing repository...

    Are you wanting to be able to have multiple smtp servers for sending of different emails across a single umbraco site? If not then storing the smtp info in the web.config should be safe? (if you go this route then you don't even have to worry about coding smtp locations etc in your mail obj... mail.send() will just use these as the default settings...

     

    [you can also combine witht the umbracosettings.config to use the default notification system settings

     

    <notifications>

          <!-- the email that should be used as from mail when umbraco sends a notification -->

          <email>XXX</email>

          <displayname>XXX</displayname>

        </notifications>

    I've extended that to include the display name... default umbraco installation would only have the email address

    so code behind something like

    mailobj.fromaddress = new MailAddress(umbraco.UmbracoSettings.NotificationEmailSender, umbraco.UmbracoSettings.GetKey("/settings/content/notifications/displayname"));

     

       

           

               

         

       

     

  • Fourfinger 24 posts 44 karma points
    Mar 09, 2012 @ 12:03
    Fourfinger
    0

    Ah wonderful! That might be a better/more proper solution! Thanks! I'll give implementing  it a shot right away! :) Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft