Attachments in mailto

Hi,
I have two files (on the server) and I need to send them as attachments in a mailto. :rolleyes:
Can this be done? :confused: I will appreciate any help.

You need to do this with a special kind of form (using PHP or similar) so Iā€™ve moved this to the PHP forum.

Hi Ralph,
Thanks, ā€œadquiroā€ :slight_smile:
The problem is that I need to do this from a WP post and the php there is not working.
I need to do this with mailtoā€¦
Regards.

When you say mailto is not working how exactly is the message getting sent? Is the user sending an email with preset attachments to someone else? Are they suppose to change based on what they enter?

Hi Ted,
What I need is preset statement allowing the user to send a pdf from the server to some email address.
The only thing the user can change is the email and this will be from his email client software.
What time is it over there?

Ralph, how can I go to the PHP forum to find it ?

This thread is in the PHP forum now. :slight_smile:

Iā€™m still not clear on what you are trying to do. The user clicks a mailto link that opens their email client, right? That would normally send an email to you. But presumably thatā€™s not what you want here. So what are you trying to achieve?

Right. I also want to attach a file (pdf) from the server. The mail will be a ā€œSend a friendā€ like.

As a simple solution, you could just include a message in the email with a link to the pdf file, which the receiver could use to download the file.

But really, my suggestion would be to add a link in your post to a separate page with a form on it. That form would include an input for the friendā€™s email address, the userā€™s email address, an optional message field, and a submit button. The friend would receive an email with a link to download the PDF.

Iā€™ve done that.
Some users call us and ask to receive an email with that pdf as attachment :rolleyes:
and this is what I am looking for. A button to do this with a mailto behind it. :blush:

So it this a button for you rather than for them? Iā€™m still confused, Iā€™m afraid.

No Ralph, the button is for them, kind of ā€˜Send to a friendā€™ one can use to send to whom they want

Youā€™ll need to write [or find] a script that takes their input [their friendā€™s email address] and sends an email with the attachment.

I realize thatā€™s very simple for an answer but youā€™re really talking about some complex pre-built script. Rather itā€™s seeing if thereā€™s a small snippit out there you can use or modify to perform what amounts to a rather basic task. Of course thereā€™s some more complex concerns like people spamming others as a joke or such.

You should however note that attachments, especially PDFs have a very high spam hit rate and even higher when generated dynamically versus through an established email communication. It may be better to leave the PDF uploaded somewhere and include it as a link.

Thank you Ted for this thought. Spam is bad :mad: and we donā€™t want to open the dor to it.
We must think different about this issue. :slight_smile: