How can I send a file, for example "exe", with Telnet?

PRVS

With smtp, i know the commands: "HELO", "MAIL FROM", "RCPT TO", "QUIT", but i don't know how can i attach one file. Anyone can help me ?

   telnet smtp.xxxx.xxxx 25 
helo xxxx.xxxx 
mail from: [email protected] 
rcpt to: [email protected] 
data 
subject: hi 
hello 
. 

quit
Nicolas Riousset

This is not something that can be easily done. You probably want to use a library (ex : in python) that will take care of formatting your email according to your needs.

In very brief :

  • Sending an attachement requires the email to be formatted according to the MIME RFC
  • A MIME formatted message will use some delimiters to separate the different parts of the message (ex : a plain text part, an HTML part, an attachment part, etc...)
  • Each MIME part will be prefixed by a header detailing the part content
  • an attachment part will be identified by a "Content-disposition" header, as detailed in RFC 2183.
  • The representation of your file will have to be specified using the "Content-Transfer-Encoding" header, described in RFC 2045. A common way to encode files for mail transfer is base64.

If you want to get an idea of how complex it is to generate an email with a valid attachment, you can use your email client to check the source of an email with an attachment (most email clients have this feature). That should eventually convince you to avoid doing this manually :)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

how can I Send File via jQuery?

From Dev

How can I convert *.sh file to *.exe file?

From Dev

How I can extract Binary file from EXE file?

From Dev

How can I detect if telnet is running on a server?

From Dev

How to use cURL to send an XML file to a telnet server

From Java

How can I convert my Java program to an .exe file?

From Dev

How can I fix problems while running .exe file

From Dev

How can I get the executable file folder without the .exe name?

From Dev

How i can resolve the warning of unknown publisher in Windows exe file

From Dev

How can I run a .exe file on any Windows computer?

From Dev

How can I extract a PDF/SWF file from an EXE?

From Dev

How can I run an exe file without the user finding out?

From Dev

How can i run a .exe-file with batch?

From Dev

How can I download a .exe file from a given URL?

From Dev

How can I send the output of R CMD check to a file or variable?

From Dev

How can I send the output of a Logger object in python to a file?

From Dev

How can I send a .bat file command to another IP address?

From Dev

How can I create and send a text file through XmlHttpRequest or $.ajax?

From Dev

How can I send input file without form tag?

From Dev

How can I send error output to both stdout and file in bash

From Dev

How can i send a file through bluetooth with android devices

From Dev

How can I send a file with socket in multiple messages?

From Dev

How can I send an email with an attached file with android's intent?

From Dev

How can I send a File over a REST API?

From Dev

How can I send an Excel file via email?

From Dev

How can I send elements in csv file to variables in Python?

From Dev

How can I send input file without form tag?

From Dev

How can I send docx and pdf file to printer?

From Dev

Why can't I launch telnet.exe from a Windows 8 command prompt?

Related Related

  1. 1

    how can I Send File via jQuery?

  2. 2

    How can I convert *.sh file to *.exe file?

  3. 3

    How I can extract Binary file from EXE file?

  4. 4

    How can I detect if telnet is running on a server?

  5. 5

    How to use cURL to send an XML file to a telnet server

  6. 6

    How can I convert my Java program to an .exe file?

  7. 7

    How can I fix problems while running .exe file

  8. 8

    How can I get the executable file folder without the .exe name?

  9. 9

    How i can resolve the warning of unknown publisher in Windows exe file

  10. 10

    How can I run a .exe file on any Windows computer?

  11. 11

    How can I extract a PDF/SWF file from an EXE?

  12. 12

    How can I run an exe file without the user finding out?

  13. 13

    How can i run a .exe-file with batch?

  14. 14

    How can I download a .exe file from a given URL?

  15. 15

    How can I send the output of R CMD check to a file or variable?

  16. 16

    How can I send the output of a Logger object in python to a file?

  17. 17

    How can I send a .bat file command to another IP address?

  18. 18

    How can I create and send a text file through XmlHttpRequest or $.ajax?

  19. 19

    How can I send input file without form tag?

  20. 20

    How can I send error output to both stdout and file in bash

  21. 21

    How can i send a file through bluetooth with android devices

  22. 22

    How can I send a file with socket in multiple messages?

  23. 23

    How can I send an email with an attached file with android's intent?

  24. 24

    How can I send a File over a REST API?

  25. 25

    How can I send an Excel file via email?

  26. 26

    How can I send elements in csv file to variables in Python?

  27. 27

    How can I send input file without form tag?

  28. 28

    How can I send docx and pdf file to printer?

  29. 29

    Why can't I launch telnet.exe from a Windows 8 command prompt?

HotTag

Archive