Author |
Topic: Sending email (Read 1249 times) |
|
KenDown
Full Member
member is offline


Posts: 181
|
 |
Sending email
« Thread started on: Feb 26th, 2014, 08:09am » |
|
I've tried creating an e-mail using the ShellExecute method, which works fine so long as body$ is fairly short. When I tried putting the whole message in body$, although PRINTbody$ showed the whole message, the e-mail client failed to open.
Is there a limit on the length of body$? Can the e-mail be written into the e-mail client (I use FireFox) after it has opened?
Any other suggestions appreciated.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Sending email
« Reply #1 on: Feb 26th, 2014, 08:24am » |
|
on Feb 26th, 2014, 08:09am, KenDown wrote:Is there a limit on the length of body$? |
|
What version of Windows? My understanding is that the limit is greater in Windows 7 than it is in Windows XP, for example.
But irrespective of the Windows version there is a limit of 32767 characters imposed by Create Process, so you won't be able to exceed that when data is passed on the 'command line'.
Richard.
|
|
Logged
|
|
|
|
KenDown
Full Member
member is offline


Posts: 181
|
 |
Re: Sending email
« Reply #2 on: Feb 26th, 2014, 1:18pm » |
|
Hmmmm. This is Windows XP, but I've just checked and the letter I wanted to send is exactly 2,000 characters long, so well within the limit you mention.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Sending email
« Reply #3 on: Feb 26th, 2014, 2:45pm » |
|
on Feb 26th, 2014, 1:18pm, KenDown wrote:This is Windows XP, but I've just checked and the letter I wanted to send is exactly 2,000 characters long, so well within the limit you mention. |
|
The limit I mentioned is for CreateProcess; you are not using CreateProcess! The limit for ShellExecute on Windows XP is indeed around 2000 characters, I believe:
http://blogs.msdn.com/b/oldnewthing/archive/2003/12/10/56028.aspx
The limit is much greater in Windows 7, and presumably 8 (maybe the full 32767 characters); I don't know about Vista.
This is another reason not to be using Windows XP (support for that OS will be discontinued by Microsoft in April). If for some reason you must use XP you will have to switch from using ShellExecute to using CreateProcess, which means doing a lot more of the work yourself.
Richard.
|
|
Logged
|
|
|
|
KenDown
Full Member
member is offline


Posts: 181
|
 |
Re: Sending email
« Reply #4 on: Feb 27th, 2014, 04:10am » |
|
Ok, thanks for that information. As it happens, having to click "Send" is no bad thing as it gives me opportunity to review the automatically generated message and personalise it.
I'm in no hurry to "upgrade" to Vista or 7, though I suppose I will be forced to do so eventually. I have both on one or other of my laptops and see no advantage in them. What is worse, I can see the day coming when they too will not be supported and we'll be forced into using the apalling 8.1 (which I have on a tablet and don't like at all!)
|
|
Logged
|
|
|
|
|