Email sending issue

I am not able to send verification emails. I have tried many different things but none of them worked.

MY CONFIG.yml file

CMS_HOST: studio.local.overhang.io
CONTACT_EMAIL: [hassanghaffar52230@gmail.com](mailto:hassanghaffar52230@gmail.com)
ENABLE_HTTPS: false
ID: l275Z19k1hb2wsEVKv5HyiXF
JWT_RSA_PRIVATE_KEY: '-----BEGIN RSA PRIVATE KEY-----

MIIEogIBAAKCAQEAqlVq8yn7PCHJs+yhY3vI9ovbSD/uPM+2CUj+BESlODxlhl/s

H3TTb4WCj1JX7AvCLPs+82RBHOK+N2YOxRsIOyNB3wmvFg87FLILSIAapEqDr5jo

CnjgZZrmByUmxO8RSCfl0wobQm93qdyfVLV1kPaolP/pYcWOuinvdzOSIPQBFYou

xPohV4LRnivksMJkBqg6F6T8SyGBzHFEnBmhvvl6fCX11mvqKALpJcQw9ZzA0pXP

nBQ4yFHkRnfSD8Kj+013A93YzgHWWmC1opuR0hIwh7/LYnKVkrIGzoAuKPyW7UW1

4uNTNN8AilDDWwo81BS0ke0H9wRq1VfRrOInVwIDAQABAoIBADBOTShs7X0eL+/A

2fw2rMWO4D9bMhs45O05MCDRvvF132z+Yx6AqT3lZSN0PM8KfqT3E+E+u2CPxVY8

sU+g3PK4iwPP4UGmTCEQZTbIbcXOBA6WlKfzo9/sz/OSy63qBsKp3fm90gFDT3Jy

yRTi6VaVPTYUZYF+331YSztI+tYxJm1GxDJL0jjIIl9Ac8xaZ3Msb8/ZzgEe+lkG

4IHKQym3v0/xTI+cYNYrWF40XRuWfudQ+fU3pTKYbeYXZVLTL4VGULRWa9BA0bMU

i75c12+K8B4TBzv4eLxCzvVTuaBuX2ZK6YNyGqACLQGSH0oEAmM3jz9/VOZsHADf

gbmCQ1ECgYEAzFl8tGcMCl6y00rOqgnD5fPOzgbgoCpuuQ7Ejsml5yVDK60rbFtO

7PD7EorIUhFoV9zv0khYLY2PjI+n/t6AA7UzjpRxtjoeist/nhbDyKoOTAyXFnqH

FiiaJ+VKoQ9yit7yQ0tg/bDmIWRUUAbpgaHFuO+XnzSkID7Gy1YtztsCgYEA1WLr

b7gJvYtHOy/Q/028rxYvIwFYfENW+apYzn7crBVHOL9EohiP/oea2j916oRmSr4P

F/2SMX1m58DgXJHAptLmOpnNfHvbjg84YQfhu7UxDDfmRXZKQHVBnbtAFrm6iIHG

E2/7yl729Pg2yNWjjJ/IklwwfWxi2PDRudMxPDUCgYBwBfKWFxODr8xKhmzqzDWn

HtPVH/IN+5T9P/pC6IpZP5UmIWV3nkqTG7wXuxr72m0gFY8m8N/eAQebn7kRwDnf

Tnt4AyqfIhdSMSLBsGsd2xPBXvmIqhzZ6eIwUsNprcU2GegnOfBuwoY18gFCabei

h+OTcUzmSv5aau+h0pmEFwKBgFRC3oNcIgSF9hfKFvZppQNieDSTeHSBRtwJx02r

TMprEJe494omtt2kgKKEArUbmSUUjfNEPzFpunPzduU27OMzTpR/XWQ1qIodOn8e

VKYBs5+Gh1iQkFuJseJuKa2Po7f5vtS4GK5d95jeVwvRSObjxZj97Gvqm9HcroR5

f+ytAoGAO69qMaVCx8LSmawxvmDTEqUHe42jMEXFI7BbGEaBxFb4ZzaPCNDQH2je

KlT7Nb800UU0ASRPomgXudZOUsxbpiXlBqHXBHFzWSEdhW2494WEZ5mD6zvZ9KjA

SBwlDwA5EtFJ7hpcdP3h2Ax2Q3stwlzEYWrxZmOlNF7nVrazUbg=

-----END RSA PRIVATE KEY-----'
LANGUAGE_CODE: en
LMS_HOST: local.overhang.io
MYSQL_ROOT_PASSWORD: cf7MxSnI
OPENEDX_MYSQL_PASSWORD: 6X0i2q5c
OPENEDX_SECRET_KEY: 0hA2mdmUflTogjDGot7sCQpo
PLATFORM_NAME: analytics
PLUGINS:
  - skipemailvalidation
RUN_SMTP: true
SMTP_HOST: smtp.gmail.com
SMTP_PASSWORD: hassan03008855260
SMTP_PORT: 587
SMTP_USERNAME: [hassanghaffar52230@gmail.com](mailto:hassanghaffar52230@gmail.com)
SMTP_USE_TLS: true
SMTP_USE_SSL: false

i tried port 25,465 and 587 none of them worked. i used smtp.gmail and office365 also.

Errors i am getting are usually the same.

Error no 1

None
smtp_1 | 386 Exim version 4.92 uid=101 gid=101 pid=386 D=80001
smtp_1 | Berkeley DB: Berkeley DB 5.3.28: (September 9, 2013)
smtp_1 | Support for: crypteq iconv() IPv6 GnuTLS move_frozen_messages DANE DKIM DNSSEC Event OCSP PRDR SOCKS TCP_Fast_Open
smtp_1 | Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz dbmnz dnsdb dsearch nis nis0 passwd
smtp_1 | Authenticators: cram_md5 plaintext
smtp_1 | Routers: accept dnslookup ipliteral manualroute queryprogram redirect
smtp_1 | Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
smtp_1 | Fixed never_users: 0
smtp_1 | Configure owner: 0:0
smtp_1 | Size of off_t: 8
smtp_1 | 386 delivering 1mNAhl-00006D-Px
smtp_1 | 386 R: dnslookup for [hassan.khan@analytics.com.pk](mailto:hassan.khan@analytics.com.pk)
nginx_1 | 172.18.0.7 - - [06/Sep/2021:09:14:18 +0000] [http://local.overhang.io](http://local.overhang.io/) "POST /api/user/v2/account/registration/ HTTP/1.1" 200 77 "http://local.overhang.io/register?next=%2F" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36" "172.18.0.1"
lms_1 | [pid: 7|app: 0|req: 8/15] 172.18.0.12 () {54 vars in 1291 bytes} [Mon Sep 6 09:14:16 2021] POST /api/user/v2/account/registration/ => generated 77 bytes in 1442 msecs (HTTP/1.0 200) 14 headers in 3113 bytes (1 switches on core 0)
lms_1 | 2021-09-06 09:14:18,222 INFO 127 [tracking] [user 18] [ip 172.18.0.1] logger.py:41 - {"name": "/", "context": {"user_id": 18, "path": "/", "course_id": "", "org_id": ""}, "username": "qwe", "session": "b134f67a0841082a9796ee8749de9e8d", "ip": "172.18.0.1", "agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36", "host": "local.overhang.io", "referer": "http://local.overhang.io/register?next=%2F", "accept_language": "en-US,en;q=0.9", "event": "{"GET": {}, "POST": {}}", "time": "2021-09-06T09:14:18.219832+00:00", "event_type": "/", "event_source": "server", "page": null}
lms_1 | [pid: 127|app: 0|req: 7/16] 172.18.0.12 () {46 vars in 2974 bytes} [Mon Sep 6 09:14:18 2021] GET / => generated 0 bytes in 94 msecs (HTTP/1.0 302) 8 headers in 511 bytes (1 switches on core 0)
nginx_1 | 172.18.0.7 - - [06/Sep/2021:09:14:18 +0000] [http://local.overhang.io](http://local.overhang.io/) "GET / HTTP/1.1" 302 0 "http://local.overhang.io/register?next=%2F" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36" "172.18.0.1"
lms_1 | 2021-09-06 09:14:18,325 INFO 7 [tracking] [user 18] [ip 172.18.0.1] logger.py:41 - {"name": "/dashboard", "context": {"user_id": 18, "path": "/dashboard", "course_id": "", "org_id": ""}, "username": "qwe", "session": "b134f67a0841082a9796ee8749de9e8d", "ip": "172.18.0.1", "agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36", "host": "local.overhang.io", "referer": "http://local.overhang.io/register?next=%2F", "accept_language": "en-US,en;q=0.9", "event": "{"GET": {}, "POST": {}}", "time": "2021-09-06T09:14:18.324877+00:00", "event_type": "/dashboard", "event_source": "server", "page": null}
smtp_1 | 387 T: remote_smtp for [hassan.khan@analytics.com.pk](mailto:hassan.khan@analytics.com.pk)
smtp_1 | 386 LOG: retry_defer MAIN
smtp_1 | 386 == [hassan.khan@analytics.com.pk](mailto:hassan.khan@analytics.com.pk) R=dnslookup T=remote_smtp defer (-53): retry time not reached for any host for 'analytics.com.pk'
lms_1 | [pid: 7|app: 0|req: 9/17] 172.18.0.12 () {46 vars in 2992 bytes} [Mon Sep 6 09:14:18 2021] GET /dashboard => generated 18189 bytes in 360 msecs (HTTP/1.0 200) 7 headers in 490 bytes (1 switches on core 0)
nginx_1

And sometimes connection timeout issue.
I have also tried adding skipemailvalidation: true and that also does not work. it still asks for validation. i added it through tutor-plugins.

"FEATURES": {
"SKIP_EMAIL_VALIDATION": true,

Need help urgent. anything you guys need further information i’ll provide

Hi @Hassan! There are plenty of people on this forum who have managed to configure Gmail SMTP for their Open edX platform. I suggest you take a look at these topics.

This works for me:

RUN_SMPT: false
SMTP_HOST: smtp.gmail.com
SMTP_PASSWORD: xxxxxxxxxxxxxx
SMTP_PORT: 587
SMTP_USERNAME: xxxxxxxxxxxxxx
SMTP_USE_TLS: true

The username is without ‘@gmail.com’ … maybe works also with ‘@gmail.com’ suffix, didn’t try it.

And a tip: You shouldn’t post on the forum your whole configuration including passwords / certificates that should be kept secret…