Answer the question
In order to leave comments, you need to log in
How to send mail from localhost while testing a site?
Делаю сайт на opencart 3, локальный сервер использую AMPPS под MAC OS. И проблема в том, что при оформлении заказа, регистрации нового пользователя и подобных действиях на email не проходит ни каких сообщений.
Почту пробовала разную Yandex. Google, Mail.ru.
Читала много и том, что почтовые сервисы с недоверием смотрят на почту приходящую с локального хоста, но как сделать чтобы все же заработало так и не поняла. Подскажите как мне добиться желаемого в рамках перечисленных технологий?
Answer the question
In order to leave comments, you need to log in
Всем спасибо! Нашла такое решение!
How to send emails from localhost (MAC OS X El Capitan)
Sometimes we may need to send mails from localhost for testing purposes. That can be easily done using an external Mail client (Gmail, Hotmail, Yahoo… ETC) and Postfix, which is the standard email server installed by default in Mac OS X (At least in the latest versions). As I said, this is a quick workaround for testing purposes but if security is a requirement, you must buy yourself a certificate at Thawte or Verisign, or create your own one.
This tutorial is about how to configure Postfix for Mac OS X. If you are using windows, you may want to try this approach.
Step 1. Edit Postfix config file
Open a terminal and edit the file main.cf
sudo vi /etc/postfix/main.cf
First check Postfix is configured correctly, look for the following lines (They are probably separated):
mydomain_fallback = localhost
mail_owner = _postfix
setgid_group = _postdrop
#Gmail SMTP
relayhost=smtp.gmail.com:587
# Enable SASL authentication in the Postfix SMTP client.
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options=noanonymous
smtp_sasl_mechanism_filter=plain
# Enable Transport Layer Security (TLS), i.e. SSL.
smtp_use_tls=yes
smtp_tls_security_level=encrypt
tls_random_source=dev:/dev/urandom
relayhost=smtp.live.com:587
relayhost=smtp.mail.yahoo.com:465
sudo vi /etc/postfix/sasl_passwd
smtp.gmail.com:587 [email protected]:your_password
sudo postmap /etc/postfix/sasl_passwd
sudo postfix reload
date | mail -s testing [email protected]
mailq
tail -f /var/log/mail.log
sudo postsuper -d ALL
Put MAMP. In the Postfix section you configure and everything works fine
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question