Form element and mailto feature

Discussion about HTML and XHTML related issues.

Form element and mailto feature

Postby 1.2.3 » Fri Jun 13, 2008 12:57 am

I would like to use the mailto feature with a form element, but I would like to send Cc to more than one recipient than merely just one recipient. What is the correct html code for accomplishing this? For just one recipient it would be <form action="mailto:youraddress@nospam.com" method="post" enctype="text/plain" >

Any help would be greatly appreciated.

ZC

:?:
1.2.3
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 5
Joined: Mon Jan 28, 2008 11:22 am

Postby Albert Wiersch » Fri Jun 13, 2008 4:35 pm

Hello,

The proper way to do this would be to use a server-side script to process the form data and email it to whoever it should go to. I'm sure there are lots of scripts available online that you can use.

If you still just want to use "mailto:", then you should only use one email address. There's no standard way to use more than one... if you try to, then it can create various problems with different browsers or not work at all.

You may be able to have it go to one email address, and then that email address sends it out to several email addresses. You would probably need some type of access to configure the email server to do it this way.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2642
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Using mailto:

Postby 1.2.3 » Fri Jun 13, 2008 5:27 pm

In this particular case, I don't have access to server configurations and that is the reason I wanted to use mailto:

I did find a couple of pages that suggest it is possible to send email to carbon copies with mailto, but I couldn't get it to work. One of those pages is located here -->http://www.outfront.net/tutorials_02/adv_tech/mailto.htm

Any idea what I am doing wrong? I was trying to use

<form action=" a href="Assemblymember.Bass@assembly.ca.gov?subject=Initiative, Referendum, Recall -- Proposed Legislative Reforms&Cc=Senator.Perata@senate.ca.gov&" method="post" enctype="text/plain" >
1.2.3
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 5
Joined: Mon Jan 28, 2008 11:22 am

Postby MikeGale » Fri Jun 13, 2008 6:26 pm

I've knocked heads with mailto: in the past. Here's a few points that come to mind.

1) Each browser has a different implementation. You need to test.

2) The mail client on a machine varies. To be thorough you need to test whatever your audience has, or the most common mail clients (assuming you don't know what they have!). (That means using VM's, getting the tools licensed or having separate machines.)

3) Those two points above give you a big matrix of tests to run (IE, FF, Opera, Safari X all the emailers). If you automate your tests it would be feasible otherwise good luck to you.

4) In my testing, fairly long ago, I found that some browsers hadn't done a lot of the basics, which cuts down what you can use.

5) I've found some automated edited tools (I'm thinking online editors accessed over http here) completely mess up mailto: links. They don't understand much about them. (May not impact you.)

Long story short. I looked at it, a client was really keen on the idea. The area just stinks and would in reality cost you a fortune to do professionally (mainly in checking/unit testing).

The easy solution is to code your own. (With a modern web development environment it's trivial.)

Failing that I imagine somebody has provided a service to do just that. Maybe a service, to which you could POST data, using XMLHttp say, would be a clean solution. (I'd personally avoid anybody offering a service with GET strings in the URL.) Anybody here know of such a service?

When doing it I suggest not repeating the most common mistake. That's where you don't get a copy of your own email. It's almost standard that web mail forms don't do that. People sending the email won't forget that lack of manners.
User avatar
MikeGale
Rank VI - Professional
Rank VI - Professional
 
Posts: 637
Joined: Mon Dec 13, 2004 2:50 pm
Location: Tannhauser Gate

Re: Using mailto:

Postby Albert Wiersch » Fri Jun 13, 2008 9:12 pm

zcorker wrote:<form action=" a href="Assemblymember.Bass@assembly.ca.gov?subject=Initiative, Referendum, Recall -- Proposed Legislative Reforms&Cc=Senator.Perata@senate.ca.gov&" method="post" enctype="text/plain" >


That's messed up. :)

If it's even going to work, it would probably be something more like this:
Code: Select all
<form action="mailto:Assemblymember.Bass@assembly.ca.gov?subject=Initiative, Referendum, Recall -- Proposed Legislative Reforms&Cc=Senator.Perata@senate.ca.gov" method="post" enctype="text/plain">

Note that I didn't test the above.

Like Mike suggested, I would highly recommend you look for a service you can use to post the form data to and NOT use mailto:.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2642
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Postby Albert Wiersch » Wed Jun 18, 2008 7:58 am

Here's a good link on the matter: The Mythical Mailto:
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2642
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX


Return to HTML and XHTML

Who is online

Users browsing this forum: No registered users and 2 guests