Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
e778c38b
Commit
e778c38b
authored
Jun 06, 2019
by
Oleh Krehel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lisp/gnus/message.el (message--send-mail-maybe-partially): Extract
parent
e51adfbd
Pipeline
#1911
failed with stage
in 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
30 deletions
+33
-30
lisp/gnus/message.el
lisp/gnus/message.el
+33
-30
No files found.
lisp/gnus/message.el
View file @
e778c38b
...
...
@@ -4487,6 +4487,38 @@ This function could be useful in `message-setup-hook'."
(unless (y-or-n-p "Send anyway? ")
(error "Failed to send the message"))))))
(defun message--send-mail-maybe-partially ()
(if (or (not message-send-mail-partially-limit)
(< (buffer-size) message-send-mail-partially-limit)
(not (message-y-or-n-p
"The message size is too large, split? "
t
"\
The message size, "
(/ (buffer-size) 1000) "KB, is too large.
Some mail gateways (MTA's) bounce large messages. To avoid the
problem, answer `y', and the message will be split into several
smaller pieces, the size of each is about "
(/ message-send-mail-partially-limit 1000)
"KB except the last
one.
However, some mail readers (MUA's) can't read split messages, i.e.,
mails in message/partially format. Answer `n', and the message will be
sent in one piece.
The size limit is controlled by `message-send-mail-partially-limit'.
If you always want Gnus to send messages in one piece, set
`message-send-mail-partially-limit' to nil.
")))
(progn
(message "Sending via mail...")
(if message-send-mail-real-function
(funcall message-send-mail-real-function)
(message-multi-smtp-send-mail)))
(message-send-mail-partially)))
(defun message-send-mail (&optional _)
(require 'mail-utils)
(let* ((tembuf (message-generate-new-buffer-clone-locals " message temp"))
...
...
@@ -4601,36 +4633,7 @@ This function could be useful in `message-setup-hook'."
(goto-char (point-min))
(not (re-search-forward "[^\000-\377]" nil t)))))
(mm-disable-multibyte)
(
if
(
or
(
not
message-send-mail-partially-limit
)
(
<
(
buffer-size
)
message-send-mail-partially-limit
)
(
not
(
message-y-or-n-p
"The message size is too large, split? "
t
"\
The
message
size,
"
(/ (buffer-size) 1000) "
KB,
is
too
large.
Some
mail
gateways
(
MTA
's
)
bounce
large
messages.
To
avoid
the
problem,
answer
`
y
',
and
the
message
will
be
split
into
several
smaller
pieces,
the
size
of
each
is
about
"
(/ message-send-mail-partially-limit 1000)
"
KB
except
the
last
one.
However,
some
mail
readers
(
MUA
's
)
can
't
read
split
messages,
i.e.,
mails
in
message/partially
format.
Answer
`
n
',
and
the
message
will
be
sent
in
one
piece.
The
size
limit
is
controlled
by
`
message-send-mail-partially-limit
'.
If
you
always
want
Gnus
to
send
messages
in
one
piece,
set
`
message-send-mail-partially-limit
'
to
nil.
")))
(progn
(message "
Sending
via
mail...
")
(if message-send-mail-real-function
(funcall message-send-mail-real-function)
(message-multi-smtp-send-mail)))
(message-send-mail-partially))
(message--send-mail-maybe-partially)
(setq options message-options))
(kill-buffer tembuf))
(set-buffer mailbuf)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment