Notes
![]() ![]() Notes - notes.io |
Step 1: Verify Hostname Configuration
Check the Hostname:
Ensure your UAT server has a valid hostname configured. Run the following commands on the UAT server:
bash
Copy code
hostname
hostname -f
The fully qualified domain name (FQDN) should be valid and resolvable.
Set the Hostname:
If the hostname is not set correctly, you can configure it:
Edit /etc/hostname and set the desired hostname.
Edit /etc/hosts to map the hostname to the server's IP address.
Step 2: Explicitly Set the Local Hostname in Django
Configure EMAIL_LOCALHOST:
Update your settings.py to explicitly set the local hostname used in the HELO command:
python
Copy code
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'blastify.ai'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'your_password' # Replace with your actual password
DEFAULT_FROM_EMAIL = '[email protected]'
EMAIL_LOCALHOST = 'uat.blastify.ai' # Replace with a valid FQDN or the UAT server's hostname
Step 3: Test SMTP Connection Independently
Create a Simple SMTP Test Script:
Write a simple Python script to test SMTP connection directly. This helps to isolate whether the issue is with Django or the server configuration:
python
Copy code
import smtplib
try:
server = smtplib.SMTP('blastify.ai', 587)
server.starttls()
server.login('[email protected]', 'your_password')
message = 'Subject: TestnnThis is a test email.'
server.sendmail('[email protected]', '[email protected]', message)
print("Email sent successfully")
except Exception as e:
print(f"Error: {e}")
finally:
server.quit()
Run the Script on UAT Server:
Execute the script on the UAT server and observe the output for any errors.
Step 4: Network and Firewall Configuration
Check Network Connectivity:
Ensure the UAT server can reach the SMTP server on port 587. Use tools like telnet or nc:
bash
Copy code
telnet blastify.ai 587
# or
nc -zv blastify.ai 587
Review Firewall Rules:
Verify that there are no firewall rules or security group settings blocking outbound SMTP connections on the UAT server.
Step 5: Enable Detailed Debugging in Django
Configure Django Logging:
Enable detailed logging for the email backend in Django. Add this configuration to settings.py:
python
Copy code
import logging
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
},
},
'loggers': {
'django': {
'handlers': ['console'],
'level': 'DEBUG',
},
},
}
This will provide detailed logs that can help identify what is going wrong during the email sending process.
Step 6: Review SMTP Server Logs
Access SMTP Server Logs:
If you have access to the SMTP server logs, check them for any entries related to the connection attempts from your UAT server. Look for specific reasons for the rejection.
Step 7: Contact SMTP Provider
Consult with SMTP Provider:
If the issue persists, contact the provider of blastify.ai to ensure that there are no additional restrictions or specific configurations required for connecting from your UAT server.
By systematically following these steps, you should be able to identify and resolve the issue preventing email sending from your UAT server. Each step addresses a potential area where the configuration or environment might differ between your local setup and the UAT server.
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team