Auto-fill gmail BCC line based on To field - google-apps-script

I am trying to augment my CRM that I have. The high level problem is that I've to enter multiple email addresses every time I want to write a message. This becomes a particular problem when replying to a message and forgetting to enter a special BCCed email address. I'd like to not have to remember to do that. I want, when I am using gmail, for an address in the To/CC line to trigger an auto-population of an address in the BCC line.
Here is how I think I would do this now:
My idea is to do, implement a map/dict/whatever by using two columns in a google spreadsheet (sheet) document. (Using the sheet means an easy visualization to my dict and an easy ability to share with permissions etc.)
The first column would be the To/CC email address and the second column would be the auto-populated BCC email address.
Then I'd like to have code run on my computer that allows me to use gmail as you would without having to think about whatever will automatically go into the BCC field. (Bonus points for figuring out a way for me to code something up that allows me to not have to think about this when sending email from the gmail app on my iPhone.)
It may seem from my abstract description that I would need to hire someone to do this but I know I can code this myself. I just need to be pointed to the correct APIs and be notified of any gotchas that I should avoid.
Currently I was going to write a google contextual gadget to handle auto populating the field. Is that the best way? Or is a greasemonkey/whatever script better? What is the general approach I should take to tackling the problem?
To fix the phone/other-email-frontend problem would a Google Apps Script that acts like a cron job to check the most recent sent emails and if they don't have the proper bcc then just forward those emails with an appropriate bcc be reasonable?
Basically, am I off base or on track with my solution? If I am on track give me a bit more information on appropriate plan of attack. If I am off base then point me in the right direction.
I would appreciate your help.

I don't think you are going to be able to do this inside of gmail. You could save a bunch of Drafts with the correct BCC emails, and put the TO: email in the subject line so that you could see who that draft was meant for, then change the subject line.
You could have a dialog box in your spreadsheet that you designed to look like an email compose screen. That would be the most straight forward approach. You could have a stand alone App, that had an input screen that was designed to look like an email compose screen.
Basically, you'd need to design your own user interface rather than using gmail. But the gmail compose window isn't anything very complicated, so if it's just a plain text email, it should be easy enough.

Your question would be more understandable with a concrete example of the problem (I'm not sure I entirely understand it). But Gmail supports mailto: URLs quite well. Perhaps that is the answer to what you want to do.
There are various scripts to help you generate a mailto: the way you want, so have a look at something like http://sislands.com/coin70/week6/mailtoCreator.htm

Related

Docusign - using two different email body/blurb contents

Hello I have setup our app using the dev/demo account and almost ready to get a paid account. I want to get a starter API account, which doesn't have Branding.
Can I remove the Resource File from the email body without having access to branding? Any other way?
I would like to setup one email body/blurb for the signing email and a different for the completed email. Again without branding would I be able to do that?
I have been able to add customize/add html into the signing email body but would like to add a new condition somehow for the completed
something like envDef.EmailBlurbCompleted =
thank you
There's only one emailBlurb field in DocuSign right now. That field is used in both the original as well as the final email that are sent out. You can customize it per recipient, which is not exactly what you're asking for.
You can change it after the envelope is created, but only if it's still in draft status.
Changing this field when an envelope is in sent status requires a correct operation. Which is also not exactly what you are asking to do.
At the moment what you're asking is not a feature that exist, you can build something to mimic this, but I'm not sure that is a good idea either.

Keeping Email Message from Grouping into Conversation View in Gmail

I'm working on a feature for a client to send them email updates whenever a specific event occurs on their site. When the message shows up in Gmail, the messages get grouped together in conversation view even through they aren't the same conversation. It appears that this is due to the fact that Gmail groups based only on the subject. The client is adamant that we not change the subject line (don't get me started).
Does anyone know how I can disable this by sending a special header in the mail or am I out of luck?
There appears to be no way to prevent this, short of turning off conversation view (have you considered that?).
My guess is that Gmail is actually threading based on its own Thread-Topic header field, which it adds (overwriting any value you pass; it just copies the Subject field) - there's no way of telling, though, unless you can change that field after the fact. Which leads to the suggestion of writing an IMAP application to download the message, edit the headers, and re-upload it again. You'd need to investigate the feasibility of this, though.

How to automatically respond to an e-mail

I would like to automatically respond to an e-mail with some information. The idea is to provide a self-service way for students to get grades and passwords. I see sample scripts that work on e-mails, but I need to:
look for a keyword in the subject to understand what type of information to provide (i.e., grade, password, etc.)
look at the e-mail of the inbound e-mail to identify the student (optionally locate a password)
look up the information (possibly in a spreadsheet)
create an e-mail and send it to the student
I am more familiar with using scripts with e-mail and spreadsheets, but I would prefer to create this on a Google Sites page or embed it in a wiki.
Thanks in advance for the help,
JDF
I am not sure how much detail you were looking for, or if you where looking for example code, but here are some high level things to think about.
First, if you are going to embed the code into a webpage that you want be able to access all your other Google things easaly. eg if i stored all the student names passwords and student numbers in an spreadsheet or database you have to set up permission to do so. Your website does not count as you "persay" because if you had it shared out then someone could potentally steal all your google stuff.
Take a good look through the Google appi google apps script. You can search your email by thread (subeject) and then go through the emails like that. I think all the function that you want are there.

E-mail in the source : a no-go?

I have a contact form where the email is actually accessible in the source, because I'm using a cgi file to process it. My concern are the mail crawlers, and I was wondering if this is a no-go and I should switch to another more secure form. Or, if there was some tricks to 'confuse' the crawlers ? Thanks for your ideas.
If you're putting the destination address of the email in the HTML form, then not only is it a problem for mail crawlers, but spammers will use your contact form for spamming other people. All they would have to do is submit the same form with a different address in that field, and your mail server will happily send their message to a third party. You do not want to do this, as your server will quickly become blacklisted for sending spam.
If by source you mean the HTML source, then absolutely that's a problem. Can you edit the cgi file to hardcode it there?
I always convert the characters of email addresses (including the mailto statement if applicable) into character entities. This seems to work nicely, I have yet to receive automated spam on certain email addresses which are available in this manner on different websites. This converter illustrates what I mean.
Yes, you should avoid that to minimize spamming.
An easy way would be to just obfuscate the e-mail, replacing . with -dot- and # with -at- etc.
If a human needs the address, he knows what that he has to perform
If your CGI script takes this address as input, it has to de-obfuscate first, reverting all obfuscations.

html form within mail client

Ok, get this.
I have been assigned to write an html form to be EMAILED to clients so that they can fill it in and submit it FROM THE EMAIL CLIENT! apparently emailing a link to the existing form on our website is not good enough.
I am still trying to get my head around this as it seems almost void of common sense, but anyways, my guess is that I will have no way of validating data, and if actually works, how will the user know? WTF?????
Get this, They will be emailing both a pdf and an html doc to clients, I tried putting my case forward but apparently the marketing pro's say IT IS POSSIBLE AND MUST BE DONE, WORKING BY FRIDAY!
This is not a good idea on many fronts:
Not all email clients will support a form post from HTML
see: http://www.campaignmonitor.com/blog/post/2435/how-forms-perform-in-html-emai/
No clientside validation
What's exactly wrong with a link?
How are you getting data from PDF form submission? You can get expensive form tools from Adobe: http://www.adobe.com/government/forms.html
Some spam / av checkers will dispose of form based emails.
There are only two possiblities: first one the mail client must have a php runtime environment to run the php script locally, also an embedded mail server - which isnt the case for the most of them. Second one is that your mail client acts like a browser and displays the form (which is located still on the internet) in his mail viewing window (which is perhaps possible but i dont know any common mail client doing this).
So you either submit a link to the form or you construct the mail this way, that there're placeholders to be filled and submitted like a normal mail response.
This idea is plainly wrong. You're creating a phishing vector for your company which could expose them to huge legal liability. Just ask them how much money they are going to be putting into the legal defense fund in order to pay out for the lawsuits they are going to lose.
An adobe pdf server is about the only reasonable method for doing this, but that takes lots of cash and work on your network to support a new type of server.
It's generally bad idea. Most email clients only allow limited HTML, with limited CSS and without any JavaScript at all.
See: http://www.sitepoint.com/code-html-email-newsletters/
Many mail clients will not allow submitting any form (at least with standard security settings).