Forum Moderators: phranque
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of srs0=3dc0=hr=my.server.com=nobody@mysite.com designates 123.45.67.89 as permitted sender) smtp.mailfrom="SRS0=3dc0=hr=my.server.com=nobody@mysite.com";
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mysite.com open (MAIL, "|/usr/sbin/sendmail -t") || die "Can't open /usr/sbin/sendmail!\n";
# $found_email is set and verified earlier
print MAIL "To: $found_email\n";
print MAIL "From: info\@mysite.com (Me)\n";
print MAIL "Subject: Blah blah blah\n\n\n";
print MAIL "yada yada yada";
close (MAIL); use Net::SMTP;
use MIME::Lite;
$login_user = 'noreply@mysite.com';
$login_pass = <PASSWORD>;
$to = 'me@gmail.com';
$msg = MIME::Lite ->new (
From => 'info@mysite.com',
To => $to,
Type => 'text/html',
Subject => 'Testing Net::SMTP',
Data => qq~
The <i>body</i> of the <b>email</b> Net-SMTP example
~
);
$smtp = Net::SMTP->new(
'mail.mysite.com',
Port => 465,
SSL => 1,
Debug => 1,
);
$smtp->auth($login_user, $login_pass) or die('Could not authenticate');
$smtp->mail($login_user);
if ($smtp->to($to)) {
$smtp->data();
$smtp->datasend( $msg->as_string() );
$smtp->dataend();
}
else {
print "Error: ", $smtp->message();
}
$smtp->quit;
print "Done";
exit; Message ID<6570e753.500a0220.1ee56.8ea5SMTPIN_ADDED_MISSING@mx.google.com>
Created at:Wed, Dec 6, 2023 at 4:27 PM (Delivered after 2 seconds)
From:info@mysite.com Using MIME::Lite 3.033 (F2.84; T2.24; A2.21; B3.16; Q3.16)
To:me@gmail.com
Subject:Testing Net::SMTP
SPF:PASS with IP 123.45.67.89 Learn more
DKIM:'PASS' with domain mysite.com Learn more
DMARC:'PASS' Learn more The most successful solution I've found to date is not technical, but is simply to put clear instructions on the form to check spam folder.
Did you check the ip address on spamhaus?
I would say try and migrate your script to use SMTP if possible.
SpamAssassin Score: -5.01
Message is NOT marked as spam
Points breakdown:
0.0 RCVD_IN_ZEN_BLOCKED_OPENDNS RBL: ADMINISTRATOR NOTICE: The query
to zen.spamhaus.org was blocked due to
usage of an open resolver. See
https://www.spamhaus.org/returnc/pub/
[x.x.x.x listed in zen.spamhaus.org]
-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/,
high trust
[x.x.x.x listed in list.dnswl.org]
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
-0.0 T_SCC_BODY_TEXT_LINE No description available.
Received: from localhost (localhost [127.0.0.1])
From:
To:
Subject:
Message-Id:
Date:
Hello User,
Some text
SpamAssassin Score: -5.106
Message is NOT marked as spam
Points breakdown:
0.0 RCVD_IN_ZEN_BLOCKED_OPENDNS RBL: ADMINISTRATOR NOTICE: The query
to zen.spamhaus.org was blocked due to
usage of an open resolver. See
https://www.spamhaus.org/returnc/pub/
[123.45.67.89 listed in zen.spamhaus.org]
0.0 URIBL_DBL_BLOCKED_OPENDNS ADMINISTRATOR NOTICE: The query to
dbl.spamhaus.org was blocked due to usage
of an open resolver. See
https://www.spamhaus.org/returnc/pub/
[URIs: gonc.net]
0.0 URIBL_ZEN_BLOCKED_OPENDNS ADMINISTRATOR NOTICE: The query to
zen.spamhaus.org was blocked due to usage
of an open resolver. See
https://www.spamhaus.org/returnc/pub/
[URIs: gonc.net]
-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/,
high trust
[123.45.67.89 listed in list.dnswl.org]
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
0.0 HTML_MESSAGE BODY: HTML included in message
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
valid
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's domain
-0.0 T_SCC_BODY_TEXT_LINE No description available.
0.0 TVD_SPACE_RATIO No description available. This is a multi-part message in MIME format.
--_----------=_170201855399430
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain
This is the ID:
1702018553-7246cc4ded783e20548955f80f98dbc7-4165f4608534e7e15bb78aa956f6210=
c@mysite.com
--_----------=_170201855399430
Content-Transfer-Encoding: 8bit
Content-Type: text/html
<body>
<b>ID:</b><br>
1702018553-7246cc4ded783e20548955f80f98dbc7-4165f4608534e7e15bb78aa956f6210c@mysite.com
</body>
--_----------=_170201855399430-- The correct servers are imap.gmail com and smtp.gmail.com, and the authentication method for both should be OAuth2. Check that cookies are allowed in TB Options/Privacy & Security, remove the Saved Passwords in Options/Privacy & Security, restart TB, enter the account password in the OAuth browser window when prompted.