LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-10-2013, 04:00 PM   #1
rm_-rf_windows
Member
 
Registered: Jun 2007
Location: Europe
Distribution: Ubuntu
Posts: 205

Rep: Reputation: 23
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
 
Old 02-10-2013, 10:16 PM   #2
PhoenixAndThor
Member
 
Registered: Sep 2009
Location: Geogia, USA
Distribution: Ubuntu, Debian, Live CDs
Posts: 213

Rep: Reputation: 38
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
 
Old 02-11-2013, 02:30 AM   #3
rm_-rf_windows
Member
 
Registered: Jun 2007
Location: Europe
Distribution: Ubuntu
Posts: 205

Original Poster
Rep: Reputation: 23
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
 
Old 02-11-2013, 08:21 AM   #4
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 666

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by rm_-rf_windows View Post
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
 
Old 02-12-2013, 03:40 AM   #5
PhoenixAndThor
Member
 
Registered: Sep 2009
Location: Geogia, USA
Distribution: Ubuntu, Debian, Live CDs
Posts: 213

Rep: Reputation: 38
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!

Last edited by PhoenixAndThor; 02-12-2013 at 03:42 AM.
 
Old 02-12-2013, 10:17 PM   #6
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,289

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
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
 
1 members found this post helpful.
Old 02-13-2013, 07:44 AM   #7
PhoenixAndThor
Member
 
Registered: Sep 2009
Location: Geogia, USA
Distribution: Ubuntu, Debian, Live CDs
Posts: 213

Rep: Reputation: 38
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?

Last edited by PhoenixAndThor; 02-13-2013 at 07:45 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gmail: removing the [CLIP MESSAGE] in email content? Xeratul General 1 11-03-2012 02:26 PM
sendmail unable to send message to external servers (e.g. hotmail,gmail etc) mali2 Linux - Networking 2 07-01-2011 12:41 PM
[SOLVED] Samba networking, want to be able to send a message to people who look at shares telx85 Linux - Newbie 9 02-27-2011 04:02 AM
Gmail, message clipping frenchn00b General 3 04-20-2009 10:47 AM


All times are GMT -5. The time now is 05:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration