Contact Admin

Emails end up in spam folder - Contact Admin

Emails end up in spam folder

by nl1sms » Wed May 01, 2019 6:39 pm

I use this excellent extension for a while now. Only problem I have is the following:

The email is sent with the email adres that the user filled in the form. Ofcourse this is a random email adres. Now the emails end up in my spam folder and not in my inbox. I can't change this in Hotmail because i never know what email adres wants to contact me. I'd really like the emails in my inbox otherwise i miss emails.

What can i do about this? I'd like to see an option in this extension where you can choose which email adres to use. The one of the user or one already set up in the ACP. Is this possible please ?

Thx in advance....
User avatar
nl1sms
Registered User
Posts: 192
Joined: Wed May 25, 2005 4:24 pm
Location: Holland
Contact:

Re: Emails end up in spam folder

by bbrunnrman » Wed May 01, 2019 11:11 pm

nl1sms, the problem is worse than you describe. Because of the DMARC authentication issue indicated in my previous post, when users enter an AOL or Yahoo address in the form, you won't get the email at all, even in your spam folder. For some references explaining why, see https://help.yahoo.com/kb/SLN24050.html and https://www.emailonacid.com/blog/articl ... erability/

Therefore, this extension ought to send email the same way as all normal emails sent by phpBB, where the "From" header is set to a fixed email address in a domain that the site's webserver is authorized to send (preferably the "Contact email address" specified in the "Email settings" screen in the ACP), and only a "Reply-To" header should contain the email address entered in the form.

Incidentally, I've done an experiment verifying that if the form is submitted using a Yahoo email address, the email doesn't get delivered.
bbrunnrman
Registered User
Posts: 80
Joined: Sun Dec 24, 2006 9:19 pm
Contact:

Re: Emails end up in spam folder

by RMcGirr83 » Thu May 02, 2019 10:31 pm

Open

\rmcgirr83\contactadmin\controller\main_controller.php

FIND

Code: Select all

						$messenger->headers('X-AntiAbuse: User IP - ' . $this->user->ip);
AFTER ADD

Code: Select all

						$contact_name = htmlspecialchars_decode($this->config['board_contact_name']);
						$board_contact = (($contact_name !== '') ? '"' . mail_encode($contact_name) . '" ' : '') . '<' . $this->config['board_contact'] . '>';
FIND

Code: Select all

							$messenger->from($data['email']);
REPLACE WITH

Code: Select all

							$messenger->from($board_contact);
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
RMcGirr83
Former Team Member
Posts: 22011
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Emails end up in spam folder

by bbrunnrman » Fri May 03, 2019 1:42 am

This worked. Thank you!
bbrunnrman
Registered User
Posts: 80
Joined: Sun Dec 24, 2006 9:19 pm
Contact:

Re: Emails end up in spam folder

by nl1sms » Fri May 03, 2019 6:54 am

It works great!!! Thank you very much!!! Greetings from Holland!
User avatar
nl1sms
Registered User
Posts: 192
Joined: Wed May 25, 2005 4:24 pm
Location: Holland
Contact: