1

I am looking for a browser extension (preferably Chrome) or web-app that can add some option in the Gmail interface that allows me to reply to an e-mail I received with a standard "Undelivered mail" message in Gmail like:

---------- Forwarded message ----------
From: Mail Delivery Subsystem <mailer-daemon@googlemail.com>
Date: Sat, Jun 21, 2014 at 12:38 PM
Subject: Delivery Status Notification (Failure)
To: franck@gmail.com


Delivery to the following recipient failed permanently:

     nonexistantemail@gmail.com

Technical details of permanent failure:
The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces. Learn more at http://support.google.com/mail/bin/answer.py?answer=6596

----- Original message -----

Return-Path: <franck@gmail.com>
Received-SPF: pass (google.com: domain of franck@gmail.com designates 10.112.155.114 as permitted sender) client-ip=10.142.115.103
Authentication-Results: mr.google.com;
       spf=pass (google.com: domain of franck@gmail.com designates 10.112.155.103 as permitted sender) smtp.mail=franck@gmail.com;
       dkim=pass header.i=@gmail.com
X-Received: from mr.google.com ([10.112.115.103])
        by 10.112.115.103 with SMTP id vv7mr11097164bb.62.1403368684729 (num_hops = 1);
        Sat, 21 Jun 2014 09:38:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:from:date:message-id:subject:to:content-type;
        bh=YTpCN1cCqvYms6FGGseMsXBTOhXjUTLSCWhTa7uk91I=;
        b=ABlpZthL6jPX713Aum0fkmVeKiGKDl20ZrfeHylew+L+mSGZSr67J5MLgpoeFvW8lb
         Qb+lyvuZKf3CbDrUTrQ9lIMsDsaBNwvMDS2/s1b3zy2p9sD4l45rwuvN5hSq4vfgYF5R
         izLwOJD5umQvx4CQFeyDsFhhfP7cFQX25YZKP/1x94bjBMI8qL22Bg9Eydvnm4LNPSuu
         xRl9Oo9rO8kLMobxkkIhCKaPGMAkuO7tzaU40tphtWxbyOxwoCGBA/kYi76yjRs142ru
         Sb1fFRF+h2RhgrEXeS4Yvb0qOqJyuyEbGBNgH5wnlRSZBvgGOCLaGvkq8FC3ohu91bE1
         FHKA==
X-Received: by 10.112.141.103 with SMTP id vv9mr1199716lbb.62.1403368684724;
 Sat, 21 Jun 2014 09:38:04 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.112.89.100 with HTTP; Sat, 21 Jun 2014 09:37:44 -0700 (PDT)
From: Franck Dernoncourt <franck@gmail.com>
Date: Sat, 21 Jun 2014 12:37:44 -0400
Message-ID: <CA+e8+riJKFVsGAxv1aaR+LLoDeK8Tx5cZRvQZ=GnrkMNy-SvJA@mail.gmail.com>
Subject: test
To: nonexistantemail@gmail.com
Content-Type: multipart/alternative; boundary=089e01160caef1279604fc5b3b1c

Hi,
spam spam spam
1

I'm not sure if I fully understand your question. If you want to automate this, I can't recommend google apps script enough(I can help more indepth with that if needed but that's more suited with the google apps script SO tag). If you wanted something like boomerang where you have an extra button next to all the normal gmail buttons, I think that's done by an extension and I would look to https://stackoverflow.com/questions/8689905/gmail-extension-gadget-api-how-to-add-a-button-to-the-compose-toolbar but this seems inherently more complicated...I think a less involved way(it depends on how much you have invested in a solution and how well you can program) would be to make a bookmarklet or a simple chrome extension that doesn't add a button but opens a new window to make a new email ON CLICK not automatically.

What I've Found So Far

If you want to go the bookmarklet route I think document.querySelectorAll(".gs")[1].children[5].children[0].innerText gets the innerText of the message, then it'd be simple javascript string functions to extract the email out of it. Then, window.open that link prefixed by "mailto:". I.E. let's assume you get the email down to variable email. Then window.open("mailto:"+email) should open your default mail client. Personally, since you wanted to click a button in gmail, you might as well do a bookmarklet

P.S.

The only part of this that is variable is that querySelectorAll part because if gmail changes much of its internal layout, it will break. I don't have a good answer except play around with the chrome development tools until you find a path

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.