How to extend sendmail wrapping
2 ビュー (過去 30 日間)
表示 古いコメント
The sendmail function page at:
states that "sendmail automatically wraps text at 75 characters".
How do I increase this limit, or turn off wrapping altogether (preferably)?
0 件のコメント
採用された回答
Jonas
2022 年 7 月 12 日
編集済み: Jonas
2022 年 7 月 12 日
type
edit sendmail
and look into
function toSend = formatText(msgText)
there you can find the line
maxLineLength = 75;
which you can set to inf
you could also change the sendmail function and add another variable by changing the head of the function sendmail and formatText to e.g.
function sendmail(to,subject,theMessage,attachments,maxChars)
if nargin<5 || isempty(maxChars) || ~isnumeric(maxChars) || maxChars<=0
maxChars=75; % define some default
else
maxChars=ceil(maxChars); % to avoid non integer input
end
% ...
body = formatText(theMessage,maxChars);
% ...
function toSend = formatText(msgText,maxChars)
% ...
maxLineLength = maxChars;
% ...
then you would be more flexible in amount of character wrapping
2 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Find more on Web Services in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!