Custom Search
Showing posts with label Exim Mail Server. Show all posts
Showing posts with label Exim Mail Server. Show all posts

Wednesday, January 8, 2014

How to Test Exim Mail Server Configuration by sending a Test mail


Syntax
------------
#echo "Your Message" | mail -s Subject dest_email_id

example
--------------
#echo "This is a test." | mail -s Testing_Mesage_Subject youremail@gmail.com

Friday, November 22, 2013

Python Django How to send email from python console

0)
First setup and configure email server (exim)

1)
Activate virtualenv

2)
Got you django project folder and run following command
#export DJANGO_SETTINGS_MODULE=myproject.settings



3)
Open python terminal and run following command
#python
import myproject.settings as setting


setting.EMAIL_HOST
setting.EMAIL_PORT
 

from django.core.mail import send_mail
 

send_mail('Subject here2', 'Here is the message1.', 'from@mymailserver.com', ['sajuptpm@gmail.com'], fail_silently=False)

Wednesday, November 6, 2013

Python Django Configure Exim Mail Server

1)Install Exim
#apt-get update
#apt-get upgrade
#apt-get install exim4-daemon-light mailutils



2)Configure Exim
#dpkg-reconfigure exim4-config

3)
Settings.py Changes
EMAIL_HOST = 'localhost'
EMAIL_PORT = 25