I am using Gmail SMTP with wordpress to send mail with my custom domain ([email protected]). Emails are successfully sent but always land in spam folder in every webmail provider (Eg, Gmail, Rediffmail, Yahoo, Outlook, etc)

Gmail SMTP server address: smtp.gmail.com
Gmail SMTP name: Your full name
Gmail SMTP username: Your full Gmail address (e.g. [email protected])
Gmail SMTP password: The password that you use to log in to Gmail
Gmail SMTP port (TLS): 587
Gmail SMTP port (SSL): 465

This happen because of they couldn't verify the sender of this email, and DNS record like SPF and DKIM. I googled and i got SPF record for Gmail v=spf1 a include:_spf.google.com ~all

But how to generate DKIM for my Gmail SMTP. I have checked this Google document : https://support.google.com/a/answer/180504#turn-on-dkim but it about the Google Business Mail/WorkMail not the Free Gmail ([email protected]).

Can you tell me how can i generate DKIM for my Gmail and How can i make my Email not stand in Spam folder.

My current DMARC v=DMARC1; p=none . I have noticed mail sent by Gmail SMTP says DMARC Failed in Email Header but my same record says DMARC Passed when it sent from ZohoMail

Email Header

Return-Path: <[email protected]>
Delivered-To: [email protected]
X-DKIM-Verification: dkim domain= -; verify=2; NO Signature;
X-SPF-Verification: spf domain=gmail.com; result=pass; clientip=; SAligned=0; RAligned=0;
X-DMARC-Verification: dmarc=none; dkim=fail; spf=fail; pct=100; domain=vpnsreview.net;
Received: (qmail 8648 invoked from network); 5 Jan 2023 18:08:13 -0000
X-IN-VDRT-SpamState: 0\LEGIT
X-IN-VDRT-SpamScore: 0
X-IN-VDRT-SpamCause: gggruggvucftvghtrhhoucdtuddrgedvhedrjeekgdduudduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecutffgfffkhffhnecuuegrihhlohhuthemuceftddtnecunecujfgurhephfffuffkvfggtgesrgdtreertddtjeenucfhrhhomheprhgrjhgvvghvsehsvghrvhgvrhhhuhhmphdrtghomhenucggtffrrghtthgvrhhnpedvfffgjeeuvefgvdffjeffgeduvdffhfelfffglefgkeegueejvdetleefjeejffenucfkphepheegrddvuddvrddufedurddukedunecuvehluhhsthgvrhfuihiivgeptd
Received: from mail-pl1-f176.google.com (
by 0 with ESMTPS (AES128-GCM-SHA256 encrypted); 5 Jan 2023 18:08:13 -0000
Received: by mail-pl1-f176.google.com with SMTP id c2so12581044plc.5
for <[email protected]>; Thu, 05 Jan 2023 10:08:12 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
X-Gm-Message-State: AFqh2kqcCcby96EW5MSximnYg/GH7FCREX70wK8ECjXDn1Vz/fKve6JV
X-Google-Smtp-Source: AMrXdXuIfyxf9/D9ZCdbcaT4IOZpKtwi+ColF32x3K8BwBv3Aszaqopihz7sVhCXXYwLP1C/Ob8Aww==
X-Received: by 2002:a05:6a21:2d05:b0:a7:92f2:9b65 with SMTP id tw5-20020a056a212d0500b000a792f29b65mr67293906pzb.59.1672942089426;
Thu, 05 Jan 2023 10:08:09 -0800 (PST)
Return-Path: <[email protected]>
Received: from [] (ec2-54-212-131-181.us-west-2.compute.amazonaws.com. [])
by smtp.gmail.com with ESMTPSA id i2-20020a170902c94200b00189618fc2d8sm26355711pla.242.2023.
for <[email protected]>
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Thu, 05 Jan 2023 10:08:09 -0800 (PST)
From: [email protected]
Date: Thu, 05 Jan 2023 18:07:59 +0000
Subject: SMTP test from smtp.gmail.com
To: [email protected]
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="=-vPe7/WRdKCpdInodHv+yEg==" 
  • Is your question for the domain vpnsreview.net?
    – Paul
    Jan 6, 2023 at 11:58
  • @Paul Yes and testing some other domain too. Jan 6, 2023 at 14:17
  • That domain's DNS records cannot currently support sending from anywhere. Your problems are beyond DKIM (the topic of this question). I recommend substantially revising or submitting a new question that describes the problem you are having without assuming something specific (such as DKIM).
    – Paul
    Jan 7, 2023 at 13:02

2 Answers 2


As far as I know Gmail will not sign for custom domain when sending through free Gmail account.

In reality this should be YOU (meaning - your wordpress system) which does DKIM signing.

Without email headers it is hard to tell why exactly DMARC fails for your emails but I suspect this is because of lack of alignment between envelope (likely - your free gmail email address) and header sender (likely - your custom domain email address).

  • I know Gmail SMTP is not good solution but it Free and Easy. I have updated Email Header in question. Please check why DMARC Fails Jan 6, 2023 at 4:18
  • Have a look at: appmaildev.com/en/dkimfile (paste the headers to the text box). In short - SPF is set to disable all sending from vpnsreview.net domain and DMARC fails because of that and missing DKIM signature as of now. Additionally Return-Path does not match with From and this as far as I remember would cause the abovementioned misalignment.
    – Tomek
    Jan 6, 2023 at 12:40
  • I'm not clear that Google will forward headers through the submission port.
    – Paul
    Jan 7, 2023 at 13:03
  • 1
    I share Paul's worries. I would look at a free SMTP Relay provider that supports DKIM on custom domains. I'm not in any way affiliated, but know that SendGrid offers that with 100 free emails daily.
    – Reinto
    Jan 11, 2023 at 9:10

It's not possible with a free Gmail account. It's only available to Google Workspace customers.

Sign up for Google Workspace or use an external SMTP server (create your own or use 3rd party email services).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .