0

I looked at a bunch of tutorials using ActionMailer, but they all seem to just automatically send emails without opening up a default email app. I want the user to be able to click a button that opens up their default email client with the to and subject fields filled in, and be able to have a file attached. Ideally, I want it to work just like:

<a href='mailto:someperson@example.com'>

but have it able to attach a file. I would post code, but I have no idea what to post. I guess the main question is if there's a way to get ActionMailer to open up outlook instead of just sending emails?

There is very similar question, Rails actionmailer open host email app but the solutions didn't work.

update

My app is for a small workplace where every computer has access to whatever files are needed which would be located on the server. I am trying to make it so that the user of the app can click an email button which grabs a pdf file from a folder on the server and opens up outlook on their machine with the file automatically attached.

Community
  • 1
  • 1
notblakeshelton
  • 364
  • 1
  • 7
  • 20

2 Answers2

0

Okay, it seems you can't use the mailto shell to add attachments from what google has told me BUT:

The way I'd approach it is through a client side script or executable and the serverside trigger (the button on a website).

I'd personally use a compiled autohotkey script but here is the link to a vbs/vba script (only works with outlook).

Hope this points you in the right direction :)

Community
  • 1
  • 1
h4k4s4m
  • 26
  • 2
0

Unfortunately this is not possible. You'll have to write a native app or a browser extension for that.

See Attaching a file in email in html5 web page

Community
  • 1
  • 1
dre-hh
  • 7,840
  • 2
  • 33
  • 44
  • Hiya, looks like you've linked to another stack overflow question. Is this a duplicate of that question? If so - you can always flag a question as a duplicate - which tends to give a nicer linking between the two than just adding it as an "answer". – Taryn East Jun 24 '14 at 05:08