php sendmail() from same domain - is it considered SPAM now? - php

I want to know if using PHPmailer functions to send HTML or plain emails
would be not considered as SPAM by mail servers if it would originate
from the domain with the same name.
For example :
sending email with PHPmailer as "info#mydomain.com"
originating from "mydomain.com" domain (as opposed to say GMail server or other mail servers).
I have a "password lost" system that sends emails to people using my website/portal
and so far i tested the function with my GMail account. I wonder that when I will move
to new hosting, linux box, and configure the domain on that box, and add a mail account and use PHPMailer locally, with that mail account, maybe it would be totally cleaner and will not go in SPAM folders when I sent mails.
Let me know your thoughts about it,
and if this really works
thanks,

Your mails originating from yourdomain.com sent as info#yourdomain.com will not be marked with "using domain yoursharedhostingdomain.com" in gmail, so mails shouldn`t drop in the spam folder for that reason.
With Gmail here i mean e-mail client, not using gmail account as a sender.

Related

Error sending emails from PHP with PHPMailer

I need your help! I have a code in PHP for sending emails (PHPMailer version 5.2.7). Send email from PHP, I use this method usually.
I explain me...
The mails sent go directly to SPAM folder to Hotmail, Gmail...
I have my own server with two domains (unique IP for two domains). In the domain1 the mails sent correctly (PHPMailer 5.2.7) and go directly to de inbox folder. In the domain2 the mails sent correctly but mails go directly to SPAM folder (PHPMailer 5.2.7)!!
Which is the difference between domain1 and domain2?? Have the same ip...
I can do mailings to domain2 not reach the spam folder?
P.D.: Shipping method in PHPMailer is SMTP with user and pass verified.
There could be multiple factors that results in mail getting routed to spam folder. I don't think, it is anything to do with PHPmailer. It is something to do with your IP reputation, complaints, activity, user engagement and some other factors.
One reason could be, that your mail server uses only one ip to send from.
Maybe the the reverse lookup from that ip resolves to your domain1.
Also related are dkim and spf records.

Server sends email to selective domains only

I am using Joomla Mailer to send email notifications to users and admin. The issue is the server can only send emails to gmail, outlook and yahoo(those are the only ones i tested). But it cant send to other domains like xxxx#mysite.com.
All the mails are sent to multiple recipients, some recipients have the gmail,hotmail or yahoo mail, others have custom mail eg xxxx#mysite.com or yyy#myothersite.com.
The ones using gmail,yahoo or hotmail can receive the mails, but the ones using custom mails cannot. What might be the issue.
I am sending emails using a genuine email for my site.
I have checked the server PTR records using http://www.intodns.com and everything seems ok.
Any Help?
Are you using a SMTP server to send out the mail? Other hosts might think your headers look spammy. This article goes over setting up email to use SMTP instead of the mail() function.
http://www.inmotionhosting.com/support/edu/joomla-25/how-to/configure-email-over-smtp

Sending email using mail() function in PHP

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.

PHPMailer issue

I'm using PHPMailer for sending activation codes to users. As far as I know, that's best script for this purpose. Today noticed that, some users doesn't receive activation codes. But mailer return "Succesfully sent" message. Is there any chance that, phpmailer can't send to some mail servers? Or which is the best php script for sending mail via smtp authentification in your opinion?
It's not obvious that it is PHPMailer problem. It has connected to your smtp server and successfully sent the message. By successfully I mean that your server has accepted it. What happens next is a mystery and you have no control over it.
Few common reasons of undelivered mail:
marked as SPAM by foreign server (advise users to check their spam folder)
target mailbox does not exist (typos in username etc)
user inbox is full and will not accept new mail
mail queue on the server is quite big and it will take few minutes / hours to deliver
The best you can do is to advise users to keep their mailboxes clean, check their spam folder, retype email to prevent typos and offer a service for re-sending the activation email.
I send registration and activation emails using SwiftMailer via Google Apps Mail (support#mydomain.com). It works like a charm, easy to setup, and has no delivery issues since it's using Google's servers. Check it out.

When setting up PHP mailer who should I set the From address as to avoid spam/blacklisting?

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.

Categories