I've been trying to set up google business email smtp. I've created an account with my own email address (username@mydomain.me). This is hosted by gmail.
I'm using the phpMailer class on Heroku. I've already uncommented the php_openssl.dll in the php.ini file.
I keep getting this error:
ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Name or service not known (0) SMTP Error: Could not connect to SMTP host.
Does anyone know what is going wrong here?
...
$mail->Host = "ssl://stmp.gmail.com";
$mail->SMTPDebug = 2;
$mail->SMTPAuth = true;
$mail->Port = 587;
$mail->SMTPSecure = 'ssl';
$mail->Username = "username@myDomain.me";
$mail->Password = "mypassword";
$mail->SetFrom('username@myDomain.me', '...');
$mail->AddReplyTo("an@email.co", '');
$mail->Subject = '...';
...