Mailto: from client and attachments

M

Mark Goldin

Is it possible using mailto: to create an email with everything except an
attachment
and then when a user clicks on send intercept that form and recreate the
email on the server and add a file to it?

Thanks
 
A

Aaron Bertrand [MVP]

Is it possible using mailto: to create an email with everything except an
attachment
and then when a user clicks on send intercept that form and recreate the
email on the server and add a file to it?

No, you are confusing mailto: (which runs exclusively on the client) with
server-side mailing functionality (which runs exclusively on the server).

Instead, have a form that is submitted to the server, and the server-side
deals with sending the mail *and* attaching the file to it.
 
M

Mark Goldin

I understand the mechanics behind mailto:.
What I was thinking is using mailto: to create a complete mail on a client
without an attachment and then when a user sends email reroute it to a
server for a file attachment and forwarding.
 
A

Aaron Bertrand [MVP]

What I was thinking is using mailto: to create a complete mail on a client
without an attachment and then when a user sends email reroute it to a
server for a file attachment and forwarding.

Mail is sent to an SMTP server, not an application server. ASP has no way
to know that mail is being sent anywhere. You can only "intercept" mail
before it is sent along this way... e.g. if you generate the e-mail from the
server side.

mailto: is a very unreliable method, by the way. Some people don't have a
default mail reader defined, some people have default mail readers that
don't support mailto:, a few will modify the form contents and change the
destination and several other attributes, and the rest can choose to just
close the mail window and nothing gets sent at all
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top