Page 1 of 1
Built in Contact Us control DMARC issue?
Posted: Wed Oct 19, 2016 6:57 am
by compunerdy
I am having customers say they get their messages bounced back and the bounce back message says it is a issue with DMARC. I did a little research and it is supposedly a issue since the form says the E-mail is coming from the customers address instead of our address.. supposedly the fix is to have the from address be from our domain but the reply to address be the customers correct E-mail. Anyone have a fix for this?
Re: Built in Contact Us control DMARC issue?
Posted: Thu Oct 20, 2016 7:12 am
by Katie
Is this one of the built-in email templates? We have a 'Contact Us Confirmation' template. You can set the FROM and TO address. The FROM address should be the 'merchant' variable which uses the store's default email.
Thanks
Katie
Re: Built in Contact Us control DMARC issue?
Posted: Thu Oct 20, 2016 8:10 am
by compunerdy
It is the built in "contact us" page.. not email.
Re: Built in Contact Us control DMARC issue?
Posted: Thu Oct 20, 2016 8:37 am
by Katie
What do you see when you view the Contact Us webpage? Here is an example:
[[ConLib:ContactUs EnableCaptcha="False" EnableConfirmationEmail="True" ConfirmationEmailTemplateId="25" Subject="New Contact Message" SendTo="
support@giantcommerce.com"]]
So, in my example, the control is using Template ID 25 which has it's own email settings like I described in my last post.
Katie
Re: Built in Contact Us control DMARC issue?
Posted: Thu Oct 20, 2016 11:19 am
by jguengerich
Katie,
I think he's referring to the email that the Conlib/ContactUs.ascx.cs code sends to the store in SendContactUsEmail(), not the confirmation sent to the user in SendConfirmationEmail().
Re: Built in Contact Us control DMARC issue?
Posted: Fri Oct 21, 2016 3:59 am
by compunerdy
Jay is correct.. the customer gets our auto response but we never get the message as it is bounced back to the customer.
Re: Built in Contact Us control DMARC issue?
Posted: Wed Oct 26, 2016 4:35 am
by jguengerich
I don't know if setting the from address to the store address and setting the reply to address to the customer's address will help, but I think this is how you would do it (not tested - we're redirecting to a contact us page on our main site):
In ConLib/ContactUs.ascx.cs, find the following line in the SendContactUsEmail function:
Code: Select all
mailMessage.From = new System.Net.Mail.MailAddress(Email.Text);
Comment it out and add this below it:
Code: Select all
mailMessage.From = mailMessage.To[1];
mailMessage.ReplyToList.Add(new System.Net.Mail.MailAddress(Email.Text));
This (along with the existing code) will create an email from your store address to your store address. The email address the customer entered on the page will be the reply to address.
Re: Built in Contact Us control DMARC issue?
Posted: Wed Oct 26, 2016 6:09 am
by compunerdy
Jay,
I tried the code but it gave me this error.
Code: Select all
An error has occured at http://www.thecustomsabershop.com/webpage.aspx?webpageid=13
Exception: Exception of type 'System.Web.HttpUnhandledException' was thrown. Stack Trace: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Inner Exception: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Inner Exception Stack Trace: at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.Collections.Generic.List`1.get_Item(Int32 index) at AbleCommerce.ConLib.ContactUs.SendContactUsEmail() at AbleCommerce.ConLib.ContactUs.SubmitComment() at AbleCommerce.ConLib.ContactUs.Submit_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Re: Built in Contact Us control DMARC issue?
Posted: Wed Oct 26, 2016 6:12 am
by jguengerich
Oops, I've been using a different programming language that uses 1-based indices instead of 0-based.
That one line should be:
Code: Select all
mailMessage.From = mailMessage.To[0];
Re: Built in Contact Us control DMARC issue?
Posted: Wed Oct 26, 2016 6:52 am
by compunerdy
Jay, thanks a ton.. worked like a charm. I had a customer test and his E-mail went through this time.