Email and Https

And those only the lines in my my site_config.json

“db_name”: “",
“db_password”: “**************”,
“encryption_key”: "
******************”,
“ssl_certificate”: “/etc/letsencrypt/live/erp.fastgrp.net/fullchain.pem”,
“ssl_certificate_key”: “/etc/letsencrypt/live/erp.fastgrp.net/privkey.pem”
}

I want Also To add an important point
May be its the main reason for my problem

  1. my site name was erpnext.vm

  2. i created a new site name erp.fastgrp.net and drop ernext.vm and transfer all my old data from erpnext.vm to the new one erp.fastgrp.net

frappe@erpnext:~/frappe-bench/sites$ ls
apps.txt assets common_site_config.json currentsite.txt erp.fastgrp.net languages.txt

I experienced a similar problem. Changing the email password of the default sending Email Account solved the problem. :slight_smile:

Cheers,
Hera

1 Like

Thank u

i did that but unfurnatly its still same problem
even i added a new gmail account
the result is same
it didnt send mail yet
waiting your guide dears

Can you try looking for the existing email account and then replacing it with a new email/password?

If you restored the DB previously using bench restore, you might need to run bench update and/or bench migrate. :slight_smile:

1 Like

@sheno just a hint


please, in your own interest - dont share your config files that open - better anonymise all keys and passwords or if neccesary discuss with a helpful member via PM since this forum is public.

now to the core problem:
maybe you need to config a default email in siteconfig.json mine looks like this

{ "db_name": "YOURDBNAME", "db_password": "YOURDBPASSWORD", "developer_mode": 0, "encryption_key": "YOURENCRYPTION KEY", "host_name": "https://erp.pundp.berlin", "limits": { "space_usage": { "backup_size": 8.0, "database_size": 17.67, "files_size": 7.0, "total": 32.67 } }, "mail_login": "YOURMAILLOGIN", "mail_password": "YOURMAILPASSWORD", "mail_port": "465", "mail_server": "YOURMAILSERVER", "ssl_certificate": "SOMEPATH/erp.pundp.berlin/fullchain.pem", "ssl_certificate_key": "SOMEPATH/erp.pundp.berlin/privkey.pem", "use_ssl": "true" }

capitals are of course my anonymisiations

1 Like

i am still cant send mail

even after change my mail
or update bench
or even add extra info in my jason file
i dont know why

This my Database Structure:

±---------------------------------------+
| Tables_in_********** |
±---------------------------------------+
| __Auth |
| __ListSettings |
| help |
| tabAbout Us Team Member |
| tabAcademic Term |
| tabAcademic Year |
| tabAccount |
| tabActivity Cost |
| tabActivity Type |
| tabAddress |
| tabAddress Template |
| tabAnnouncement |
| tabAppraisal |
| tabAppraisal Goal |
| tabAppraisal Template |
| tabAppraisal Template Goal |
| tabAssessment |
| tabAssessment Group |
| tabAssessment Result |
| tabAsset |
| tabAsset Category |
| tabAsset Category Account |
| tabAsset Movement |
| tabAttendance |
| tabAttendance Tool Student |
| tabAuthorization Rule |
| tabAuto Email Report |
| tabBOM |
| tabBOM Explosion Item |
| tabBOM Item |
| tabBOM Operation |
| tabBOM Scrap Item |
| tabBank Reconciliation Detail |
| tabBatch |
| tabBin |
| tabBlock Module |
| tabBlog Category |
| tabBlog Post |
| tabBlogger |
| tabBranch |
| tabBrand |
| tabBudget |
| tabBudget Account |
| tabC-Form |
| tabC-Form Invoice Detail |
| tabCampaign |
| tabCheque Print Template |
| tabCommunication |
| tabCompany |
| tabCompany History |
| tabContact |
| tabCost Center |
| tabCountry |
| tabCourse |
| tabCourse Schedule |
| tabCurrency |
| tabCurrency Exchange |
| tabCustom Field |
| tabCustom Script |
| tabCustomer |
| tabCustomer Group |
| tabCustomize Form Field |
| tabDaily Work Summary |
| tabDaily Work Summary Settings Company |
| tabDeduction Type |
| tabDefaultValue |
| tabDelivery Note |
| tabDelivery Note Item |
| tabDepartment |
| tabDependent Task |
| tabDepreciation Schedule |
| tabDesignation |
| tabDesktop Icon |
| tabDiscussion |
| tabDocField |
| tabDocPerm |
| tabDocShare |
| tabDocType |
| tabEarning Type |
| tabEmail Account |
| tabEmail Alert |
| tabEmail Alert Recipient |
| tabEmail Digest |
| tabEmail Group |
| tabEmail Group Member |
| tabEmail Queue |
| tabEmail Queue Recipient |
| tabEmail Unsubscribe |
| tabEmployee |
| tabEmployee Education |
| tabEmployee External Work History |
| tabEmployee Internal Work History |
| tabEmployee Leave Approver |
| tabEmployment Type |
| tabError Log |
| tabError Snapshot |
| tabEvent |
| tabEvent Role |
| tabExamination Result |
| tabExpense Claim |
| tabExpense Claim Account |
| tabExpense Claim Detail |
| tabExpense Claim Type |
| tabFee Category |
| tabFee Component |
| tabFee Structure |
| tabFees |
| tabFile |
| tabFiscal Year |
| tabFiscal Year Company |
| tabFooter Item |
| tabGL Entry |
| tabGrade Interval |
| tabGrading Structure |
| tabGuardian |
| tabGuardian Interest |
| tabHelp Article |
| tabHelp Category |
| tabHoliday |
| tabHoliday List |
| tabHomepage Featured Product |
| tabHotels |
| tabIndustry Type |
| tabInstallation |
| tabInstallation Note |
| tabInstallation Note Item |
| tabInstructor |
| tabIntegration Request |
| tabIntegration Service |
| tabIntegration Service Parameter |
| tabInterest |
| tabIssue |
| tabItem |
| tabItem Attribute |
| tabItem Attribute Value |
| tabItem Customer Detail |
| tabItem Group |
| tabItem Price |
| tabItem Quality Inspection Parameter |
| tabItem Reorder |
| tabItem Supplier |
| tabItem Tax |
| tabItem Variant |
| tabItem Variant Attribute |
| tabItem Website Specification |
| tabJob Applicant |
| tabJob Opening |
| tabJournal Entry |
| tabJournal Entry Account |
| tabLanded Cost Item |
| tabLanded Cost Purchase Receipt |
| tabLanded Cost Taxes and Charges |
| tabLanded Cost Voucher |
| tabLanguage |
| tabLead |
| tabLead Source |
| tabLeave Allocation |
| tabLeave Application |
| tabLeave Block List |
| tabLeave Block List Allow |
| tabLeave Block List Date |
| tabLeave Type |
| tabLetter Head |
| tabMaintenance Schedule |
| tabMaintenance Schedule Detail |
| tabMaintenance Schedule Item |
| tabMaintenance Visit |
| tabMaintenance Visit Purpose |
| tabManufacturer |
| tabMaterial Request |
| tabMaterial Request Item |
| tabMode of Payment |
| tabMode of Payment Account |
| tabModule Def |
| tabMonthly Distribution |
| tabMonthly Distribution Percentage |
| tabNewsletter |
| tabNote |
| tabNote Seen By |
| tabOAuth Authorization Code |
| tabOAuth Bearer Token |
| tabOAuth Client |
| tabOffer Letter |
| tabOffer Letter Term |
| tabOffer Term |
| tabOperation |
| tabOpportunity |
| tabOpportunity Item |
| tabPOS Customer Group |
| tabPOS Item Group |
| tabPOS Profile |
| tabPacked Item |
| tabPacking Slip |
| tabPacking Slip Item |
| tabPage |
| tabPage Role |
| tabParty Account |
| tabPatch Log |
| tabPayment Entry |
| tabPayment Entry Deduction |
| tabPayment Entry Reference |
| tabPayment Gateway |
| tabPayment Gateway Account |
| tabPayment Reconciliation Invoice |
| tabPayment Reconciliation Payment |
| tabPayment Request |
| tabPaypal Express Payment |
| tabPaypal Log |
| tabPeriod Closing Voucher |
| tabPortal Menu Item |
| tabPrice List |
| tabPrice List Country |
| tabPricing Rule |
| tabPrint Format |
| tabPrint Heading |
| tabProduct Bundle |
| tabProduct Bundle Item |
| tabProduction Order |
| tabProduction Order Item |
| tabProduction Order Operation |
| tabProduction Plan Item |
| tabProduction Plan Material Request |
| tabProduction Plan Sales Order |
| tabProgram |
| tabProgram Course |
| tabProgram Enrollment |
| tabProgram Enrollment Fee |
| tabProgram Enrollment Tool Student |
| tabProgram Fee |
| tabProject |
| tabProject Task |
| tabProject User |
| tabProperty Setter |
| tabPurchase Invoice |
| tabPurchase Invoice Advance |
| tabPurchase Invoice Item |
| tabPurchase Order |
| tabPurchase Order Item |
| tabPurchase Order Item Supplied |
| tabPurchase Receipt |
| tabPurchase Receipt Item |
| tabPurchase Receipt Item Supplied |
| tabPurchase Taxes and Charges |
| tabPurchase Taxes and Charges Template |
| tabQuality Inspection |
| tabQuality Inspection Reading |
| tabQuotation |
| tabQuotation Item |
| tabQuotation Lost Reason |
| tabReport |
| tabRequest for Quotation |
| tabRequest for Quotation Item |
| tabRequest for Quotation Supplier |
| tabRole |
| tabRoom |
| tabSG Creation Tool Course |
| tabSMS Log |
| tabSMS Parameter |
| tabSalary Component |
| tabSalary Component Account |
| tabSalary Detail |
| tabSalary Slip |
| tabSalary Slip Deduction |
| tabSalary Slip Earning |
| tabSalary Slip Timesheet |
| tabSalary Structure |
| tabSalary Structure Deduction |
| tabSalary Structure Earning |
| tabSalary Structure Employee |
| tabSales Invoice |
| tabSales Invoice Advance |
| tabSales Invoice Item |
| tabSales Invoice Payment |
| tabSales Invoice Timesheet |
| tabSales Order |
| tabSales Order Item |
| tabSales Partner |
| tabSales Person |
| tabSales Taxes and Charges |
| tabSales Taxes and Charges Template |
| tabSales Team |
| tabSerial No |
| tabSeries |
| tabService Contract |
| tabSessions |
| tabShipping Rule |
| tabShipping Rule Condition |
| tabShipping Rule Country |
| tabShopify Log |
| tabShopify Tax Account |
| tabSingles |
| tabStandard Reply |
| tabStock Entry |
| tabStock Entry Detail |
| tabStock Ledger Entry |
| tabStock Reconciliation |
| tabStock Reconciliation Item |
| tabStudent |
| tabStudent Admission |
| tabStudent Applicant |
| tabStudent Attendance |
| tabStudent Batch |
| tabStudent Batch Instructor |
| tabStudent Batch Name |
| tabStudent Batch Student |
| tabStudent Category |
| tabStudent Group |
| tabStudent Group Creation Tool Course |
| tabStudent Group Student |
| tabStudent Guardian |
| tabStudent Leave Application |
| tabStudent Log |
| tabStudent Sibling |
| tabStudent Siblings |
| tabSupplier |
| tabSupplier Quotation |
| tabSupplier Quotation Item |
| tabSupplier Type |
| tabTag |
| tabTag Category |
| tabTag Doc Category |
| tabTarget Detail |
| tabTask |
| tabTask Depends On |
| tabTax Rule |
| tabTerms and Conditions |
| tabTerritory |
| tabTimesheet |
| tabTimesheet Detail |
| tabToDo |
| tabTop Bar Item |
| tabTopic |
| tabTraining Event |
| tabTraining Event Employee |
| tabTraining Feedback |
| tabTraining Result |
| tabTraining Result Employee |
| tabTranslation |
| tabTrust Account Payment |
| tabUOM |
| tabUOM Conversion Detail |
| tabUser |
| tabUserRole |
| tabVehicle |
| tabVehicle Log |
| tabVehicle Service |
| tabVersion |
| tabWarehouse |
| tabWarranty Claim |
| tabWeb Form |
| tabWeb Form Field |
| tabWeb Page |
| tabWebsite Item Group |
| tabWebsite Slideshow |
| tabWebsite Slideshow Item |
| tabWebsite Theme |
| tabWorkflow |
| tabWorkflow Action |
| tabWorkflow Document State |
| tabWorkflow State |
| tabWorkflow Transition |
| tabWorkstation |
| tabWorkstation Working Hour |
| tabbook |
| tabcontactus |
| tabinstallation |
| tabknowledge |
±---------------------------------------+
367 rows in set (0.01 sec)

Any Suggestions Dears?

i am still stuck dears any help

Hmmm

The problem started when the security certificate was installed, right? Can we know the steps that you used to install the certificate?

1 Like

Thank u dear for your help
i discovered the problem and solve it here

https://discuss.frappe.io/t/https-and-http-email/23559/22

But now
i cant send emails from my server to any domain (hotmail.yahoo)
But i cant send to Gmail

i dont know why Gmail dont accept mails from my erpnext
for example

my erpnetx mail is

info@fastgrp.net
that mail can send to any mail domain like ( hotmail-yahoo )
while cant send to Gmail
so i doubt in Gmail spam , i didnt find it as a spam or as inbox
so i thought may be the problem in erpnext
so i send message from outlook (info@fastgrp.net) To Gmail
The Mail is arrived to the Gmail

what is the reason i dont know

I think the email might be sent to the spam folder. :smiley:
We also tried implementing an automated email alert, but for some reason Google filtered all the emails generated by our ERPNext instance as Spam.

Really hoping for a solution on the spam thing. But for now, we disabled the auto-email alert.

1 Like

Thank u dear for your help.

“info@fastgrp.net
that mail can send to any mail domain like ( hotmail-yahoo )
while cant send to Gmail”

Some sanity checks and ideas:

  1. Confirm the flush and pull workers run on schedule:

frappe@erpnext:~/frappe-bench$ find . -name *.log | xargs grep frappe.email.queue.flush
/logs/worker.error.log:05:19:27 short: frappe.utils.background_jobs.execute_job(async=True, event=u’all’, job_name=u’frappe.email.queue.flush’, kwargs={}, method=u’frappe.email.queue.flush’, site=u’aproposcomputing.com’, user=u’Administrator’) (36e8edb6-ee0a-4b44-88b6-4ea0bef29883)

frappe@erpnext:~/frappe-bench$ find . -name *.log | xargs grep frappe.email.doctype.email_account.email_account.pull
./logs/worker.error.log:05:19:28 short: frappe.utils.background_jobs.execute_job(async=True, event=u’all’, job_name=u’frappe.email.doctype.email_account.email_account.pull’, kwargs={}, method=u’frappe.email.doctype.email_account.email_account.pull’, site=u’aproposcomputing.com’, user=u’Administrator’) (3a2871af-2ec6-430d-9d9d-3d3f446264da)

  1. My experience is gmail ignores login attempts less than say 15 minutes apart!
    frappe@erpnext:~/frappe-bench$ find . -name *.json | xargs grep scheduler_interval
    ./sites/common_site_config.json: “scheduler_interval”: 900,
    ./sites/aproposcomputing.com/site_config.json: “scheduler_interval”: “300”,

To change the interval do this:
frappe@erpnext:~/frappe-bench$ bench set-config scheduler_interval 900

Then restart the worker processes like this:
frappe@erpnext:~/frappe-bench$ sudo supervisorctl restart all
frappe-bench-frappe-schedule: stopped
frappe-bench-frappe-default-worker-0: stopped
frappe-bench-frappe-long-worker-0: stopped
frappe-bench-frappe-short-worker-0: stopped
frappe-bench-frappe-web: stopped
frappe-bench-node-socketio: stopped
frappe-bench-redis-queue: stopped
frappe-bench-redis-cache: stopped
frappe-bench-redis-socketio: stopped
frappe-bench-frappe-schedule: started
frappe-bench-frappe-default-worker-0: started
frappe-bench-frappe-long-worker-0: started
frappe-bench-frappe-short-worker-0: started
frappe-bench-frappe-web: started
frappe-bench-node-socketio: started
frappe-bench-redis-queue: started
frappe-bench-redis-cache: started
frappe-bench-redis-socketio: started

  1. As stated in the ‘Https and http Email’ thread ensure the correct ports are open for the smtp and imap (or pop3) service of your provider gmail etc. In a VM environment, check that the port between the guest and host is open!

  2. In my case with gmail I got a ‘password incorrect’ error so Option 2 worked for me -
    Less secure apps & your Google Account - Google Account Help

  1. Another check is to send an email from the command line:

frappe@erpnext:~/frappe-bench$ mail -s “this is the subject line” somebody@gmail.com < /dev/null
mail: Null message body; hope that’s ok

Then confirm erpnext’s postfix ‘mail transfer agent’ ran as expected:

frappe@erpnext:~/frappe-bench$ less /var/log/mail.log

May 10 06:25:09 erpnext postfix/pickup[3213]: 6731010374E: uid=0 from=
May 10 06:25:09 erpnext postfix/cleanup[3444]: 6731010374E: message-id=20170510132509.6731010374E@aproposcomputing
May 10 06:25:09 erpnext postfix/qmgr[1763]: 6731010374E: from=root@aproposcomputing, size=709, nrcpt=1 (queue active)
May 10 06:25:09 erpnext postfix/local[3446]: 6731010374E: to=root@aproposcomputing, orig_to=, relay=local, delay=0.39, delays=0.24/0.09/0/0.05, dsn=2.0.0, status=sent (delivered to mailbox)
May 10 06:25:09 erpnext postfix/qmgr[1763]: 6731010374E: removed
May 10 06:53:09 erpnext postfix/pickup[3213]: 1696A10374E: uid=1000 from=frappe@erpnext
May 10 06:53:09 erpnext postfix/cleanup[3477]: 1696A10374E: message-id=20170510135309.1696A10374E@aproposcomputing
May 10 06:53:09 erpnext postfix/qmgr[1763]: 1696A10374E: from=frappe@erpnext, size=353, nrcpt=1 (queue active)
May 10 06:53:09 erpnext postfix/smtp[3479]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400e:c06::1a]:25: Network is unreachable
May 10 06:53:10 erpnext postfix/smtp[3479]: 1696A10374E: to=somebody@gmail.com, relay=gmail-smtp-in.l.google.com[74.125.28.27]:25, delay=1.2, delays=0.09/0.05/0.86/0.23, dsn=2.0.0, status=sent (250 2.0.0 OK 1494424390 t73si3088653pfk.146 - gsmtp)
May 10 06:53:10 erpnext postfix/qmgr[1763]: 1696A10374E: removed

The above failed since somebody@gmail.com is not a valid account


1 Like

Dear

this is really the solution to my problem

after i used those commands

and also my ubuntu date and time was delay one hr
so i fixed my time and used your commands
Now
Gmail accept to receive any email that sending from info@fastgrp.net

Thanks alot dears
for your solution.

Glad to hear that sheno!

1 Like

thx alot dear