Hi,
I have two files (on the server) and I need to send them as attachments in a mailto.
Can this be done? 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ā
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.
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
and this is what I am looking for. A button to do this with a mailto behind it.
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.