Email does not send to hostgator addresses

Asked

Viewed 308 times

1

I am configuring the sending of email in wordpress without plugin with native wpmail, however I can not send to an email address hostgator, when I send to gmail or other provider works perfectly, but for addresses not known ie, that are different from gmail, outlook, Hotmail etc... Nothing enough, some configuration is missing?

Follow the code of what I did in wp-config.php, I removed the part of the password for security

/* Mail Config */
define( 'SMTP_HOST', 'cheapremovals.com' );  // A2 Hosting server name. For example, "a2ss10.a2hosting.com"
define( 'SMTP_AUTH', true );
define( 'SMTP_PORT', '465' );
define( 'SMTP_SECURE', 'ssl' );
define( 'SMTP_USERNAME', '[email protected]' );  // Username for SMTP authentication
define( 'SMTP_FROM',     '[email protected]' );  // SMTP From address
define( 'SMTP_FROMNAME', 'Cheap Removals' );         // SMTP From name

and in functions.php I put this

add_action( 'phpmailer_init', 'send_smtp_email' );
function send_smtp_email( $phpmailer ) {
    $phpmailer->isSMTP();
    $phpmailer->Host       = SMTP_HOST;
    $phpmailer->SMTPAuth   = SMTP_AUTH;
    $phpmailer->Port       = SMTP_PORT;
    $phpmailer->SMTPSecure = SMTP_SECURE;
    $phpmailer->Username   = SMTP_USERNAME;
    $phpmailer->Password   = SMTP_PASSWORD;
    $phpmailer->From       = SMTP_FROM;
    $phpmailer->FromName   = SMTP_FROMNAME;
}
  • This is probably due to some anti-spam filter from the hostgator

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.