Why can I not send emails to Gmail email addresses?

Chris Wright
Published: 12 February 2024Last updated: 13 February 2024
Share:

When an email is sent to Gmail without an SPF (Sender Policy Framework) record, it may fail to be delivered or may be marked as spam by Gmail's email filtering system. SPF is a mechanism used to prevent email spoofing and unauthorised use of a domain's email addresses. It is a TXT record that specifies which mail servers are authorized to send emails on behalf of a domain.

If your domain name does not include an SPF record then this is likely that you will receive bouncebacks when sending to Gmail email addresses. These bouncebacks will look something like this:

A message that you sent could not be delivered to one or more of its
 recipients. This is a permanent error. The following address(es) failed:

  yourgmailaddress@gmail.com
    host gmail-smtp-in.l.google.com [142.251.168.27]
    SMTP error from remote mail server after pipelined end of data:
    550-5.7.26 This mail has been blocked because the sender is unauthenticated.
    550-5.7.26 Gmail requires all senders to authenticate with either SPF or DKIM.
    550-5.7.26
    550-5.7.26  Authentication results:
    550-5.7.26  DKIM = did not pass
    550-5.7.26  SPF [your20idomain.com] with ip: [185.151.28.66] = did not pass
    550-5.7.26
    550-5.7.26  For instructions on setting up authentication, go to
    550 5.7.26  https://support.google.com/mail/answer/81126#authentication fk12-20020a05600c0ccc00b00410c61b9be8si1229861wmb.183 - gsmtp

An SPF record can be added to your domain using these steps:

Firstly, access the DNS Management interface for your domain name. If the domain is registered with us, you can access this from the Manage Domains area of the control panel. If the domain is not with us but is assigned to a hosting package, you can reach this interface via the Manage Hosting -> [Package Name] -> Options -> Manage DNS section.

Towards the bottom of the Manage DNS page, you will see 3 inputs to allow you to add new records. To add it:

- Leave the 'Name' field blank
- Select 'TXT' for Type
- Enter v=spf1 include:spf.stackmail.com a mx -all as data 
- Then save the changes. Your domain is now protected by an SPF record.

More information can be found here.