Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how does mailto actually work? 2

Status
Not open for further replies.

tigerjade

Programmer
Mar 17, 2004
237
US
Seems like I should've found an answer to this question long ago, but either my searches are empty or my brain is. :) Exactly how does mailto in a form work? Does it use the site's SMTP server to transmit the data, or does the email come from the user's system?

Thanks!

"Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live." -- Martin Golding


 
It opens client's default mail program and fills in lines provided in mailto: link -- usually just a recepient. If client does not have a mail client or mail client is not set up, chances are mailto: won't work for them. No real magic with mailto.
 
Is it using the domain's mail server, though, or the user's mail server?

"Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live." -- Martin Golding


 
Client's mail server. Say you use Outlook. When you click mailto: links, outlook opens, starting a new message and fills in recepient line. You write the email from there and use Outlook to send it. mailto: can also fill subject and body of the email for you, but ultimately it will open client's mail client and send the email through that. In my case, it will be Mozilla Mailer and in my wife's case it will fail, because she doesn't have a mail client set up on her computer.
 
Cool; that's exactly what i couldn't find anywhere else. :) Thanks!

"Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live." -- Martin Golding


 
Is it possible to directly send it to the linked email address without using the user's email client just by clicking the "send," "submit," etc. button?
 
Not using mailto:. You have to have some kind of mail program set up on your server to do what you want. Find out what your web host has or supports.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top