Jump to content

SMTP Gmail config not works!! 1.4.3


Recommended Posts

Do not send mail using SMTP Gmail...

I have tried many solutions on this board, but none of them work!
To test, I used a script with pear package

<?php

      require_once "Mail.php";

       $from = "";
       $to = "";
       $subject = "Hi!";
       $body = "hi. its work";

       $host = "ssl://smtp.gmail.com";
       $port = "465";
       $username = "[email protected]";
       $password = "mypass";

       $headers = array ('From' => $from,
         'To' => $to,
         'Subject' => $subject);
       $smtp = Mail::factory('smtp',
         array ('host' => $host,
           'port' => $port,
           'auth' => true,
           'username' => $username,
           'password' => $password));

       $mail = $smtp->send($to, $headers, $body);

       if (PEAR::isError($mail)) {
         echo("
" . $mail->getMessage() . "");
        } else {
         echo("
Message successfully sent!");
        }

   ?>  <!-- end of php tag-->



It's work! Mail send!
but does not work in prestashop
unfortunately I can not use php mail

Link to comment
Share on other sites

The best solution is to create an account in google apps using your domain
and then use php mail in prestashop.
1. It works perfect
2. It looks more pro because you are using your domain for email


I have a dedicated server, at which several different sites / domains

- when sending mail is seen as mail.site.com

- prestashop same on my domain site2.com



php mail to send the customer can see a warning "mail.site.com != site2.com".
If I make a mail in Google Apps for site2.com - php mail will still send mail from mail.site.com, yet do not understand what this help?
After all, mail will still go through mail.site.com

P.S. it uses mail [email protected]
Link to comment
Share on other sites

  • 3 weeks later...
The best solution is to create an account in google apps using your domain

and then use php mail in prestashop.

1. It works perfect

2. It looks more pro because you are using your domain for email

Did you try this? It doesn't work for me, but may be i'm doing something wrong. Can you describe settings?

Link to comment
Share on other sites

×
×
  • Create New...