We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8168
    • 1,118 Posts
    Hi guys,

    Has anyone successfully (outisde of USA) used GMAIL to send emails from eForm using the SMTP settings? Love some help on this!


    Cheers,

    dubbs.
      • 8168
      • 1,118 Posts
      Currently getting the error:

      Main mail: Mailer was unable to send mailThe following From address failed: [email protected]


      Any ideas?

      SMTP is configured as below in the eform.inc.php

      $mail->IsSMTP();
      $mail->Host = "smtp.gmail.com";
      $mail->SMTPAuth = true;
      $mail->SMTPSecure= "ssl";
      $mail->Port = 465;
      $mail->Username = "[email protected]";
      $mail->Password = "password";



      ????
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Can it send mail if the From address is a local email address? I’ve run across servers configured so they would refuse any outgoing mail that wasn’t from the actual sending domain.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 8168
          • 1,118 Posts
          I am not sure this helps, but I managed to get this to work by:

          a) Not amending anything in the eform.inc.php file - e.g. leave that as it is from the original MODx install, instead add in the code below (replacing what is already there) in the class.phpmailer.php file

          var $Host = "smtp.gmail.com";

          /**
          * Sets the default SMTP server port.
          * @var int
          */
          var $Port = 465;

          /**
          * Sets the SMTP HELO of the message (Default is $Hostname).
          * @var string
          */
          var $Helo = "";

          /**
          * Sets SMTP authentication. Utilizes the Username and Password variables.
          * @var bool
          */
          var $SMTPAuth = true;

          /**
          * Sets SMTP username.
          * @var string
          */
          var $Username = "[email protected]";

          /**
          * Sets SMTP password.
          * @var string
          */
          var $Password = "password";