Using email • Messages sent from machine to machine and stored for later reading. • You will use a client to read email: – Type mail or pine in UNIX to read email. – Use programs like Outlook on Windows. • Different mail servers use the same protocols to communicate with each other. 1 Mail Servers • SMTP (Simple Mail Transfer Protocol) transfers mail between servers. • The mail server runs a program (daemon) that listens for clients connecting so people can read or write mail. • On UNIX this program is called sendmail. • A single protocol helps to ensure that different servers can communicate with each other. 2 Mail Clients • POP -- Post Office Protocol – Downloads all mail at once. – IMAP -- Interactive Mail Access Protocol, adds features to POP • Some Clients – – – – – ELM PINE (PINE Is Not Elm) Outlook Eudora Netscape Mailer 3 Parts of an Email • Body -- This is the actual message. • Header -- information at the top of the message. – From: or Received: who sent the mail. – To: Where the mail goes. – Cc: Other people who will receive this mail. • Bcc: Blind carbon copy -- a list of people who get a copy of the message but don’t get listed. – Subject: What the mail is about. – Date: When the mail was sent. 4 The mail command • You can use the mail command in several ways: – mail -- by itself, it opens your messages and lets you read them – mail person@address -- lets you compose a message to someone at a certain address. – mail -s (subject) person@address -- lets you send a message to someone at an address, with a certain subject. – mail -s (subject) person@address < text_file -- lets you send a message to someone with text_file as the body of the email. 5 Using mail • When you are writing the mail message body, use ^D or <enter> . <enter> to end editing and send the message. • If cc: shows up, this is a list of other addresses you can enter if you wish to send a message to other people. • ^C will kill a mail message you are typing. 6 Mail commands • These commands are used at the & prompt – q -- quit and save – x -- quit without making any changes. – R or r -- reply to a message (r = senders and recipients, R = senders only.) – f <numbers> -- view the message headers. – p or t <numbers> -- show those messages 7 More mail commands • d <numbers> -- delete messages. • u <numbers> -- undelete messages. • s <numbers> <file> -- append the messages to <file> with headers. • w <numbers> <file> -- append messages to <file> -- message only. 8 Message Editing Commands • Use these while writing the actual message – ~r <file> -- Add a file into the message. – ~f <num> -- add another email into the message (forwarding). – ~w <file> -- write the message to a file. – ~q -- quit without saving – ~p -- print the contents of the message. 9 Header Editing • While editing a message you may use… • ~h -- lets you edit the header (to, subject, cc, bcc) • These may also work: – – – – ~s ~t ~c ~b -- edit the subject. -- edit the to list. -- edit the cc (carbon copy) list. -- edit the bcc (blind carbon copy) list. 10 Other Features • alias -- combine addresses - alias me johna@wam.umd.edu jra@math.umd.edu • .forward file – send mailto another address. – Forward to self to get a copy on the sending machine. • Listservs -- automatic mailing lists. 11 PINE • • • • A menu-driven client Uses pico as an editor Allows MIME attachments Main Menu – C - Compose to write a message – I or L - View messages – Q - Quit 12 MIME Attachments • • • • • Multipurpose Internet Mail Extension Add pictures, files to emails Can be dangerous with executables. Pine uses MIME instead of plain inclusion. Filename on attachment line when writing. 13