Ali Samie Posted July 22, 2022 Share Posted July 22, 2022 (edited) --------------------------------------------UPDATE: It won't work after Sep 2024 This method won't work at the end of this September. Why? Check these pages:https://support.google.com/accounts/answer/6010255https://workspaceupdates.googleblog.com/2023/09/winding-down-google-sync-and-less-secure-apps-support.html Alternative? papercut from ChangemakerStudios and docker If you are using docker for your development environment, you are my good friend and I like you, otherwise, I have no idea what to do. Find your way. I promise with docker it's gonna be too easy that you can't believe it. Add `papercut` as a new service to your `docker-compose.yml` file. # Other configurations # ... # ... # ... services: #other services # ... # ... # ... papercut: image: changemakerstudiosus/papercut-smtp:latest ports: - 10300:80 # choose any port you like, for me `localhost:10300` would be the port to access the papercut web application - 25:25 Run or restart your containers to have the new service added to the same network. Setup SMTP configuration in Prestashop backoffice like this image Set the method as "Set my own SMTP ...". Set the SMTP server to "papercut" which is the name of the service or container, and it's accessible with that name in the network of containers. Leave the email domain, username, and password fields empty. Set encryption to none and the port to 25. This number comes from the docker-compose file, you can change it if you need. Now try sending an email by triggers like account creation order status change or use of the Mail::send() method, here's a demo: Sent emails list Preview an email: Thanks to this amazing repository on Github: https://github.com/ChangemakerStudios/Papercut-SMTP ---------------------------------------------------------------------------- How to test email functions with a Gmail account in Prestashop? Hi community. I have seen some questions about the email issues. I want to show you how to set up a Gmail account in Prestashop as your temporary SMTP server, which lets you easily test your email functionality, templates and related stuff. This is what I went through in a local server and I manged to get it working. Set up a new Gmail account (if you do not have any). Sign in to your account. Open BO of your Prestashop. Go under this menu "Advanced Parameters > E-mail". Find the "Email" form. Fill the form like this: Send emails to > Select "Customer Service" Radio Buttons > Select "Set my own SMTP parameters (for advanced users ONLY)" Email domain name > Let it be blank SMTP server > "smtp.gmail.com" SMTP username > Fill it with your gmail for example : [email protected] SMTP password > Fill it with the account password (if does not work create an APP password and use that) Encryption > Select "TLS" Port > "578" Radio Buttons > Select "Both" Log emails > Select "Yes" After you have saved these, send a test email in the next form with title of "Test your email configuration". I have added a video for you to follow the steps. It very easy. I use this method just for testing, like when you want to test the email templates and you do not want to put time on setting up an SMTP server locally. I do not recommend using this in a production shop. rec-2022-07-22_08_15_12.mp4 Edited September 12 by Ali Samie Update with new solution (see edit history) Link to comment Share on other sites More sharing options...
juanrojas Posted July 22, 2022 Share Posted July 22, 2022 recently you have been told that it does not work Link to comment Share on other sites More sharing options...
Ali Samie Posted July 22, 2022 Author Share Posted July 22, 2022 Just now, juanrojas said: recently you have been told that it does not work It works for me. So may be they missed some thing in the set up or there are server issues! And I have mentioned that this works in my local server. So there it could be useful if a developer is working on email templates. 9 minutes ago, stifler97 said: This is what I went through in a local server and I manged to get it working. Link to comment Share on other sites More sharing options...
juanrojas Posted July 22, 2022 Share Posted July 22, 2022 do you have a video to see that it actually works? I really doubt it Link to comment Share on other sites More sharing options...
Ali Samie Posted July 22, 2022 Author Share Posted July 22, 2022 I wonder why it does not work with APP PASSWORD right now. I did this earlier with this password. But now it works with my account password normally. Link to comment Share on other sites More sharing options...
Ali Samie Posted July 22, 2022 Author Share Posted July 22, 2022 @juanrojas I just updated the topic. Added a video. You can check It might be tricky to get it to work properly. But I tried and it works pretty fast. I like this. rec-2022-07-22_08_15_12.mp4 1 Link to comment Share on other sites More sharing options...
Ali Samie Posted July 22, 2022 Author Share Posted July 22, 2022 3 hours ago, juanrojas said: do you have a video to see that it actually works? I really doubt it Did you have a chance to check this? Link to comment Share on other sites More sharing options...
gouna Posted August 21, 2022 Share Posted August 21, 2022 Hi, don't work with a 1.7.8.7 Link to comment Share on other sites More sharing options...
Ali Samie Posted August 21, 2022 Author Share Posted August 21, 2022 4 hours ago, gouna said: Hi, don't work with a 1.7.8.7 Hi. Thanks for the report. Instead of these On 7/22/2022 at 6:46 AM, stifler97 said: SMTP username > Fill it with your gmail for example : [email protected] SMTP password > Fill it with the account password (if does not work create an APP password and use that) Encryption > Select "TLS" Port > "578" I did these: SMTP username > Fill it with your google account for example if your gmail address is [email protected] you must enter myaccount SMTP password > Create an APP password in your google account panel and paste it here Encryption > Select "SSL" Port > "465" Test video: rec-2022-08-21_15.21.12.mp4 1 Link to comment Share on other sites More sharing options...
MultiColor Desiggns Posted January 19, 2023 Share Posted January 19, 2023 Hello I tried all the above methods in my client website indianbasket.pl but I am getting below error. I created app password and tested. My client wants to send email conformation from Gmail only. Error: Please check your configuration Failed to authenticate on SMTP server with username "[email protected]" using 3 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials kr12-20020a1709079a0c00b0084d44553af9sm14245369ejc.215 - gsmtp ". Authenticator PLAIN returned Expected response code 235 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials kr12-20020a1709079a0c00b0084d44553af9sm14245369ejc.215 - gsmtp ". Authenticator XOAUTH2 returned Expected response code 250 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials kr12-20020a1709079a0c00b0084d44553af9sm14245369ejc.215 - gsmtp ". Link to comment Share on other sites More sharing options...
vento Posted March 11, 2023 Share Posted March 11, 2023 Hello, I guess the problem is that Prestashop cannot do OAuth2 authentication. OAuth2 is necessary for gmail Link to comment Share on other sites More sharing options...
Nickz Posted March 11, 2023 Share Posted March 11, 2023 I think its not a good Idea to connect to Google too much. Google is not playing with open cards so why should you join them. You are not their client. Link to comment Share on other sites More sharing options...
FlamingoFr Posted July 13, 2023 Share Posted July 13, 2023 With my Google workspace account, I set smpt server to smtp-relay.gmail.com SSL/465 General password didn't work. I set an App password and it works fine! Link to comment Share on other sites More sharing options...
bbajc Posted September 8, 2023 Share Posted September 8, 2023 Hello, I am experiencing the same problems, all my customers with Gmail accounts are not receiving their email. I tried the different configurations, with the password generated by gmail, no results. should you use your personal password? is it safe? thanks beza Link to comment Share on other sites More sharing options...
Nickz Posted September 8, 2023 Share Posted September 8, 2023 (edited) Google has changed their configuration https://support.google.com/mail/thread/109381919/i-am-not-receiving-emails-from-certain-domains?hl=en The way to accept domains non regisistered is not proven, you can off course let Google do your mail via Google Business Suite. But Google is not recommended, you will become and depend to or on their services Edited March 10 by Nickz (see edit history) Link to comment Share on other sites More sharing options...
Ali Samie Posted November 26, 2023 Author Share Posted November 26, 2023 On 7/13/2023 at 8:26 AM, FlamingoFr said: With my Google workspace account, I set smpt server to smtp-relay.gmail.com SSL/465 General password didn't work. I set an App password and it works fine! Hi, I tested today and again it works TLS or SSL does not matter The only thing is that you need to use APP password And you need to use the right smtp server, I used smtp.gmail.com Link to comment Share on other sites More sharing options...
Ali Samie Posted November 26, 2023 Author Share Posted November 26, 2023 On 9/8/2023 at 9:35 PM, Nickz said: But Google is not recommended, you will become and depend toon their services You are right, but for testing purposes, its way easier than other ways Link to comment Share on other sites More sharing options...
TamasFelix Posted March 10 Share Posted March 10 Ali Samien's post is very well explained, I experienced the same problem for the website with an email hosted at gmail, one more thing needs to be added, you need to make sure that the server has the Remote SMTP function activated in order to work. In this case, you must contact the hosting. Connection could not be established with host smtp.gmail.com :stream_socket_client(): Unable to connect to tcp://smtp.gmail.com:587 (Cannot assign requested address) Link to comment Share on other sites More sharing options...
ccristian Posted September 23 Share Posted September 23 Hi! Instead of installing / using Papercut SMTP server and bother your head with Google App passwords bla bla bla... which soon will no longer be available... why don't you use Microsoft Visual Studio + Live server instead?!? Live server updates the code as soon as you change it, the way papercut does it.... in my opinion this is the best way you can test your email templates. All the best! Link to comment Share on other sites More sharing options...
Ali Samie Posted September 23 Author Share Posted September 23 4 hours ago, ccristian said: Hi! Instead of installing / using Papercut SMTP server and bother your head with Google App passwords bla bla bla... which soon will no longer be available... why don't you use Microsoft Visual Studio + Live server instead?!? Live server updates the code as soon as you change it, the way papercut does it.... in my opinion this is the best way you can test your email templates. All the best! I'm using docker containers as my dev env, so I guess I can't use the live-server feature. Despite that, papercut was really easy to use. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now