BBC BASIC for Windows
« Sending email »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:13pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Sending email  (Read 1249 times)
KenDown
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 181
xx 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.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx 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.
User IP Logged

KenDown
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 181
xx 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.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx 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.
User IP Logged

KenDown
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 181
xx 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!)
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls