How to check email sending from a web application in OSX?

I have a Django application running locally, and I would like to test the functionality send_mail () . Currently, I can enable postfix using the following command in the terminal:

sudo postfix start

As soon as I enable the postfix, I ran the following command in the terminal:

telnet localhost 25

These two steps seem to work because the send_mail () function does not interrupt or throw an exception. Unfortunately, I'm not sure what I need to do to see the emails sent. I tried to configure Mail.app to connect to localhost, but there was no such luck.

Does anyone have an idea of ​​what I need to do to see the emails sent by postfix?

+3
source share
4 answers

can you try using django test email server?

see docs at http://docs.djangoproject.com/en/dev/topics/email/#testing-e-mail-sending

Emails will only be listed as they are sent.

+6
source

Postfix will attempt to deliver mail to the system you specify. This can be unsuccessful for various reasons, for example:

  • The address does not exist.
  • The remote mail server rejected it.
  • Your ISP blocks port 25 outgoing, so the postfix cannot deliver anything.

sendmail mailq ( sudo). Postfix /var/log

@localhost, POP3 IMAP Mail.app, . Mail.app (/var/mail - ).

+2

. , - MTA... serverfault.com;).

+1

The email verification server works fine, but it's hard to preview the html email address first. A shameless plugin, but I developed an application to help with it.

Add it to your INSTALLED_APPS and place an email on it, and you're done. Emails will be stored in the database, and in the administrator you can view them, including HTML fragments.

+1
source

Source: https://habr.com/ru/post/1751044/


All Articles