Mail not working anymore


#21

http://www.flysnowdonia.com/contact.php but it’s behind a username and password at the moment. If you need access please send me a private message with a username and password to add and I’ll give you access.

Here is the code I’m using:
$email = $input[‘email’];
$name = $input[‘name’];
$subject = “Flight School enquiry $name”;
ob_start();
$time = new DateTime(“now”, new DateTimeZone(“Europe/London”));
echo(“Time sent:” . $time->format(“Y-m-d H:i:s”) . “\n”);
echo(“Contact name:$name\n”);
echo(“Contact email:$email\n”);
echo(“Contact telephone:” . $input[‘telephone’] . “\n”);
echo(“Contact mobile:” . $input[‘mobile’] . “\n”);
echo(“Comment:” . $input[‘comment’] . “\n”);
$message = ob_get_contents();
ob_end_clean();
if(mail(‘a@validaddress.com’, “Subject: $subject”, $message, “From: $email”))
{
$file = fopen("…/tmp/records.txt",“a”);
if ($file)
{
$record = urlencode($message) . “/n”;
fputs($file,$record);
fclose($file);
}
}

Messages are written to the log and seem to increase the sent mail stats but never arrive at the destination


#22

@ton31337 should check this soon (like 11 hours from now), please be patient and sorry for the delay :slight_smile:


#23

Please create an access for me for testing purposes.


#25

account created username: ton31337
password: test1234

Let me know when your done with it as I’ll remove it again


#26

I’ll create access for you as soon as possible. I think in some hours, I’m very busy at the moment. Thank you!


#27

I’ve checked postfix logs and we see that this email was sent, but rejected at destination server with an error:

Sender address rejected: Domain not found (in reply to RCPT TO command))

Probably the mail server (mailserver.flysnowdonia.com) handling this domain is not accepting emails from 000webhost.com or they apply other validations which reject them. Please contact them.


#28

Thanks, I’ll try another destination address on a server I control as well to see what it could be.


#29

I think I’ve found the issue. Your server is setup to say that its called MAIL FROM:<121810@us-imm-node1b.000webhost. io> in the SMTP handshake.
Unfortunately this name doesn’t resolve via DNS so it’s later rejected during the checking of the sender address later on:

START Sender address RESTRICTIONS <<<
generic_checks: name=reject_unknown_sender_domain
reject_unknown_address: 121810 @us-imm-node1b.000webhost.io
ctable_locate: move existing entry key 121810 @us-imm-node1b.000webhost.io
reject_unknown_mailhost: us-imm-node1b.000webhost. io
lookup us-imm-node1b.000webhost. io type MX flags 0
dns_query: us-imm-node1b.000webhost. io (MX): Host not found
lookup us-imm-node1b.000webhost. io type A flags 0
dns_query: us-imm-node1b.000webhost. io (A): Host not found
lookup us-imm-node1b.000webhost. io type AAAA flags 0
dns_query: us-imm-node1b.000webhost. io (AAAA): Host not found
NOQUEUE: reject: RCPT from us-imm-postlady1.000webhost. io[153.92.0.72]: 450 4.1.8 <121810@us-imm-node1b.000webhost. io>: Sender address rejected: Domain not found; from=<121810@us-imm-node1b.000webhost. io> to=<A@ ValidAddress> proto=ESMTP helo=<us-imm-postlady1.000webhost. io>
generic_checks: name=reject_unknown_sender_domain status=2

END Sender address RESTRICTIONS <<<

I don’t have any say in the DNS servers used by the mailhosts at the ISP so I have to ask why you are sending mails from an address not resolvable via the normal DNS system when you clearly have a .com address that could be used.
If this can’t be changed is there any other way I can send emails from php code?


#30

Hi ton31337,
I’ve build a little apk for the test. Please tell me where I can send you the Apk file because I cannot upload here (system does not allow me). Do I have to change password also to my 000webhost account? Please tell me what you need and sorry for my late response but today was very busy.


#31

Hi,

I’m having the same issue. My php form has been working fine up until I last tested it about 10 hours ago. Now I’m not receiving the test emails. I haven’t changed anything related to the actual form itself (only adding country names - it’s a World Cup thing).

Scrap that. I tried one more time before posting this message and it worked again.

Still if anyone has any information as to why it stopped working, that might be helpful. Thanks.

Stu


#32

If you zip it- you should be able to upload into your 000webhost public_html or other directory like application.zip


#33

Thanks infinity, I uploaded it in public_html folder. Please contact me for anything you need to solve my problem. Thank you very much


#34

I see only these errors


#35

The first message “Sto provando ad inviare la mail, un attimo di pazienza” it means “I’m trying to send the mail, plase wait”. I Haven’t second message with the error you shown me to your 2°image. I receive “Mail inviata con successo!” This mean “mail sent successfully”. This is the response when response content is “Message has been sent” (You can see on the php script). But I haven’t received the email

.


#36

Further to my post above, I did receive the missing emails in the end. They both suddenly appeared in my inbox at the same time about two hours later. Any idea why that might have been?


#37

Hi, there are some news? Have somebody tried the little application, please check it and help me!!!
Thank you!


#38

Yeah I tried it a bunch of times and never received any mails from it to several inboxes.


#39

What could be causing this problem? Now I think you have everything, the files and the php script, the app that manages everything. I hope in your help !!


#40

Could someone help me please? there’s a solution? Thanks


#41

Hello, I’m always waiting for a solution because I have not yet solved the problem, I ask you to help me because I can not understand why the mail does not work. I hope in your help, thank you.