[Django]-How do I test sending email from a web applicatoin on OSX?

6👍

you could try using the django email test server?

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

emails will just be listed as you send them.

👤JamesO

2👍

Postfix will try to deliver the mails to the system you named. This may fail for various reasons, such as:

  1. The address doesn’t exist.
  2. The remote mailserver rejected it.
  3. Your ISP blocks port 25 outbound so postfix can’t deliver anything.

You can see queued mails with the sendmail alias mailq (need to be sudo). Postfix also keeps detailed logs in /var/log

If you are sending to @localhost, you need to also setup a POP3 or IMAP server on your system for Mail.app to be able to read e-mail. Without using Mail.app, you can find the system mail spool (/var/mail is a common spot).

1👍

Have a look at postfix’s log, or the mail queue. If the messages are building up in the queue, then the next thing to do is to configure your postfix to forward messages on to remote MTAs…which is a serverfault.com question ;).

1👍

The email test server is great, but it’s hard to preview html email at all. Shameless plug, but I’ve developed an app to help with it.

Add it to your INSTALLED_APPS and point the EmailBackend to it, and you’re done. Emails will be stored up on the database and in the admin you can view them, including HTML multi parts.

Leave a comment