Copied to clipboard

Flag this post as spam?

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


  • aaronb 97 posts 116 karma points
    Jul 25, 2011 @ 03:13
    aaronb
    0

    problems with sending a copy to the user

    I've followed the documentation and got this mostly working, but I'm having problems with the 'send me a copy of this email' feature. 

    It's sending the main email and the copy to the same place every time, and when I check 'send me a copy' the confirmation message is not displayed. I've tested this with the original unedited version and get the same problem.

    Thanks for any ideas.

  • Sebastiaan Janssen 4971 posts 14974 karma points MVP admin hq
    Jul 25, 2011 @ 11:39
    Sebastiaan Janssen
    0

    Just to cover the basics, this is what your macro call should look like:

    <umbraco:Macro FileLocation="~/macroScripts/CultivContactForm.cshtml" MailFrom="[email protected]" MailFromName="MyName" runat="server" />

    I really can't imagine a scenario where the To address would be the same for both e-mails (unless of course you enter the same e-mail address as the one in the MailFrom parameter).

    Do have a look in your umbracoLog table to make sure there were no errors sending the mail.

  • aaronb 97 posts 116 karma points
    Jul 25, 2011 @ 13:07
    aaronb
    0

    Thanks Sebastiaan,

    I am calling the macro from inside the richtext editor, could that be my problem? My call looks like this:

    <div umb_mailfrom="[email protected]" umb_mailfromname="website contact" umb_macroalias="ContactForm" ismacro="true" onresizestart="return false;" umbversionid="40d1a1a4-37af-4a49-8d34-3f63d6b504b6" umbpageid="1050" title="This is rendered content from macro" class="umbMacroHolder"><!-- startUmbMacro --><span>This macro does not provides rendering in WYSIWYG editor</span><!-- endUmbMacro --></div>

    with macro parameters for mailFrom and mailFromName. I do not have document type properties for either.

    I have spent some time looking through the razor code (I'm not a developer) and from what I can tell, it looks like when a copy is requested, the plugin also Bcc's the mailFrom email on that. If that's correct, that would account for the two emails going to the mailFrom address, and maybe it's failing to send the copy to the user.

    I have looked at the umbracoLog table, and there were a lot of errors saying "Error creating or sending contact mail, check if there is a mailFrom property on your document and that it has a value, or specify a MailFrom parameter on the macro call exception:

    Should I try moving it to the document type instead?

    thank you

  • Sebastiaan Janssen 4971 posts 14974 karma points MVP admin hq
    Jul 25, 2011 @ 13:15
    Sebastiaan Janssen
    0

    Yes, definitely try moving it to the template. I do believe the parameters are case-sensitive.

    You can also (after Page.Model = Model;) add:

    Page.FormVariables.MailFrom =  "youremail";
    Page.FormVariables.MailFromName = "yourname"; 
  • aaronb 97 posts 116 karma points
    Jul 25, 2011 @ 22:22
    aaronb
    0

    I've messed with it some more and have found this:

    If I set mailFrom to my personal email address, it seems to all work ok. If I set it to an email address which is hosted with my domain (same domain as this website is on), it all goes wrong.

    I'm sure this is something on my hosting's end, any suggestions as to what I should be asking them to change/check?

    thank you

     

  • Sebastiaan Janssen 4971 posts 14974 karma points MVP admin hq
    Jul 26, 2011 @ 08:36
    Sebastiaan Janssen
    0

    Apparently, your mailserver does not allow you to send from any other address than your personal e-mail address. This is protection against people sending spam through your server. You need to contact your server admin to allow other addresses. You could also use gmail's SMTP server I think, if you add the ability to send from an alternative address in gmail's settings, you should be able to do so. For gmail smtp settings see the manual.

  • aaronb 97 posts 116 karma points
    Jul 26, 2011 @ 13:43
    aaronb
    0

    Great, thank you. I'll see if they can configure it to allow this.

    I disabled the send me a copy checkbox for now and the form works great.

    I'm sorry for wasting your time with what ended up being a server issue; thanks so much for all the help.

  • Sebastiaan Janssen 4971 posts 14974 karma points MVP admin hq
    Jul 26, 2011 @ 23:55
    Sebastiaan Janssen
    0

    No problem! I don't feel my time was wasted, no worries!

    I hope that this is the issue, could you follow up and report back to see if this was actually the issue? Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft