Built in Contact Us control DMARC issue?

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Built in Contact Us control DMARC issue?

Post by compunerdy » Wed Oct 19, 2016 6:57 am

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?

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Built in Contact Us control DMARC issue?

Post by Katie » Thu Oct 20, 2016 7:12 am

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
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: Built in Contact Us control DMARC issue?

Post by compunerdy » Thu Oct 20, 2016 8:10 am

It is the built in "contact us" page.. not email.

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Built in Contact Us control DMARC issue?

Post by Katie » Thu Oct 20, 2016 8:37 am

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
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: Built in Contact Us control DMARC issue?

Post by jguengerich » Thu Oct 20, 2016 11:19 am

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().
Jay

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: Built in Contact Us control DMARC issue?

Post by compunerdy » Fri Oct 21, 2016 3:59 am

Jay is correct.. the customer gets our auto response but we never get the message as it is bounced back to the customer.

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: Built in Contact Us control DMARC issue?

Post by jguengerich » Wed Oct 26, 2016 4:35 am

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.
Jay

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: Built in Contact Us control DMARC issue?

Post by compunerdy » Wed Oct 26, 2016 6:09 am

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) 

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: Built in Contact Us control DMARC issue?

Post by jguengerich » Wed Oct 26, 2016 6:12 am

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];
Jay

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: Built in Contact Us control DMARC issue?

Post by compunerdy » Wed Oct 26, 2016 6:52 am

Jay, thanks a ton.. worked like a charm. I had a customer test and his E-mail went through this time.

Post Reply