Gmail rejecting mail.

Connect with other users about what to run on your webhosting (and how to run it) here.
knightmike
New to forums
New to forums
Posts: 10
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sat Apr 04, 2015 2:31 am

Gmail rejecting mail.

Post by knightmike »

Anybody else having mail sent from shared server rejected by gmail lately? I've tried from hosted18 and hosted34. I even tried adding "v=spf1 a mx -all" as a TXT record.
Naleksuh
This is my homepage
This is my homepage
Posts: 298
Joined: Thu Jul 25, 2019 12:35 am

Re: Gmail rejecting mail.

Post by Naleksuh »

What exactly do you mean by "rejecting" mail? Are the sends bouncing or just being marked as spam? I've had a lot of problem with mail on NFoservers too so I can relate, but not sure what the problem is in this case
knightmike
New to forums
New to forums
Posts: 10
Joined: Sat Apr 04, 2015 2:31 am

Re: Gmail rejecting mail.

Post by knightmike »

bounced back.
Naleksuh
This is my homepage
This is my homepage
Posts: 298
Joined: Thu Jul 25, 2019 12:35 am

Re: Gmail rejecting mail.

Post by Naleksuh »

Oh, that shouldn't be happening. Normally the main problem is them being marked as spam, but they should still go through even if they aren't verified senders or are getting flagged for various reasons. Are you sure it's a valid address?

It's also possible that email has been disabled completely, it happened to me once. You're able to send to non-Gmail addresses, right?
knightmike
New to forums
New to forums
Posts: 10
Joined: Sat Apr 04, 2015 2:31 am

Re: Gmail rejecting mail.

Post by knightmike »

Yes, it's a valid email address. Here's the response from gmail server. Sorry for wall of text. Not sure if this forum has a spoiler tag.
Return-Path: <>
X-Original-To: lanthirey@hosted18.nfoservers.com
Delivered-To: lanthirey@hosted18.nfoservers.com
Received: by hosted18.nfoservers.com (Postfix)
id 36F8869B4E; Thu, 17 Mar 2022 16:04:02 -0700 (PDT)
Date: Thu, 17 Mar 2022 16:04:02 -0700 (PDT)
From: MAILER-DAEMON@hosted18.nfoservers.com (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: lanthirey@hosted18.nfoservers.com
Auto-Submitted: auto-replied
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="1181F69B4D.1647558242/hosted18.nfoservers.com"
Message-Id: <20220317230402.36F8869B4E@hosted18.nfoservers.com>

This is a MIME-encapsulated message.

--1181F69B4D.1647558242/hosted18.nfoservers.com
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii

This is the mail system at host hosted18.nfoservers.com.

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

<someone@gmail.com>: host gmail-smtp-in.l.google.com[172.253.117.26]
said: 550-5.7.1 [72.5.53.23 12] Our system has detected that this
message is 550-5.7.1 likely unsolicited mail. To reduce the amount of spam
sent to Gmail, 550-5.7.1 this message has been blocked. Please visit
550-5.7.1 https://support.google.com/mail/?p=Unso ... ssageError 550
5.7.1 for more information.
q20-20020a656854000000b003816043f090si3575123pgt.645 - gsmtp (in reply to
end of DATA command)

--1181F69B4D.1647558242/hosted18.nfoservers.com
Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; hosted18.nfoservers.com
X-Postfix-Queue-ID: 1181F69B4D
X-Postfix-Sender: rfc822; lanthirey@hosted18.nfoservers.com
Arrival-Date: Thu, 17 Mar 2022 16:04:00 -0700 (PDT)

Final-Recipient: rfc822; someone@gmail.com
Original-Recipient: rfc822;someone@gmail.com
Action: failed
Status: 5.7.1
Remote-MTA: dns; gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 550-5.7.1 [72.5.53.23 12] Our system has detected
that this message is 550-5.7.1 likely unsolicited mail. To reduce the
amount of spam sent to Gmail, 550-5.7.1 this message has been blocked.
Please visit 550-5.7.1
https://support.google.com/mail/?p=Unso ... ssageError 550 5.7.1 for
more information. q20-20020a656854000000b003816043f090si3575123pgt.645 -
gsmtp

--1181F69B4D.1647558242/hosted18.nfoservers.com
Content-Description: Undelivered Message
Content-Type: message/rfc822

Return-Path: <lanthirey@hosted18.nfoservers.com>
Received: by hosted18.nfoservers.com (Postfix, from userid 3148)
id 1181F69B4D; Thu, 17 Mar 2022 16:04:00 -0700 (PDT)
To: someone@gmail.com
Subject: Portal Answer
X-PHP-Originating-Script: 3148:portal.php
From: lanthirey@hosted18.nfoservers.com
Message-Id: <20220317230401.1181F69B4D@hosted18.nfoservers.com>
Date: Thu, 17 Mar 2022 16:04:00 -0700 (PDT)

this is a test.

--1181F69B4D.1647558242/hosted18.nfoservers.com--
Naleksuh
This is my homepage
This is my homepage
Posts: 298
Joined: Thu Jul 25, 2019 12:35 am

Re: Gmail rejecting mail.

Post by Naleksuh »

You appear to be trying to send to the address "someone@gmail.com"- since someone else has likely taken that, I assume it's a different address that you've changed for privacy etc?

The headers also have a clear error message: Gmail has blocked the email as suspected spam. You're able to send email to non-Gmail addresses, right? If so, your next step would be to improve the trustworthiness of outgoing emails
knightmike
New to forums
New to forums
Posts: 10
Joined: Sat Apr 04, 2015 2:31 am

Re: Gmail rejecting mail.

Post by knightmike »

I'm able to send the same email to an hotmail address but gmail bounces it.
knightmike
New to forums
New to forums
Posts: 10
Joined: Sat Apr 04, 2015 2:31 am

Re: Gmail rejecting mail.

Post by knightmike »

How do I improve the trustworthiness? I already added the txt record. What else can I do?
Naleksuh
This is my homepage
This is my homepage
Posts: 298
Joined: Thu Jul 25, 2019 12:35 am

Re: Gmail rejecting mail.

Post by Naleksuh »

That is something that depends a lot on what you're sending, how you're sending it, etc, which is difficult to do without revealing any information. For one, I do see that you're not using a "from" parameter, just sending from hosted18.nfoservers.com, a domain which you don't control, and doesn't have the record you added. You'd likely want to start with a From parameter. The content of your messages, and how you are sending them, etc, would also play a role. What kind are these? Where is the code? etc.
knightmike
New to forums
New to forums
Posts: 10
Joined: Sat Apr 04, 2015 2:31 am

Re: Gmail rejecting mail.

Post by knightmike »

Here's the script. It hasn't changed in months. Except for the from header. I added that after the problem began because that's what google recommended. Aside from that, this script has been working fine up until a few days ago.

$s_address = "someone@gmail.com";
$s_subject = "Portal Answer";
$s_message = "This is a test.";
$a_headers = ["From" => "lanthirey@hosted18.nfoservers.com"];
mail($s_address, $s_subject, $s_message, $a_headers);

Frequency of emails sent is < 1/day.
Naleksuh
This is my homepage
This is my homepage
Posts: 298
Joined: Thu Jul 25, 2019 12:35 am

Re: Gmail rejecting mail.

Post by Naleksuh »

I meant add a From header with an address you control, not add a From header with the email it's already sending from, that wouldn't change anything as that's already where it's from.

For example, whichever domain you added the DNS record to. It wasn't hosted18.nfoservers.com, you don't control that domain
knightmike
New to forums
New to forums
Posts: 10
Joined: Sat Apr 04, 2015 2:31 am

Re: Gmail rejecting mail.

Post by knightmike »

ah okay. i'll give that a try. I only did that because those were google's instructions. The said the from header should match the sender.
Naleksuh
This is my homepage
This is my homepage
Posts: 298
Joined: Thu Jul 25, 2019 12:35 am

Re: Gmail rejecting mail.

Post by Naleksuh »

Yes, the from address should match the sender- and you are the sender, so it should be your domain.

What page were you looking at?
knightmike
New to forums
New to forums
Posts: 10
Joined: Sat Apr 04, 2015 2:31 am

Re: Gmail rejecting mail.

Post by knightmike »

That didn't work either but I'll try again in 48 hours. Maybe I'm on a naughty list now.
Naleksuh
This is my homepage
This is my homepage
Posts: 298
Joined: Thu Jul 25, 2019 12:35 am

Re: Gmail rejecting mail.

Post by Naleksuh »

It's difficult to offer any useful advice when there's pretty much no information on what is going on with your emails. You might consider joining us in #nfo-support or writing a help request from the Help! option in the control panel
Post Reply