emails not going out to all users - php

I have a few scripts that send out emails to my users, and for some reason not all users are getting the email. The site is not live yet, so its no big deal yet but I dont understand why. I have set up a few fake accounts, one with my school email, one with hotmail and one with yahoo. When I sign up with my school email I recieve the welcome email, but I get nothing with the other email accounts. The same thing with my 'forgot password' email. Only my school email works, yahoo and hotmail arent working...
I'm running on a Linux server with Apache. Using PHP and the kohana framework 2.3.4
Thanks.
EDIT: I am displaying all errors, I dont have an error with the actually sending of the mail (I dont think) since I get it in my school inbox. Im running off a hostmonster server.
Also, the emails were being recieved at one point, but now they're not being recieved AT ALL from those inboxes

There's a lot of possibilities. If your php code isn't spitting out any php errors (make sure you have the following settings.
error_reporting=E_ALL
display_errors=on
If you're not getting any errors chances are the request is reaching your specified mail server (or sendmail). This means it's either a network based issue, or the receiving servers may be rejecting your email (spam detection?) Make sure you're sending out at least a basic from: header as well.

I don't know much about Kohana, but if it's not sending the emails like you wanted, you might want to take a look at PHPMailer.

Related

Properly signed phpmailer emails keep being marked as spam or get rejected

For the past 2 months I have been struggling with the mailserver for a webapplication I'm building. Mails kept being marked as spam or didn't even arrive at a recipient at all.
I started researching this fairly common problem and found out about all the things that come with signing email en authenticating mailservers and so on. I even had to move my domain name to another hosting provider just so I could setup my dkim, spf and dmarc records correctly.
After doing all of this mail-tester gave me the following results:
I figured this would be good enough so I started testing some more. Only to find out that gmail still marks my emails as spam, and outlook (hotmail etc.) still doesn't even receive the email's in any folder.
Since I don't know what to try anymore, i am hopeful someone here would have some suggestions for me.
Thanks in advance!
That mail tester is really basic it doesn't give you a realistic picture of whats really going on.
You should test with the one from Unlock The Inbox. It does well over 400+ different checks, depending on what you have configured.

Mails not sending to outlook, hotmail

I have my site hosted on bluehost which sends out daily mails to customers (with cron jobs). All mails are working fine except outlook and hotmail. Customers are not getting emails on their outlook/hotmail accounts. I checked the code and it working properly, returning true with php mail function.
MX records on hosting are set to gmail, bluehost supports says its a code issue or I need to consult with google but when I send direct mail through gmail account customers are getting them.
I am not sure how to debug and resolve this issue. Can someone suggest me the ways to resolve this or the possible reason behind this.
I know this is a few months later, but maybe I can help. I fought with this for a while. It depends on the mailer you're using, and your code a bit so it would be best to post it here.
Overall though, outlook and hotmail have extremely high spam filters, so there's a list of things you need to consider.
First - I've heard third party mailers will get blacklisted or blocked pretty quickly (check their reviews), so check that the IP address hasn't been blacklisted. You can contact outlook to do this (good luck), or send yourself an e-mail, find your ip in the header of your e-mail, and check a blacklist checker online somewhere.
Second - As part of USA's CAN-SPAM Act of 2003, you need to provide some sort of unsubscribe link as well to be in the good books.
Third - If you are using phpMailer or something along those lines, you'll need to remove anything that looks like this:
$mail->AddReplyTo("youremail#domain.com");
$mail->From = "youremail# domain.com";
Because that will get it marked as spam.
Fourth - If you end up trying to send your e-mails through your gmail instead, allow access to third party apps, then go here (https://accounts.google.com/b/0/DisplayUnlockCaptcha), it will show up in your hotmail just fine.
Be warned that if you test your hotmail too often with the same message, it'll get blocked again.
Hopefully this helps!

sending an email with codeigniter doesn't work when they contain a link

I have a script set up that will email a user an activation link when they insert their email into the provided input.
I'm using CodeIgniter's email class to send the multipart emails and the problem I'm having is that when the email is sent, the debugger says that the email was sent sucessfully but the message is never received.
When I send the email to my internal work email, it sends just fine. But when I send it to my gmail account, it never comes through.
I've managed to track down the issue as being a problem with inserting links within the email. When I remove the link, the email sends fine. I put the link back in and the email is never received by my gmail account.
Has anyone ever come accross this problem or do you have any insight into how to fix this?
your email is being rejected.. this is no CI issue..
Ok, so it sounds like the problem isn't with CodeIgniter or your code, but with the server's mail transfer agent sending it on to the Gmail server.
What happens is CodeIgniter puts together an email and gives it to the PHP engine, which passes it on to the mail transfer agent on the server for sending. The MTA will report back to PHP, and therefore CodeIgniter, that it has received the email properly. As PHP & CodeIgniter's jobs are finished at this point, they will report that they've sent successfully.
Check your spam folder in your Gmail to see if it's been put in there..? I haven't used CI for a while so can't remember exactly, but I think there's an HTML-email parameter you may need to set before you send. If so, Gmail might be expecting this to be set too.
Scroll down to 'Email Preferences' here:
http://codeigniter.com/user_guide/libraries/email.html and set the mailtype to HTML.
If that doesn't work, you will need to debug fully.
To debug the problem properly you will need to be able to access the MTA logs. Is this a local development server or a live production machine? Is it Linux or Windows? If Linux, which distribution? Do you know which MTA you are using? Do you have SSH access to the server?
If you can get SSH access and find out which MTA you have things will be a lot simpler to find out and you'll be able to monitor the outgoing messages and the destination servers' responses as they happen.

Email sent from form is not delivered to recipient

I made a php form but I have a problem. The form is sending the message and a thank message displays but am not receiving the message in my gmail inbox.
Check your server mail log. Check your Gmail junk folder.
Well post the code! I've used PHP's mail function and it worked. Perhaps Gmail is filtering the e-mail sent by PHP. Try using an e-mail account on a different domain to narrow down where the problem is.
Gmail may be treating the e-mail as spam. Try sending to an e-mail account not on Gmail.
This could be one of hundreds of problems, many of which are beyond your control.
I had a similar problem trying to make a simple PHP app to send email - one day it worked, the next day it didn't. No error. No indication that it failed. Nothing.
To debug the problem I installed Ubuntu on a virtual machine which meant I had my own web abd mail servers to play with - made it easy to check server side logs and multiple recipients etc. Basically you are in 100% control - if it works in this environment but not in the real world, chances are it isn't your fault!
Turned out that my web host had put in new security policies that the "From:" address had to be a physical mailbox on their system. Not my hosting user name. Not a forwarded web address.
- they just didn't bother to tell anyone they had done it!
Make sure your to and from set correctly. If the from is not an address gmail likes then it could be taken as spam.

Email sending issue

The project that I'm currently working on, is large scale. I'm using email activation method for user registration system: Sending activation code via my shared hostings smtp server to users email address after successful signup.
During tests, I have noticed that, it sends emails to famous mail services like gmail, live without any problem and receiver gets message directly but when I tried to send email to well known email server (rambler.ru), the swiftmailer script (that I'm using to send emails) returned success message. BUT another side didn't received any message. That's big problem for me.
At first I thought maybe that's scripts problem. Tried phpmailer too. No success. Then tried to send from Outlook to that server for testing purposes. The user on rambler.ru received message with very big delay. I'm using shared hosting on Hostgator. There might be users that using rambler.ru server, and I dunno if that's one and only server that occurs such problem.
How to deal with that problem? I know that, I can send from live or gmail servers with "fake" from name. But another problem, is there will be probably daily limit or something like that. Any suggestions?
Check your SMTP server's logs to see what happened to the email. Getting TRUE from mail() or swiftmailer just means that they've successfully handed the email off to your smtp server. It does NOT mean that the email was delivered to the receiving host. That comes later, AFTER your php script has exited.

Categories