Mail is still a problem

Created a localhost using postfix which relays to mailjet which is working just fine on my phone servers.
in default outgoing all I have is the email id name, localhost 25 no password as is evident below yet still fails I believe because of a code error in erpnext.

So why do I get this error there should be no login or password necessary as its localhost. This is the same problem I have been asking about for over two months obviously there is a bug in how the mail client functions I have posted many times on this and initiated a GitHub but cant get resolved if mail doesn’t work erp doesn’t work???

where is the password and login specified and where is this error being generated from is there is no password or error required for email account to send?

It looks like apps/frappe/frappe/email/smtp.py deals with sending an email.
At line 46 it mentions if no default email account is found try getting settings from site_config.json
Maybe try hard coding these settings into site_config.json ?
“mail_server”: “smtp.example.com”,
“mail_port”: 587,
“use_ssl”: 1,
“mail_login”: “emails@example.com”,
“mail_password”: “Super.Secret.Password”,
“auto_email_id”: “emails@example.com”,
“email_sender_name”: “Example Notifications”,
“always_use_account_email_id_as_sender”: 0

Failing that smtp.py would allow you to hard code login/pass into it.

I did see that and I did try hard coding but still had problems… but because I have tried so many things over the last few months I will try once more… it is amazing that this hasn’t got much traction in the community…

Yeah sorry I only have a very basic grasp of coding. If I have time over the weekend I will have a look and see if I can reproduce this issue on my local dev setup. Two things jump out:
1: I would hardcode (and comment out) as much as possible in smtp.py first. I guess you then have to
sudo service nginx reload
sudo supervisorctl reload
to see the changes.
I wonder if
email_id, login_id, auto_email_id, always_use_account_email_id_as_sender
Are getting mixed up somewhere.

I just had a look at Mailjet and for simple smtp relay they require:

Email Id you@yoursite.com
Login Id is Different: YES
Login Id (Mailjet API Key)
Password (Mailjet Secret Key)
Enable Outgoing YES
SMTP Server in-v3.mailjet.com
Use TLS YES
Port 465
Default Outgoing YES
Always use Account’s Email ID as Sender YES

Here is what worked for me:

  1. Moved to cloud compute from azure
  • Installed centos 7
  • Permissive selinux
  • Easy install
  • Dns multitenant on
  • Renamed site1.local server.domain.com
  • Bench command still do weird things so I try them then manually edit the conf and json files
  • Unnecessary spaces in /home/frappe/frappe-bench/config/nginx.conf and frappe user not put in nginx.conf, ssl paths are wrong so you mest edit all
  • Reload all and site now functions as expected
  • on to mail
  • Inbound appears to be working from offcie365 imap though not sure bug were inbound goes offline is fixed will have to wait for that one
  • Mailjet config that works:

Email Id: email address you approved in mailjet
Login Id is Different: YES
Login Id: (Mailjet API Key)
Password: (Mailjet Secret Key)
Enable Outgoing: YES
SMTP Server: in-v3.mailjet.com
**Use TLS:**YES
Port: 2525 (GOOGLE COMPUTE BLOCKS 25,587,465)
Default Outgoing: YES
Always use Account’s Email ID as Sender: YES