If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Zen Cart Code Suggestions / contact_us page error...

contact_us page error...

Started by carlwhat on 9 Aug 2016, 10:11 PM · Views: 51

Results 1 to 3 of 3
9 Aug 2016, 10:11 PM
#1
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

contact_us page error...

i have been getting an error on the contact_us page. we use smtpauth, due to the reputation of the shared webserver resulted in many emails getting bounced back to us.

while smtpauth has worked fine, our host has a policy as such:

"Sender domain policy exists to ensure email that is sent from your website is legitimate. This policy requires two things:

You must use a FROM address that’s on the same website you’re sending email from
The email must be hosted with us...."

so even though we authenticated with a valid email account, these policies prevented the contact_us page from working and generated error logs pointing us to the aforementioned statement.

to counter this problem, i changed includes/modules/pages/contact_us/header_php.php accordingly:

//old
 zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg,'contact_us');
//new 
 zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $send_to_email, $html_msg,'contact_us', '', $name, $email_address);

i am not sure if it is worth addressing in the base code or not; hosts are notoriously fickle in their various email policies.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

9 Aug 2016, 11:49 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: contact_us page error...

What's your current setting for Admin->Tools->Email Options->"Emails must send from known domain"The default is "Yes", for the same reasons you mentioned.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

9 Aug 2016, 11:58 PM
#3
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: contact_us page error...

DrByte:

What's your current setting for Admin->Tools->Email Options->"Emails must send from known domain"The default is "Yes", for the same reasons you mentioned.

you learn something new every day!

the setting was set to NO.

thanks!

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.