So my smtp php mailer is showing that the message was successfully sent but in reality it's not. I am now using email from the same domain that Synchro suggested because I was using gmail please have a look here and had issues with it and php mailer was showing error but after switching to mail from the same domain actually it is showing sent but I am not receiving any email.
So I went to my email logs and found this.
Event: failure error
User: eightysh
Domain: eighty6.shop
From Address: baltajiwissam#gmail.com
Sender: no-reply#eighty6.shop
Sent Time: May 21, 2022, 9:34:09 AM
Sender Host: www.eighty6.shop
Sender IP: 185.93.244.110
Authentication: dovecot_login
Spam Score:
Recipient: baltajiwissam#gmail.com
Delivery User: -system-
Delivery Domain:
Delivered To:
Router: remoteserver_route
Transport: mailchannels_smtp
Out Time: May 21, 2022, 9:34:09 AM
ID: 1nsIgk-0000C6-Im
Delivery Host: smtp.mailchannels.net
Delivery IP: 52.25.134.49
Size: 1.54 KB
Result: ECDHE-RSA-AES256-GCM-SHA384:256 CV=yes: SMTP error from remote mail server after end
of data: 550 5.7.1 [BFD] Sender prohibited by SPF
i did few research about Sender prohibited by SPF but i didn't get it :/ am i suppose to add my pc ip address to the host ?? if yes its not logical cause its gonna be a public form please help
It's not quite clear what you're doing, but at a guess it looks like you are sending from a gmail address without sending through a gmail server, and that will always fail SPF checks, because google doesn't allow that. It's nothing to do with the submitter's address, but the email server that you send the message through – if it's not smtp.gmail.com, then you can't use a gmail address as your from address.
Related
We have a list of 50,000 emails. Some of them are non-existent but we don't know which ones.
When we send newsletters to that list, some emails are not being delivered (given that some recipients are non-existing), so we get automatic replied emails like this:
Mail Delivery System I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below....
We would like to attach somehow these notification emails to a php script to flag these emails in the database so we don't use them in future since it is a waste of time and resources.
What is the name of the script or technique we are looking for?
I am copying the emails we get below.
Thank you for your help!
Mail Delivery System <MAILER-DAEMON#gproxy1.mail.unifiedlayer.com>
Attachments5:54 AM (6 hours ago)
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<gaviglio.herve#bbox.fr>: host mx.bbox.fr[194.158.98.50] said: 550 5.1.1
<gaviglio.herve#bbox.fr>: Recipient address rejected: User unknown in local
recipient table (in reply to RCPT TO command)
Final-Recipient: rfc822; gaviglio.herve#bbox.fr
Original-Recipient: rfc822;gaviglio.herve#bbox.fr
Action: failed
Status: 5.1.1
Remote-MTA: dns; mx.bbox.fr
Diagnostic-Code: smtp; 550 5.1.1 <gaviglio.herve#bbox.fr>: Recipient address
rejected: User unknown in local recipient table
There is no simple way to deal with bounced emails. You'll likely save yourself a lot of headaches by using a mailing API like those from SendGrid, MailChimp, and Amazon SES.
I am getting an error which says " The response from the remote server was: 550 Unrouteable address " .
My host of the email is valid and working good. But I need something like kjcnjkhb#abc.com.mydomain.com , when an email is sent to such an address it should come to my admin email.
I've enabled " catch all" so if I put any random email swejdnewkdn#mydomain.com , I get it my admin email.
But need an email when such kind of email is entered: dewdjkln#abcdne.com.mydomain.com ,
I believe there are some setting to be done in Exim maybe to solve this. I need all emails which has my host to come in my email.
Thank you in advance
If the error you're describing, "500 Unroutable address", is being generated by the client, then the problem is that there is no DNS MX record for abc.com.mydomain.com. The client doesn't know what server handles abc.com.mydomain.com. Your mail server isn't even being hit.
You may need to configure your DNS with a catchall MX record. Something like this:
*.mydomain.com. 3600 IN MX 10 smtp.mydomain.com.
$transport = Swift_MailTransport::newInstance();
$messages1 = "
<!DOCTYPE>
<html>
<body>
Thank you for registering an account on www.satperfectscore.com
<br>
Please use this link to verify your account.
<br>
After verification you will be entitled to 2 practice tests and 300 quiz questions.
<body>
</html>";
$messages2 = "Use the URL to verify your account: ".$mail."";
$message = Swift_Message::newInstance();
$message->setContentType("text/plain");
$message->setTo($to);
$message->setSubject("Account Verification");
$message->setBody($messages2);
$message->addPart($messages1);
$message->setFrom(array("contact_us#satperfectscore.com"=> "SAT Perfect Score"));
$mailer = Swift_Mailer::newInstance($transport);
$mailer->send($message);
The message never reaches the recipient .. when I open cPanel's Email Trace I get the following error:
Event: failure error
User: arasmus1
Domain: satperfectscore.com
Sender: contact_us#satperfectscore.com
Sent Time: Dec 13, 2014 8:33:20 PM
Sender Host: localhost
Sender IP: 127.0.0.1
Authentication: localuser
Spam Score:
Recipient: yash1995.momyan#gmail.com
Delivery User:
Delivery Domain:
Delivered To:
Router: send_via_spamgateway
Transport: spamgateway_smtp
Out Time: Dec 13, 2014 8:33:20 PM
ID: 1XzoDt-0006ZH-4J
Delivery Host: productio-tcloadba-tkyjfaz4ap1l-328615543.us-west-2.elb.amazonaws.com
Delivery IP: 54.214.22.243
Size: 1.56 KB
Result:
SMTP error from remote mail server after end of data: host productio-tcloadba-tkyjfaz4ap1l-328615543.us-west-2.elb.amazonaws.com [54.214.22.243]: 550 5.7.1 [CS] Message blocked. To fix this, visit http://fp.outboundfiltering.com/?str=0001.0
what i'm doing wrong here? I am not even reaching the spam folder..
It's because your server's IP is blocked by the destination mail server. Your server's IP is on their black list so instead of moving your emails to spam folder, they simply ignore your emails.
To make sure you're blocked, try sending an email to a Gmail address.
As the error says, you can go to this link for unblocking your server:
http://fp.outboundfiltering.com/?str=0001.0
I am almost done with a tool to detect if email is valid or not. I am stuck at small point where I have to detect If mail server or domain has catch-all policy enable.
Catch all: mail server will accept all email even if email address do not exits.
Thank you.
There is no 100% reliable way to detect a catch-all of a mail server you don't control yourself.
The most promising way is to generate a random address in the target domain which is definitely not used as a real account and send a test message.
If you don't get a reject while sending and no bounce to the envelope sender address of your script within a few minutes, there could be a catch-all involved. But it could also simply mean that the target server quarantined or dropped your message or that the bounce didn't make it back to you.
If you go down that road, make sure your tool generates valid messages, with all the necessary headers, has correct dns/helo settings, doesn't use any non-rfc smtp shortcuts, etc. in order not to get filtered.
On a side note: if this tool is going to be public, make sure its properly protected. Tools that automatically send mails are popular targets for abuse.
You can identify domain is catchall or not by using Telnet.
Create invalid email address against that domain.
e.g.
domain : example.com
Email Adddress : dummyemail#example.com, invalid.email#example.com
How to Telnet:
Step 1 - Find mail exchanger or mail server of example.com
Commmand :
nslookup -q=mx example.com
Response:
Non-authoritative answer:
example.com mail exchanger = 10 aspmx.l.google.com.
example.com mail exchanger = 20 alt1.aspmx.l.google.com.
example.com mail exchanger = 30 alt2.aspmx.l.google.com.
example.com mail exchanger = 40 aspmx2.googlemail.com.
example.com mail exchanger = 50 aspmx3.googlemail.com.
Step 2 - Now we know mail server so let connect to it.
Command:
telnet aspmx.l.google.com 25
Response:
Trying 74.125.24.27...
Connected to aspmx.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP z79si2772641pfi.381 - gsmtp
Step 3 - Enter helo hi
Command:
helo hi
Response:
250 mx.google.com at your service
Step 4 - Email address from which you telnet to targeted email address
Command:
mail from: <emailaddress#gmail.com>
Response:
250 2.1.0 OK z79si2772641pfi.381 - gsmtp
Step 5 - Target email address which you want to validate
Command:
rcpt to: <targetemailid#example.com>
Response:
250 2.1.5 OK z79si2772641pfi.381 - gsmtp
If you got "ok" for invalid email address then that domain is catchall domain.
A catch-all domain in simple terms means, the server of that company will catch any email sent to that domain, even a non-existent address and store it in a section called the catch-all. When this happens, you have no clue if it’s a legitimate email address or not.
I'm developing a system which gets emails from PIPE, verify if the email address which from the email was sent is in the client database, and write it into the database.
The problem is that I don't want to have security issues, and if someone sends an email with PHP to the system, it will log it too. So, how can I check if the email was sent by the properly mail server? I was thinking in getting the IP of the mail server of the domain and verify in Email Headers if it was sent from these server. So, if I got an email from test#hotmail.com, it would ping mail.hotmail.com and check if the email came from these IP address.
Anyway, if someone got a custom domain like yourdomain.com, running in a shared cPanel server, other people in these server could send emails with PHP and get the IP verify passed. So, I was thinking in checking if the email was sent with PHP or from a mail server, but I don't know how to do this.
What is your suggestion?
I was thinking in checking if the email was sent with PHP or from a mail server
You will not be able to find out the difference between these two normally. And email sent with PHP can look exactly the same like an email from a mail server and it is likely the case that an email sent with PHP is also an email from a mail server.
You can try to write a detection on your own (your own filter) based on the monitoring you do and finding out about wrong mails (or those reported back from your users if you can not monitor the emails deeply because of law regulations).
I found http://verify-email.org/ for you. They have an API so you can check the email adress by that service.
EDIT
When you check an email adres on the website you see this result:
MX record about gmail.com exists.
Connection succeeded to alt3.gmail-smtp-in.l.google.com SMTP.
220 mx.google.com ESMTP tz3si2159695bkb.62 - gsmtp
> HELO verify-email.org
250 mx.google.com at your service
> MAIL FROM: <check#verify-email.org>
=250 2.1.0 OK tz3si2159695bkb.62 - gsmtp
> RCPT TO: <test#gmail.com>
=550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596 tz3si2159695bkb.62 - gsmtp
You can build your own check by logging in to an smtp server and send the commands you see above:
> HELO verify-email.org
> MAIL FROM: <check#verify-email.org>
> RCPT TO: <test#gmail.com>
You can check for errors or success messages in the output you get. I think it's not difficult to build in php.
Eh, this is my first time answering anything so sorry if I misunderstood. Anyways, if you're doing a check for the email in PHP, I have something that might be able to help;
If($_POST['email']){
$Email = $_POST['email'];
$Allowed = array('gmail.com', 'yahoo.com', 'ymail.com', etc..);
If(filter_var($Email, FILTER_VALIDATE_EMAIL)){
$Domain = array_pop(explode('#', $Email));
If(!In_Array($Domain, $Allowed)){
Echo 'Your response here...';
}}}
or for checking the email's characters, you can call a function or check it yourself;
Function checkEmail($Email){
return preg_match("/^[\.A-z0-9_\-\+]+[#][A-z0-9_\-]+([.][A-z0-9_\-]+)+[A-z]{1,4}$/", $Email);
}
So it'd be something like;
checkEmail('email#domain.com');
That checks the input, and if it doesn't have the email characters, you can choose what to do.
Hope this helped!
Yes, there are many Email Verification tools out there. I personally like www.verifyemailaddress.org
But there are plenty of those tools to find.