7

I have these settings

EMAIL_HOST = 'smtpout.secureserver.net'
EMAIL_HOST_USER = 'username@domain.com'
EMAIL_HOST_PASSWORD = 'password'
DEFAULT_FROM_EMAIL = 'username@domain.com'
SERVER_EMAIL = 'username@domain.com'
EMAIL_PORT = 465
EMAIL_USE_TLS = True
SMTP_SSL = True

Speaking to Godaddy I have found out these are the ports and settings

smtpout.secureserver.net
ssl
465

587
TLS ON

3535
TLS ON

25
TLS ON

80
TLS ON
or
TLS OFF

I have tried all the combinations. If I set TLS to True I am getting

STARTTLS extension not supported by the server.

If I set to 465 I am getting

Connetion Closed

If I set other combinations like

EMAIL_HOST = 'smtpout.secureserver.net'
EMAIL_HOST_USER = 'username@domain.com'
EMAIL_HOST_PASSWORD = 'password'
DEFAULT_FROM_EMAIL = 'username@domain.com'
SERVER_EMAIL = 'username@domain.com'
EMAIL_PORT = 25
EMAIL_USE_TLS = False

Invalid Address

For verification, I used Google Mail settings to test if the email sending via python works, and it is working.

Now I want to switch to GoDaddy and I know for the email we use TLS to log in even for POP3 download and it is working, so I am not sure why python / Django option is not working. Can you please help?

I have called Godaddy, they cannot help because it is a software issue - all their settings and ports are working, so I have no one to ask.

Radek
  • 1,149
  • 2
  • 19
  • 40
  • Not a direct answer, but you can use a free email provider like zoho with your domain and no need to worry about your hosting providers setting. https://stackoverflow.com/a/45326023/466066 – Jose Cherian Nov 25 '17 at 08:07
  • 1
    Thank you Jose looking into this, I know that is an option, but I am looking for this particular solution and I am sure so many people would like to know the answer. – Radek Nov 25 '17 at 18:36

6 Answers6

9

This worked for me with my GoDaddy email. Since GoDaddy sets up your email in Office365, you can use smtp.office365.com.

settings.py

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.office365.com'
EMAIL_HOST_USER = 'myemail@GoDaddyDomain.com'
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = 'myPassword'
EMAIL_PORT = 587
EMAIL_USE_SSL = False
EMAIL_USE_TLS = True

method in views.py that handles sending email. The email variable is from a user form.

from django.conf import settings
from django.core.mail import EmailMessage
def send_email(subject, body, email):
    try:
        email_msg = EmailMessage(subject, body, settings.EMAIL_HOST_USER, [settings.EMAIL_HOST_USER], reply_to=[email])
        email_msg.send()
        return "Message sent :)"
    except:
        return "Message failed, try again later :("
yoyoyoyo123
  • 2,362
  • 2
  • 22
  • 36
1

I found this code worked for me.. Hope this will be useful to somebody.
I was using SMTP godaddy webmail..you can put this code into your django setting file.
Since you cannot set Both SSL and TSL together... if you do so you get the error something as, At one time either SSL or TSL can be true....

setting.py

# Emailing details
EMAIL_HOST = 'md-97.webhostbox.net'
EMAIL_HOST_USER = 'mailer@yourdomain'
EMAIL_HOST_PASSWORD = 'your login password'
EMAIL_PORT = 465
EMAIL_USE_SSL = True
Priyanka
  • 127
  • 1
  • 1
  • 11
1

I managed to decide to access the site https://sso.secureserver.net/?app=emailsetup&realm=pass& It seems that when accessing, you can enable email for external use.

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtpout.secureserver.net'
EMAIL_HOST_USER='aXXXX@xxxx'
EMAIL_HOST_PASSWORD='AsgGSDAGSasdsagas'
DEFAULT_FROM_EMAIL='aXXXX@xxxx' 
EMAIL_PORT=465
EMAIL_USE_SSL=True 
EMAIL_USE_TLS=False

It worked for me

1

It's been a while but, maybe the answer can help somebody else. I just talked to GoDaddy about the issue and the needed configration they told me was like,

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtpout.secureserver.net'
EMAIL_HOST_USER = env('EMAIL_HOST_USER')
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD')
EMAIL_PORT = 80
EMAIL_USE_SSL = False
EMAIL_USE_TLS = True

these are the django config settings but, I'm sure that it can be copied to other platforms.

Also, the email dns configration they provided was,

email dns config

zx_
  • 41
  • 1
  • 6
1

use 'smtpout.asia.secureserver.net' as EMAIL_HOST in Django settings.py. you can refer to the GoDaddy email help page link.

https://in.godaddy.com/help/mail-server-addresses-and-ports-for-business-email-24071

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/32096256) – BrokenBenchmark Jun 26 '22 at 02:45
0

In my case, this way work for me:

#settings.py

EMAIL_BACKEND='django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST='smtpout.secureserver.net'
EMAIL_PORT=465
EMAIL_USE_SSL=True
EMAIL_USE_TLS=False
EMAIL_HOST_USER='your@domain'
EMAIL_HOST_PASSWORD='yourpass'
ADMIN_EMAIL='your@domain'