Mail is successfully sent but not received - php

I am working on a project in which i have to send mails to users etc. My mails are being successfully sent but i cannot see the mails in my account. I donot have any hosting website is it important to have any hosting website for getting mails in the account. I am currently using smtp4dev which shows me that my mail has been sent. Please help

Here is a quote from the homepage of smtp4dev: (https://smtp4dev.codeplex.com/)
Project Description
Windows 7/Vista/XP/2003/2010 compatible dummy SMTP server. Sits in the system tray and does not deliver the received messages. The received messages can be quickly viewed, saved and the source/structure inspected. Useful for testing/debugging software that generates email.
That means it will not send emails. Dummy smtp servers comes in very handy while development but to see actual emails you need real ones.

Related

WordPress on VPS running Plesk, no mail is being sent out

I have a VPS server running PLESK(12.5.30) and all of the WordPress forms we have that are supposed to send to people who fill out forms, are not being sent. They are just sitting in the mail queue as 'deferred'.
I think it has to do with php mail, but I can't seem to get this to work and my host is literally no help at all. I even called Plesk and they did not help.
Any ideas?
Thanks!
For more information you can check system mail log somewhere in in /var/logs/
Take in account that setting up working server of outbound mail is a real pain. In two words you need to setup SPF and DKIM or such mail services like Gmail will mark all emails from your server as spam by default.
In your case I can suggest to SendGrid service which has a WordPress plug-in https://wordpress.org/plugins/sendgrid-email-delivery-simplified/
(You need to register SendGrid account, it's free)
If your contact forms using default wp_mail() you mail will be send through SendGrid mail servers.
Also you can setup you Postfix/sendmail with using SendGrid's mail server: https://sendgrid.com/docs/Integrate/Mail_Servers/postfix.html

phplist test emails failing inconsistently

I recently performed a parallel update from phplist 2.10.12 to 3.0.12. We kept the old version operational while the client became accustomed to the new one in demo mode. Today we switched to 3.0.12 and turned off demo mode, and we're having difficulty with the test emails.
phplist is configured to send two test emails, one in text and one in html. When sending a test to me, both emails are sent (and are put in spam), and phplist announces that they were sent successfully. When sending a test email to the client, however, only the text message is sent successfully. When changing the setting to only send one email, phplist announces that sending failed, and indeed no email shows up.
The client is indeed capable of receiving html emails at that address, and the error log says Error sending email to [email address] Could not instantiate mail function. However, to reiterate, it did send correctly to me - twice. But it fails every time sending to the client.
I am unfamiliar with configuring phplist, and any help here would be appreciated. Thanks!
Edit: from config.php:
# To use a SMTP server please give your server hostname here, leave it blank to use the standard
# PHP mail() command.
define("PHPMAILERHOST",'');

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.

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.

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