Reputation: 3156
I am trying to send the email from django web app. I used following
from django.core.mail import send_mail
send_mail('test email', 'hello world', '[email protected]', ['[email protected]'])
my setting is
DEFAULT_FROM_EMAIL = '[email protected]'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'XXXXXXXXXX'
i am always getiing the mail from "[email protected]". Although i am passing the send_from value.
Upvotes: 0
Views: 53
Reputation: 1482
This might be because you did not specify the password for [email protected]. As a result Django falls back to the default settings.
Upvotes: 1