SMTP can send emails through two different servers:
mail.your_domain.com – login with a mail account username & password
localhost – login with a web server user (ftp/shell) username & password
The combination of “$mail->Host = “mail.myDomain.com”; " and " $mail->Username = “user”; // Make sure to replace this with your shell enabled user” make us think you might be using the wrong user/password for the server you’re trying to use.
The example code you’re using from our PHPMailer wiki page has the “localhost” server, so the comment about “shell enabled user” is fine, but when you replaced that with your actual mail server, you needed to switch to using a username & password that works on the actual mail server, which means a mail account username & password.
Switching away from localhost is fine, but you’ve got to use a mail account username & password with it.
Also, one of our lovely tech supporters just responded to your submitted ticket! Please reply there directly with the requested details so we can further look into your issue. Thanks!