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.
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.
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?
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?
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.
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.
Just to cover the basics, this is what your macro call should look like:
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.
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
Yes, definitely try moving it to the template. I do believe the parameters are case-sensitive.
You can also (after Page.Model = Model;) add:
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
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.
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.
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!
is working on a reply...