Link to home
Start Free TrialLog in
Avatar of fadyg
fadyg

asked on

using mailto with large body of text

I use the ShellExecute function with the 'mailto' tag to open the default mailer and stuff the address, subject and body of the message.

Now the body seems limited by the number of characters you can add. The message appears truncated if the body exceeds a certain limit in length.

Is there a way around this ?
Avatar of DrDelphi
DrDelphi

What is more than likely happening is that since ShellExecute looks for a long pointer to string, and you are hard coding in a string, once you reach the upper limit of LongInt, it cuts off. What you could do is to have an AnsiString which you use to write out your message and then pass Pchar(Ansistring Variable) to shellExecute. That SHOULD work.


Good luck!!
you could use temail2.zip from here instead:
http://www.torry.ru/vcl/internet/

then can send attachments as well and no string length errors...

also a demo project here showing how to send mail using mapi:
http://www.bhnet.com.br/~simonet/archive/mapimail.zip

Regards Barry
hello any further comments ?
Avatar of fadyg

ASKER

Hi There,

first sorry for the delay in answering. Was away for a while and could not check this out.

Thanks to you both (DrDelphi & Inthe) for your comments.

I took the easiest solution which was to download TEmail and use it as is in my application.

so the points go to inthe (although I didn't check DrDelphi's answer). Could you lock the question inthe ?

thanks again to both.
Fady
ASKER CERTIFIED SOLUTION
Avatar of inthe
inthe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial