I have a website with a contact form. The form just uses the php mail function to send the email but the email doesn't go to the email address if it is using the same domain name. I'm not sure what/how to explain.
If my website is www.example.com and someone fills out the contact form on this site, it should go to info#example.com but it doesn't. If I try using different email address that is not WHATEVER#example.com then it works fine.
Has anybody had a problem like this or can anybody point me in the right direction as to how to debug an issue like this.
I do not look after the email server but the company that does is saying everything is fine from their end and just keep saying there is something wrong with the form.
**Edit
I have checked spam folder and there is nothing
I have also tried sending emails to the email address from outside of the website (another email address)
Related
I am making a contact form in php using mail function, but the hosting is saying that I have to put into parameter 'from' email only with domain name which is the same like in the hosting. But I need to put in the 'from' email from form. Is there any way how to avoid this? I don't want to use external scripts. Thanks for any help.
you cant send emails with email adresses
that arent from your server because of security reasons otherwise you could send an email from zuckerberg#facebook.com or something similar.
use the answer to param to add the contact form email and put something that is from your server into the from
I can not solve the problem of spam. I only have 7.6 / 10 on Mail-Tester.com.
I specify that I use postfix, and I need it only for the sendings.
Here is my result: https://www.mail-tester.com/web-n0z33
Mail-Tester.com tells me that the problem come from ReplyTO… But I am obliged well to use ReplyTO so that I can click "to answer" when I receives an e-mail sent since a form of contact of my Web site.
I also specify that FROM I put an email address #my-domain.fr. Because if in FROM I directly put the email address of the visitor who fills my contact form I have even worse errors with Mail-Tester.com.
And here is my PHP code:
$mailer = new Mailer();
$mailer->setFrom(contact#mondomaine.fr)
->setReplyTo('emailexemple#gmail.com')
->setTo($_GET['mail'])
->setSubject($data['subject'])
->setBody('front/specific-page/contact/contact-html', $data)
->addBodyText('front/specific-page/contact/contact-text', $data);
var_dump($mailer->send());
I use SwiftMailer with the driver at 'mail', but I created my own adapter so that's why I have this code. But it is easy to understand.
How to solve my problem? How to have a 10/10 rating with Mail-Tester.com?
Thank you very much.
I am sitting with the same problem. Currently, from what I have found on the net, you can not "fix" this. However, there are some ways to help resolve it. Here are a few options you can try, based on these references:
Ref 1
Ref 2
They both say the following:
"Wrap mail messages in HTML tags to avoid spam filters."
The FROM address must be those from the visitor who uses the contact form. How would you else respond to the email? And why even use a tool to test the spam score of an email sent with a contact form? You are the only receiver of those emails.
The 10/10 rating with Mail-Tester.com is telling you only, that Mail-Tester thinks, that your email is just fine. I would not rely too much on this tool. All email service providers have anyway own spam filters and will handle your email as they see right. For instance, if you test your email with another tool like https://www.emailchecky.com, you will mostly see other results and found errors.
Or make another test:
You can send the email also to a Gmail address and see if the email is landing in the main inbox or the spam folder instead. Gmail has the most aggressive spam filters and rules I know. If your email will pass these rules and filters you can be proud of your email.
I want to use PHPMailer configure the contact page for my website. The prroblem I am facing is that for the script to work, the from address has to be set in the local server e.g. if my domain is example.com, the from address has to be name#example.com. When I set it this way, the script works perfectly.
the issue I'm having is that being a contact page, the from address has to be the senders email address this there for means that if a customer contacts me with the email address like name#email.com, the script will throw an error similar to the one below:
SMTP ERROR: DATA END command failed:
550-Your FROM address ( name#email.com , Dev Customer 550-)
must match your authenticated email user ( name#example.com ).
Does anyone have any idea on a way to work around this? Or are there any alternatives? I will appreciate any form of assistance offered. Thank you in advance.
As per Tigger's suggestion, you should never send using the submitter's address as a From address. It's forgery, and will make your messages fail SPF checks, causing you no end of delivery problems either with messages bouncing or consigned to spam folders. It's been actively advocated against for at least a decade anyway, and it's also one of the practices that would cause you to be vulnerable to the security hole in PHPMailer fixed back in December.
Since you've tagged this with PHPMailer, I'll show how to use that to do what you ask:
$mail->setFrom('me#example.com', 'Contact form');
$mail->addReplyTo($_POST['email'], $_POST['name']);
This is exactly what the example contact form script provided with PHPMailer does. It's also worth checking submitted values - addReplyTo will validate the address automatically, so you should check the return value to be sure.
There may be some email clients that do not handle reply-to addresses correctly, but you should not expose yourself to being blacklisted because of the ineptitude of a small number of clients.
I'm a noob and seriously confused. I built a form for my website with a php script that validates and sends an email to me when someone fills it out. So, what is an auto-responder? Do I incorporate that some how with my php script, or do I not need the php script at all if I use an auto-responder? Thanks in advance
Autoresponder is automatic mail shooted back to the origin email box , it may contains information like "Thank you for email and will get back to you soon". It can be configured at the mail provider or you can also do the coding for the same. As any user submit the form and he has valid mail , just read his email id in the last and send him the thanks email immediately . Later you can see his feedback and reply again.
An autoresponder is used for automatically sending email notifications when something happens, like you just subscribed to something. Some web hosting companies such as GoDaddy offer autoresponder email features under cPanel. I'm pretty sure big names have them. Just configure it under cPanel. Another way to do this is having a local program check the database for new members and using the program to send email to the new members. I did the second option for educational purposes but the first one should be more efficient.
Ok, I've been working with this Magento 1.7.0.2 website:
http://www.kharmakhare.com
There are two forms currently on the website. If I change either form to any kharmakhare.com email address, the email is never received. If I change either form to my email address, I get the email just fine.
Yes, I HAVE checked spam. The Kharma Khare email address will not receive emails from Magento. I thought it had to do with the Google Apps not being installed correctly... except when I logged into the email there were already tons of emails in there.
They don't have any problem receiving emails, they just don't receive any emails from the website. I've searched online for an answer. All I can find is problems sending emails through Google Apps, not receiving them.
My client already did set up the SPF records as well. In addition, last time I was in Google Apps (at least a year ago) it looked completely different, so I don't know where anything is anymore.
The first form is on the contact page (this uses Magento's default contact module):
http://www.kharmakhare.com/contact-us
The other is opened by clicking on the "Free Sample" tab on the upper right side of the screen. After spending hours working on this over a couple days I finally figured out how to do what would've been a 10-minute job in wordpress; creating an alternate email form. -_-
Regardless, although I know both forms work, neither one will send to the email address it actually needs to get sent to, and its driving me nuts. Does anyone have any idea what might be causing this problem?
Switch off the mailserver for that domain.
The reason they are not getting the emails and you are is that the sending address is something#kharmakhare.com and the receiving address is somethingelse#kharmakhare.com. The MX records offloading the email to Google Apps are not used in this instance as the server will look for the local mailserver first.