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 Idyou@yoursite.com Login Id is Different: YES Login Id (Mailjet API Key) Password (Mailjet Secret Key) Enable Outgoing YES SMTP Serverin-v3.mailjet.com Use TLS YES Port 465 Default Outgoing YES Always use Account’s Email ID as Sender YES