Copied to clipboard

Flag this post as spam?

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


  • Q-ten 16 posts 116 karma points
    Aug 21, 2017 @ 10:26
    Q-ten
    0

    web.config not being updated on package install

    I've installed PerplexMail but I can't send a test email because I get the following error:

    An error occured while sending the testmail. Please try again: A valid master key must be provided. Place the key in the AppSettings section of the web.config with the name 'PerplexMailMasterKey' (logging error) <== Failure sending mail. <== Unable to connect to the remote server
    

    I've checked the web.config and it has no PerplexMail entries at all. The documentation says that there will be 6 new entries added. Though the closest sounding setting in the documentation is perplexMailEncryptionKey rather than PerplexMailMasterKey. So maybe I'm looking at old documentation.

    But still, something is wrong when I can use it immediately after install.

    Any suggestions?

    Thanks, Q

  • Q-ten 16 posts 116 karma points
    Aug 21, 2017 @ 10:41
    Q-ten
    0

    An update:

    I disabled automated logging and tried again. This time a different error:

    An error occured while sending the testmail. Please try again: Failure sending mail. (logging error) <== Failure sending mail. <== Unable to connect to the remote server
    

    Why does it need to connect to a remote server?

  • [email protected] 406 posts 2135 karma points MVP 7x c-trib
    Aug 21, 2017 @ 10:48
    jeffrey@umarketingsuite.com
    0

    Hi Q,

    I have no idea why the keys aren't added at install, but you can add them yourself too.

    If you add these to your web.config, it will probably work a lot better :)

    Regards, Jeffrey

  • Q-ten 16 posts 116 karma points
    Aug 21, 2017 @ 10:54
    Q-ten
    0

    Thanks Jeffery,

    I'm not really sure what form they should be in. Do you have an example web.config snippet?

    I can create my own GUIDs if that's the format. (Obviously I don't want you to publish secret keys).

    Could the 'remote server' error be a port issue? I just tried sending via code and got this exception error:

    No connection could be made because the target machine actively refused it 127.0.0.1:25
    

    Q

  • Q-ten 16 posts 116 karma points
    Aug 21, 2017 @ 11:06
    Q-ten
    0

    I'm working on an Umbraco cloud site. It uses their recommended installer script that separates the project into a 'web site' project and a 'application' project in Visual Studio.

    Could I have problems because it's not a 'web application'?

  • Q-ten 16 posts 116 karma points
    Aug 21, 2017 @ 11:27
    Q-ten
    0

    I found the UpgradeWebConfig() method in the Installer.cs file in the source code and hackily ran that in my startup events code.

    It worked. Generated the changes in my web.config with no errors. My guess is that it never got called during installation of the package.

    I still have the problem of being 'unable to connect to the remote server' (which I think is just my local machine).

  • Q-ten 16 posts 116 karma points
    Aug 21, 2017 @ 13:53
    Q-ten
    100

    Update: I've now got it all working after including the source project and debugging it.

    The 'cant connect to remote server' error is just because I am a noob and haven't been the one setting up emails from MVC before. SMTP settings need to be set up in the web.config.

  • [email protected] 406 posts 2135 karma points MVP 7x c-trib
    Aug 22, 2017 @ 06:32
    jeffrey@umarketingsuite.com
    0

    Hi Q-ten,

    good work finding this all out! We've never really tested the plugin thoroughly on Umbraco Cloud but it should work I guess.

    Good job for finding out how to add these web.config-settings in a cloud project, and yes, the 'Can't connect to remote server' is your typical SMTP-error when the SMTP-host is not correct (or username and password).

    Hopefully everything is working now,

    Jeffrey

Please Sign in or register to post replies

Write your reply to:

Draft