I need to send emails in my webapp and I use phpmailer for that. It works perfectly in my localhost but when running it into my Vm Instance in google cloud it doesn't send the email and phpmailer doesn't throw any error.
I already tried by allowing 465,25,2525,487 ports for outgoing traffic on the firewall rules. And i've changed the phpmailer port smtp from 25 to 487 but it stills without working.
The account i'm using for sending the email is a gSuite account with my custom domain.
And I don't want to use thirdy part platforms like sendgrid of that stuff.
I would really appreciate your help! Thanks.
public $From = 'mydomain@domain.com';
public $FromName = "X";
public $Host = 'smtp.gmail.com';
public $Mailer = 'smtp';
public $SMTPAuth = true;
public $Username = 'mydomain@domain.com';
public $Password = 'mypassword';
public $SMTPSecure = 'tls';
public $WordWrap = 75;