PHPMailer issue - php

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.

Related

Record/copies of PHP mail() previously sent from our website?

Should there be a record of all php sent mail (via our hosts mail() function) anywhere?
Our web developer made an oversight and all enquiries sent via the our host's (godaddy.com) mailer relay for the last 2 months were rejected by our local mail server. Naturally, our server doesn't keep any rejected emails.
I have spoken to godaddy.com and they claim there is no record, however I'm not particularly confident with the answer.
Is there anything I can do? The enquiry form is now fixed (used Mandrill), so that's not an issue.
No, the mails are gone now.
Rejected mails that a mail server tried to send usually go to the mail admin account of the sending server as a bounce - however, even that account might not be set up or failing or rejecting mail, so the mail server will get rid of these undeliverable mails that double-bounced by deleting them from the queue.
You might get an idea of what was tried to mail if you are able to get your hand onto a mail server logfile, but assuming this is in the hands of your hosting provider, your chances are low: 1. these logs would only give you an idea of which mail addresses were involved, but no content. 2. the log files usually get deleted quickly because they'd serve no regular purpose.

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

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.

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.

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