LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   GMail Bcc message which doesn't reveal that several people get the message (http://www.linuxquestions.org/questions/linux-general-1/gmail-bcc-message-which-doesnt-reveal-that-several-people-get-the-message-4175449579/)

rm_-rf_windows 02-10-2013 05:00 PM

GMail Bcc message which doesn't reveal that several people get the message
 
Hello,

I'd like to send some emails to a group of people without them knowing that others got it. I don't want it to be marked "undisclosed recipients" or anything else, but to appear exactly as though each person received an individual email and that nobody else received the same message. Not even a hint of this.

Is there a way of doing this in GMail? Is there an alternative way to do this via code?

Thanks in advance,

rm

PhoenixAndThor 02-10-2013 11:16 PM

I've never tried to do anything like this. For the Bcc, I don't think so, but you could mass mail a group of people without any of the recipients knowing who else got the message. You could try writing a Bash script with msmtp. The Arch Linux wiki explains how to set it up: https://wiki.archlinux.org/index.php/Msmtp. One working solution would be to use one script to generate the individual messages by cycling though a list of addresses with a for loop, then you would use a second script and another for loop that cycles through all the messages in a directory. Again, I have no experience doing this, so I can't provide any useful information on the details, but it should be possible

rm_-rf_windows 02-11-2013 03:30 AM

Many thanks PhoenixAndThor,

BTW, I'm not trying to spam people or anything... It's all in good faith... I'm searching for real estate and need to send the same message to different real estate agents (a dozen or so). They too do similar things...

I would need some working code example though...

So I am awaiting further response.

Many thanks,

rm

Valery Reznic 02-11-2013 09:21 AM

Quote:

Originally Posted by rm_-rf_windows (Post 4888669)
Hello,

I'd like to send some emails to a group of people without them knowing that others got it. I don't want it to be marked "undisclosed recipients" or anything else, but to appear exactly as though each person received an individual email and that nobody else received the same message. Not even a hint of this.

Is there a way of doing this in GMail? Is there an alternative way to do this via code?

Thanks in advance,

rm

As long as I remember you get "undisclosed recipients" when there is no one in the "to:" field.
If you put yours email in the "to:" and all others to bcc, then no one will get "undisclosed recipients".

But no matter what you do, expecting email headers will revel to the person that he receive email as bcc.
If you want to avoid this too, not only "undisclosed recipients" then only way out that I see is sending
different email to each person, as already was suggested by PhoenixAndThor

PhoenixAndThor 02-12-2013 04:40 AM

Okay, after some green tea in the morning, I'm up for a bit of programmatic spamming (in good faith I hope). The first thing you need to do is set up msmtp or some other command line SMTP client, which is required to actually send the mail. I will assume that you followed the instructions from the Arch Wiki page I linked to (obviously adjusting the installation step for your own distribution) and can now send mail from the console/terminal with your GMail credentials. If you cannot, then make sure that the config file .msmtprc is not readable or writable by anyone else but you:
Code:

chmod 600 ~/.msmtprc
. It is very important that you get msmtp (or another SMTP client) working properly FIRST

After poking at this problem for a while, I thought Perl would be good for this, but I can't remember how to make a Perl script run shell commands, so Bash will have to do. To cut down on weirdness, (missing headers and such) you'll need a script like the following to customize a base message for each agent. This is NOT the final solution, check the output of one of the messages to make sure you're getting what you need.

Code:

#!/bin/bash
# secretMassMailer.sh

## Make an array with all the addresses you want to use
declare -a agents=('address1@something' 'address2@something' "address3@something')

## Here comes the loop and your message
for i in ${agents[@]}
do
  ## After the first ", everything you type
  ## will be processed verbatim, including any
  ## extra breaks, tabs, and spaces.
  echo "To: $i
From: Your e-mail address
Subject: The subject

Your message here" > $i.txt
done

If you want to use the dollar symbol "$" for something other than a variable, you must escape it with a backslash "\". So $500 would be written as \$500. When you are satisfied, change
Code:

> $i.txt
to
Code:

| msmtp -a accountName $i
and it will hopefully send your messages. I offer no guarantee that this code will actually work though, as I have never used msmtp in this manner, but it should work in theory. You should also keep in mind that this sudden burst of messages may be flagged as suspicious activity by your mail provider, ISP, recipient's anti-spam software, etc. Your results may very. Good luck!

chrism01 02-12-2013 11:17 PM

Quote:

how to make a Perl script run shell commands
How about

system() http://perldoc.perl.org/functions/system.html
backquotes http://perldoc.perl.org/perlop.html#...Like-Operators
piped open: http://perldoc.perl.org/IPC/Open2.html & http://perldoc.perl.org/IPC/Open3.html

PhoenixAndThor 02-13-2013 08:44 AM

Thanks chrism01, very helpful :) Perl isn't really my primary language, I'm more of a Bash junkie. Speaking of which, the OP never told me if the script I wrote helped. Is this solved or not?


All times are GMT -5. The time now is 01:13 AM.