15

Ok, I've looked far and wide for something to take care of this little email project I have.

First, some background: My family has a secret santa every year and I've offered to write a script to randomize who gets gifts for whom. What I'd like to do is send an email letting people know who they'll be getting a gift for but I DON'T want to send the email through my gmail account since I'll be involved in the Secret Santa.

The question: how can I send an email from the command line/a script without having that email stored in my "sent items" in my gmail account (or any other mail account). I think i'd have set up my own smtp server, but I'm really pretty clueless.

Ramy
  • 1,171

2 Answers2

8

You do need a special SMTP server, but you don't need to set it up yourself. As somebody has already suggested, you can create a bogus Gmail account and use the SMTP for that. Or, for really anonymity, you can use a SMTP provider; this will allow you to forge your return address (the same way spammers do) for an extra layer of anonymity and customization ("From: YourFriend@SecretSanta.com").

Here's help on configuring sendmail to use SMTP, useful when specifying headers directly instead of relying on your mail client.

1

Since "sent mail" is just a tag in Gmail (only a single copy of each mail exists with different tags) and you apparently cannot turn it off (as with Yahoo Mail, for example), you'd either need to delete the message if you want no record of it, or hide the "sent mail" folder.

Why not create a new Gmail account, then use it for sending but never check it? As for the actual command-line sending part, I'm sure it has already been answered here (see Ubuntu command line email tool for server for example).

Karan
  • 57,289