I am using PHP to send emails using mail.
Now I am sending it with a from address being my domain. This works fine when sending from any email address # said domain (such as abc#domain.com, fff#domain.com), but their is 1 certain address that just doesnt work.
When I send it from the email reports#domain.com (which is an email account that exists), the error logs look fine, but the email never arrives. Not in spam or anything.
Why would it be that a certain from email address is failing? I'm not sure if this is a problem with sendmail or PHP.
I've checked the settings of the reports email account and they all look the same as every other account that does work so im not sure where to start looking.
Please check your Reverse DNS, SPF and Domain Keys of your mail server and your domain
Utilize the followings #
Debouncer
MXToolBox
intoDNS
Related
We have a problem using PHP mail on a shared hosting server on 1and1.com
We use SPF entries in our TXT DNS settings which include the email servers we use also confirm that outgoing emails are sent from our domain email addresses.
The scenario is: We have a button feature that allows site users to send a personal email from their email address to a client email address.
The problem is: These emails either bounce or end up in SPAM because they do not pass the SPF test.
Although I realize that we can solve the problem with a dedicated server, I was hoping someone had a solution or a way that we could solve the problem and still remain on shared hosting.
Thanks!
So I'm not having much luck finding information on how to send email with custom From header without being potentially marked as spam (for email spoofing).
The reason we want to do this is we run a server for many client's websites, but we don't host their emails is most cases.
We wish to send enquiry emails from the websites using their preferred address (e.g. sales#mycompany.com) so that their customers can reply to the email.
At the moment we're using a Google Apps email address and changing the Reply-To header, but this is ignored by Outlook almost all the time (not sure why).
In most cases we have access to the DNS records, so is it as simple as adding our server's IP address to the domain's SPF record?
Or should we look at a third-party solution for this?
Thanks in advance!
Yes you need to add SPF records to the DNS TXT record.
So if you want to send an E-mail as user#foo.bar from IP address 192.168.3.4 you need to create (if you are not the admin of foo.bar) a DNS TXT record/s for foo.bar as such
v=spf1 +ip4:192.168.3.4 -all
This tells the remote server that the foo.bar domain sends legitimate email from 192.168.3.4 and that all other sources are only pretending to be foo.bar.
Note that the IP can be either ip4 or ip6.
I have 2 different domains hosted by the same provider. On one of the domains, i can send an email using the PHP mail function with a from address that does not exist e.g. noreply#myrealdomainname.com.
On my other domain (which i know is hosted on a different server), the mail does not reach the recipient and an error email appears in the catchall mailbox of the domain saying that the sender address could not be verified. I can obviously fix the problem by using a valid from email address but i would like to understand where the setting is which forces the one domain to have the check done and the other one not.
Is it a setting somewhere on the server or a piece of software running on the server? I have asked my hosting company but have not had any success with an answer.
Many thanks
Bianca
I am sending email using mail() function from my CentOS server. I am able to send using anyone's name without any authentication. For example, I am able to send email using my email address (abc#gmail.com -- say), my friend's email address (xyz#gmail.com -- say) or any other email address (billgates#microsoft.com -- say).
When someone receives my email from PHP code, it looks exactly like it was sent from the email address that I wanted to send from. I am using this PHP class for sending emails.
My question: How to prevent an email to be automatically marked as spam by the email service provider of the receiver (Gmail, Hotmail, MSN, Yahoo etc.)?
As of now, I have only option for sending email using mail() function only. My authentication code is not working.
Note: I am not going to do any spamming. My web application going to send emails to users who are creating new accounts on my website. And hence, I don't want email from my server to be automatically marked as SPAM by their email service provider (Gmail, MSN, Hotmail, Yahoo etc). I don't want my email to go directly to their SPAM folder instead of their Inbox.
You should use the domain name of your website as E-mail address e.g. noreply#mydomain.com. Because some mail servers will do a dns lookup for the domain stated in your e-mail address or even a reverse dns lookup. Since gmail.com does not resolve to the IP of your webserver the e-mail may get marked as spam. There are many other factors for an e-mail to become spam.
For example HTML formatted mails (especially when containing external images) are more likely to get marked as spam than plain text mails.
Also make sure to use proper Mail headers for your mail, they may also be validated by the remote mail server.
I'm using PHP mailer to as part of an enquiry form that I'm building for a client. One thing I've noticed in testing is that when I use my yahoo account as the FROM and my gmail as the to it works fine for a while but then it starts rejecting, I'm assuming because gmail is smart enough to know that the email isn't actually coming from Yahoo.
What is the best solution to this? I could use the email from the person who has actually filled in the form to show as the FROM address but I'm worried that this may eventually cause the same problem anyway? I could also send it from an email on the domain that its sending from but will that stop it from appearing as spam or black listing that email?
Any help or guidance would be great?
You are getting tagged as a spammer because you are sending the same message over and over. Set up your own mail server without a spam filter while developing if this is a problem.
You are not Yahoo -- don't pretend to be them! Set the From field to an address at the domain that's sending the mail (e.g, if your domain was example.com, send from something like inquiries#example.com or noreply#example.com).
This is probably related to SPF records. mail() will most likely try and send the mail directly to the server(s) identified by the MX record of the recipient domain, and because you are not sending from an IP address that is recognised as one of Yahoo's, Google will reject the email. If you are on *nix, you may be able to configure your system's sendmail program to relay via Yahoo. This is not an option on Windows (I don't think) because Windows has no sendmail and PHP will send the mail itself.
If you want a cross-platform solution you can use something like PEAR::Mail to relay the message through Yahoo's SMTP servers - this should resolve the problem as long as the SPF record is the source of the problem.
If your email is getting flagged as spam because of the content of the message, the only solution is to change the content of the message.