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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple email capability 1

Status
Not open for further replies.

Stretchwickster

Programmer
Apr 30, 2001
1,746
GB
Sorry for posting what is probably an often asked question - the keyword search isn't working on this one!

I created an email option in a recent application which uses mailto to open the default email application and default the "to", "subject" and "body" fields to specified values, ready for the user to send (but allowing them to edit or add information before sending).

It all works fine on Windows 2000 but not on 98 and 95. One truncates the body text (i think that was in 98) and the other one generates an error in Outlook and doesn't go any further (i think that was in 95).

Does anyone know if there's a limit to the amount you can add to the body using mailto as it seems to be truncated when using older version of Windows?

Also, another way round may be to add the text as an attachment rather than directly into the email as its body. Is it possible to add an attachment with mailto or is there a simple alternative? Clive [infinity]
 
Stretchwickster,

Using the mailto:// tag is a creative approach, but I do believe you will find size limitations under Windows 9.x, though I haven't seen where those might be documented.

There are a couple of different ways you can do this. For example, Windows provides a CDO interface as well as Simple MAPI. Since you're deploying to different versions of Windows, I'd suggest using MAPI.

If you're interested in seeing an example, feel free to check out the article ( on my site, which includes a downloadable ZIP file you can adapt for your purposes.

Hope this helps...

-- Lance
 
Cheers for the answer Lance! I have the day off tomorrow (wayhey! ;-)) but I shall try it on Monday and reward you with a star if it works!!! Clive [infinity]
 
Hi Lance,

I've just downloaded the example from your site. It looks good - however when i click the Send Mail button (whether preview is checked or not) it seems to send the mail but shortly after I get an "Undeliverable" email saying that it could not deliver to recipient because "No transport provider was availble for delivery to this recipient". Could you or anyone else shed any light on this?

Clive Clive [infinity]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top