-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #3 - ارسال ایمیل از طریق ایمیل ce شورا send email settings adde…
…d to project
- Loading branch information
Khedesh
committed
Aug 6, 2016
1 parent
38d3416
commit b5376d3
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,9 @@ | |
from announcements.models import Announcement | ||
from shamsi.templatetags.shamsi_template_tags import pdatetime | ||
|
||
from django.core.mail import EmailMessage | ||
|
||
|
||
def home(request): | ||
go_course = False | ||
try: | ||
|
@@ -33,6 +36,8 @@ def home(request): | |
|
||
|
||
def index(request): | ||
#email = EmailMessage('Hello', 'World', 'Shora CE', to=['[email protected]']) | ||
#email.send() | ||
announcements = Announcement.objects.order_by('-date')[:5] | ||
for an in announcements: | ||
an.date = pdatetime(an.date) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,3 +167,18 @@ | |
if os.path.exists(f): | ||
exec (open(f, "rb").read()) | ||
|
||
# Email Settings | ||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' | ||
|
||
# Host for sending e-mail. | ||
EMAIL_HOST = 'smtp.ce.sharif.edu' | ||
#EMAIL_HOST = 'smtp.gmail.com' | ||
|
||
# Port for sending e-mail. | ||
#EMAIL_PORT = 465 | ||
EMAIL_PORT = 587 | ||
|
||
# Optional SMTP authentication information for EMAIL_HOST. | ||
EMAIL_HOST_USER = '[email protected]' | ||
EMAIL_HOST_PASSWORD = 'shora9412' | ||
EMAIL_USE_TLS = True |