4

I want to paste a rather huge amount of text into an email (approximately 100,000,000 characters). I have the text document containing said characters on hand and may copy it with ease using “select all.” However, due to the size, attempting to paste this text into the email body crashes the webpage of any browser, and caused the Mac email client to freeze when I tried that instead.

Is it possible to accomplish this goal, or is it simply beyond the scope of technology?

Just to clarify, I am aware of superior means to transport or share this text as a .zip file or using Google Drive etc., my goal is not to share this text in a tangible way, I simply want to paste it into an email.

  • 3
    I don't think any Web app would be able to handle pasting that much text. An app that sends data in the background (like Gmail) would have an even worse time of it. I'm not surprised you're getting timeouts and app freezes. You really should ZIP that document and attach the zip file. – ale Sep 30 '15 at 11:19
  • 1
    Or, put the document in a Google Doc and link that in your message. That's what Google recommends if you have more than 25MB to send. – ale Sep 30 '15 at 11:21
  • Considering your latest edits, no, I don't think there is a practical way to do what you want. – ale Oct 2 '15 at 10:23
  • 2
    -1: Gmail doesn't limit the number of characters to be pasted to a message in a desktop email client so it's very likely that the issue is related to installable software or hardware. By the other hand, 100,000,000 characters are around 95MB which is far beyond the 25MB limit for a message size to be sent, so, IMHO pasting a so large number of characters to a email message that could no be sent doesn't make any sense. – Rubén Oct 2 '15 at 12:22
  • 1
    This question seems to suffer from the XY problem. – gerrit Oct 8 '15 at 13:45
3
+100

The following is an untested proposed workflow to transfer the contents of a textfile to a textarea-field such as used by Gmail Compose. It may or may not work where a simple copy-paste fails. If you really want to try to enter 100MB of text into a webform, you could try it, but please consider the comments and other answers suggesting you approach the underlying problem differently.

In Firefox, use the It's All Text! addon. With this addon, you will be able to use your favourite text editor to write in any textarea field, including the one used for Gmail Compose.

Then the question changes to: how do I paste a large amount of text into [insert text editor]? The following assumes the original is in a file that is plain text.

Personally, I use vim and I do !cat /path/to/file.txt.

An approach that should work with any text editor:

  1. Note the name of the temporary file used by It's All Text!, for example, /tmp/itsalltext.txt.
  2. On the commandline, do cat /path/to/file.txt >> /tmp/itasalltext.txt.
  3. Reload the file in the text editor.
  4. Possibly edit it, if editing it, save it again and close the text editor.

Now, the contents of /path/to/file.txt will be in the textarea.

Two problems remain:

  • For sending the e-mail, you will still be limited by the maximum e-mail size mentioned elsewhere.
  • Firefox and the It's All Text! addon may not perform well when transferring dozens of megabytes into a webform. I have only used it for small amounts of text (maybe up to 10 kB).
| improve this answer | |
  • Yes, it does. The workflow I describe has the effect of pasting the contents of an arbitrary textfile into an arbitrary textarea field of any webform, including the one used to compose text in gmail. The fact that the pasting consists of additional steps that do not actually put the text in the clipboard at any time, does not make it any less copy-paste in practice. – gerrit Oct 8 '15 at 13:32
  • @Rubén True. I did not try this solution, therefore, I don't know if the answer solves the problem posed in the question. It is an answer. Whether it's an answer that actually works (a correct answer), I'm not sure. – gerrit Oct 8 '15 at 13:43
  • 1
    @Rubén I added an introductory paragraph. – gerrit Oct 8 '15 at 13:48
  • 1
    Ultimately it would seem this endeavor was doomed to fail (as Rubén rightly pointed out) due to the simple size of the text file exceeding what could be sent in email in any format, as a direct attachment or pasted text. However the above method is quite a good one and a worthy attempt to solve the problem. So enjoy the bounty, I'll have to find another way to send my digits of pi next year. – Raj Oct 9 '15 at 5:53
2

Gmail has a maximum email size limit of 25Mb (per email sent or received). So you can not send or receive email more than this size. When you hit the maximum email size limit, you will receive one of the following error messages:

  • Attachment size exceeds the allowable limit.
  • 552: Message size exceeds maximum permitted.
  • System Undeliverable, message size exceeds outgoing message size limit.
  • The size of the message you are trying to send exceeds the global size limit of the server. The message was not sent; reduce the message size and try again.

So alternate solution is you can upload the files to be attached to cloud storage servers (like Google Drive, DropBox or SkyDrive) and include the download link in your email.

| improve this answer | |
  • 3
    This post has correct information but it doesn't answer the question – Rubén Sep 30 '15 at 12:55
  • To be fair, the question does reek of an XY problem. – gerrit Oct 8 '15 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.