Mail: not enough space for "............. subject.........."

 
It appears that there is very limited space to send emails when a certain trading condition has occurred.
Only 12 emails are coming through, followed by many that are totally missed, before finaly the message: Mail: not enough space for '.....subject line.......' appears in the Journal tab.

I understand that 64 emails can be in the pipeline, however, never have that number of emails been send (verified with an Alert message to the Alert Window at the same time).

If there are unsend emails in the pipeline, what can I do to push them through without delay.

Are old emails still sitting in the que as previously send emails? Are the emails stored at trading platform level, or at server level?

Can the process of email handling be improved to eliminate the space error?

Thanks in advance for your reply.

Regards,

Ronald Verwer.
 
Your mail queue overfills. Send mail more rarely
 
This answer was not expected.
Mail is send on movement of the market. The program needs to be able to handle this.

Please answer each question in my original post with a constructive approach.

I know that when I wouldn't use MT4 at all I wouldn't have a problem, but that is not the way to approach this issue.

I look forward to your constructive comments on how to eliminate the problem when it exists.

I'm bitterly disappointed is the reply sofar.

I sincerly hope that you will do better second time around.

Best regards,

Ronald Verwer.
 
Please read documentation "MQL4: Runtime errors"
===
SendMail ERR_FUNCTION_NOT_ALLOWED_IN_TESTING_MODE (4059), ERR_STRING_PARAMETER_EXPECTED (4062), ERR_FUNCTION_NOT_CONFIRMED, ERR_SEND_MAIL_ERROR (4061)
===
You can analyze code returned from GetLastError function
 
Dear Slawa,

Thank you very much for your reply.

I had however already search through the manuals, and read the runtime error document you are referring to. On many occasions this document only tells you why an error did occur, but it does in many casses not tell you what you have to do to avoid the error. It is left up to the programmer to experiment by trial and error.

No error code is given when the message: Mail: not enough space for '..subject line...' appears, nor does it tell you the correct programming functions and instructions how to clear the space of old and/or qued emails. The only way to clear it (tha I know of) is to close down the MT4 platform all together and to restart it again, which then will allow you to send another 12-14 emails after you have lost whatever was in the que. However this is not an option when you are not at the computer running the trading platform in question.

No information is anywhere available to guide the user through the process of properly purging any emails that are in the pipeline. Nor have you been able to answer my question related to that.

I take it that no-one at MetaQuotes knows what to do about it, and have not been able (willing) to look for an answer since this issue has been brought up previously by other forum members.

I sincerely hope that you will investigate this matter further to come up with a proper answer that would assist many traders/programmers who are battling with this ongoing problem.

Further more would you please be so kind to answer my original questions instead of trying to pull the woolies over my eyes.

If you don't know the answers than I would expect you to say so, and to give an undertaking that you will find the answers and report at your earliest convenience.

I look forward to receiving your reply with constructive answers.

Best regards.

Ronald Verwer.
MT4/C+/C##/VB6/CTL/EasyLanguage programmer
Stock, Futures, and FX trader.
 
This is a normal programming practice to experiment by trial and error. I think You should not say for all forum members.

In some cases, 64 mails in queue are not too much, but this indicates your problems, not client terminal's.
1. Problem with connection to your mail server.
2. Problem with your mail settings.
3. Too frequent mail sending without analyzing of the last error.

As to your questions in your first post:
1. Old mails are removed from the queue after sending.
2. Mails are queued on the client terminal side.
3. Mails are processed by the client terminal directly, please check your firewall (proxy) and mail server settings.
 
Good morning Slawa,

Thank you for your answers. Most appreciated.

64 emails is that the absolute maximum?
Does the platform to be closed and reopened to be able to send another 64 emails?
What make you suggest that there is a problem with my mail server, and what could that problem be?
If there would be a problem with my mail settings as you suggest, what should the mail settings be for the email function to work properly?
When old emails are removed from the queue after they have been send, how can the queue then still be full?
Could the "start of queue" and "end of queue" identifiers be made programmable?
What settings do you suggest that need to be changed to the firewall and/or the mail server to avoid the limit queue, when many emails are send to the recipient without a problem before the queue is overflowing?

Thank you very much in advance for your time and effort to assist in solving this longstanding email problem.

Best regards, and have a great day.

Ronald Verwer.
 
Hi Slawa,

After some testing I got the following resutls:
135 emails were send.
64 emails were supposed to be send, but no error message was shown in the Journal, followed by
Journal entries for each following email that there is not enough space for the email.

When the system is running 24/7 (really 24/5) I would like to be able to rely on the emails that are send, and not run the risk of the trading platform not forwarding the required emails. Hope you have understanding for that.

Hope that this additional information could help you with obtaining answers to my questions in the previous post.

Regards,

Ronald Verwer.
 
There is asynchronous processing with shared mail queue.

On the one hand EA puts mails into queue, counter increased.
On the other hand mail dispatcher gets mails from queue and sends it directly to address. After sending, mail removed from queue and free one place in the queue, counter decreased.

If mail dispatcher cannot send mail then mail leaves in the queue, and queue can be overfilled. In this case size of queue does not signify and can be any.
 
Forex Trader:
It appears that there is very limited space to send emails when a certain trading condition has occurred.
Only 12 emails are coming through, followed by many that are totally missed, before finaly the message: Mail: not enough space for '.....subject line.......' appears in the Journal tab.

I understand that 64 emails can be in the pipeline, however, never have that number of emails been send (verified with an Alert message to the Alert Window at the same time).

If there are unsend emails in the pipeline, what can I do to push them through without delay.

Are old emails still sitting in the que as previously send emails? Are the emails stored at trading platform level, or at server level?

Can the process of email handling be improved to eliminate the space error?

Thanks in advance for your reply.

Regards,

Ronald Verwer.

I have the same error as Ronald. Similar amount of mail sending out, but it happens in the new MT version only Build 971, not earlier...

Regards,

Robert 

Reason: