-1

I want to send an email from an email body clicking on a link or button. The first mail is sent using mandrillapp. I tried with anchor tag but it doesn't fulfill my requirement since I want to directly send without opening email client.

<email_body>

content.....

SEND

</email_body>

Send email on tap of SEND.

Any suggestions on this?

Chethan Shetty
  • 532
  • 6
  • 18

1 Answers1

0

I don't think it's possible to do in one click from within an email without invoking some external service.

The best bet would be to make that SEND link point to a web server of your own which could sent the email for you. eg:

<a href="http://myserver.com/sendmail?to=me@home.com&from=you@home.com&subject=hello&body=something> Send an email </a>

However this would have some security implications, so you'd want to make sure malicious people couldn't just pass arbitrary values in and spam people with your server.

So perhaps using some kind of a token system so each initial email has a unique token, than your web server can lookup and send the right email out. eg a link like:

<a href="http://myserver.com/sendmail?token=23jfui34jfd934j> Send an email </a>
Peaceand
  • 276
  • 2
  • 6
  • Thanks for the quick response. Can you do POST to external server from anchor tag? Also clicking on SEND navigated to that page, which I do not want. – Chethan Shetty Sep 08 '16 at 11:58
  • You could try including a form in your email to generate some POST data: https://www.campaignmonitor.com/resources/guides/email-forms/ that may get around the navigation issue too, but at the risk of some email clients maybe blocking it. – Peaceand Sep 08 '16 at 12:59