* feat: patched EmailQueue.send and frappe.utils.get_formatted_email
* chore: renamed hooks and handled an edge case
* fix: if the get_sender_details hook is defined but it returns invalid input
- show published newsletters in list view
- show published newsletter as web page
- show status section after newsletter is sent
- add email_sent_at and total_recipients field
The newsletter content may contain images that get "attached" to the
newsletter document. If this is the case, you can't selectively include
attachments in the newsletter as it attaches all the attachments.
An explicit attachments table solves this problem.
- Organize fields into sections
- Buttons for Send now and Scheduled sending
- Buttons to Send test email and to Check broken links
- Remove Test section
Reload DocType `Email Account` in patch.
Changed `modified` in json files.
Removed linking of `imap_folder` in `Email Flag Queue` this connection
seems not necessary at this point. Also removed all parts that create
this connection.
* Revert "feat(minor): Implement __getitem__ in Base Document (#14855)"
This reverts commit 583a7ef23923d362c85beeabe57703c2d5b12a65.
(cherry picked from commit d165fb3d477e65f7a395118f69278f2cb5c7f4e5)
* fix: keyerror in auto email report
(cherry picked from commit aac20f5d159875a5f3c9b4a6d74beec390e617dd)
Co-authored-by: Ankush Menat <ankush@frappe.io>
This fixes following error while downloading auto email report
```
Traceback (most recent call last):
File "/Users/sps/benches/develop/apps/frappe/frappe/app.py", line 66, in application
response = frappe.api.handle()
File "/Users/sps/benches/develop/apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
File "/Users/sps/benches/develop/apps/frappe/frappe/handler.py", line 31, in handle
data = execute_cmd(cmd)
File "/Users/sps/benches/develop/apps/frappe/frappe/handler.py", line 67, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/Users/sps/benches/develop/apps/frappe/frappe/__init__.py", line 1205, in call
return fn(*args, **newargs)
File "/Users/sps/benches/develop/apps/frappe/frappe/email/doctype/auto_email_report/auto_email_report.py", line 196, in download
data = auto_email_report.get_report_content()
File "/Users/sps/benches/develop/apps/frappe/frappe/email/doctype/auto_email_report/auto_email_report.py", line 98, in get_report_content
columns, data = make_links(columns, data)
File "/Users/sps/benches/develop/apps/frappe/frappe/email/doctype/auto_email_report/auto_email_report.py", line 253, in make_links
doc = frappe.get_doc(col.parent, doc_name) if doc_name else None
File "/Users/sps/benches/develop/apps/frappe/frappe/__init__.py", line 883, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File "/Users/sps/benches/develop/apps/frappe/frappe/model/document.py", line 62, in get_doc
raise ValueError('First non keyword argument must be a string or dict')
ValueError: First non keyword argument must be a string or dict
```
The issue was introduced via https://github.com/frappe/frappe/pull/13340
When working with IMAP accounts, frappe should allow the user
to choose multiple folders to look for new mails. This helps
users to separate their frappe-related email from other
conversations. Use cases range from sieve filters in the
mail server that stuff incoming mail in various mail folders
to people manually sorting their e-mail. In both cases, we
can have different import policies for different folders, and
we can avoid importing unrelated email.
Created a new child table `IMAP Folder` with following fields:
- Folder Name (user-modifiable)
- Append To (user-modifiable)
- UIDVALIDITY (hidden)
- UIDNEXT (hidden)
Doctype `Email Account` and `receive.py` code adjusted so that
emails with the changes are processed correctly and Frappe
only logs in to the imap server once per sync.
Created a patch that copies the data from the old fields into
the new child table with `INBOX` as default `folder_name`. This
keeps existing setups working without manual changes.
The original fields
- uidvalidity
- uidnext
- append_to
are still available for the pop3 setups. In IMAP, these fields
are hidden user and not used.
Added a test case in `Email Account` that validates data to make
sure a IMAP folder is provided if the use_imap is true.
Also added some code formatting changes in email_account.js to get rid
of sider checks failures that block this change
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
These modules were imported from the ERPNext codebase into Frappe.
License header was overlooked at that point. These were contributed
initially by Frappe Technologies Pvt Ltd under GPLv3 (ERPNext's license) and now
we, as Frappe Technologies Pvt Ltd converting them to MIT to comply with
Frappe's license.