Is there a limit in the size of the message BodyHTML of a SMTPsocket mail?

Hello
The code below will work, unless I uncomment the last tag
Is there a limit in the size or number of tags that the bodyhtml can receive?

If I add one more tag, the mail messege will not be delivered

Thank you in advance for the help on this issue that is holding me over 24 hours already.

Regards

  addto iBody, "<img src = '" + iURL + "' width='75%'>" 
  addto iBody, "</img>"
  
  addto iBody, "<h3>"
  addto iBody, "SUSCRIPCIN"
  addto iBody, "</h3>"
  
  addto iBody, "<p>" 
  addto iBody, "Muchas gracias por suscribirse a nuestro sistema de compras y newsletters online."'
  addto iBody, "<br>" 
  addto iBody, "Este mensaje le provee de un cdigo de validacin que sirve para activar su cuenta en nuestro sistema."
  addto iBody, "</p>"
  
  
  addto iBody, "<p>" 
  addto iBody, "Por favor, copie el cdigo a continuacin: " 
  addto iBody, "<b>"
  addto iBody, session.user_ValidateCode
  addto iBody, "</b>"
  addto iBody, " Seleccione y pulse ctrl-C"
  addto iBody, "</p>" 
  
  'addto iBody, "<p>" 
  'addto iBody, "Para ingresar el cdigo, simplemente haga clic "
  'addto iBody, "<a href='"
  'addto iBody, "http://mirtos.bartus.ec:9280?page=vmanual&email="+session.user_Email
  'addto iBody, "' target='_blank'>"
  'addto iBody, "aqu "
  'addto iBody, "</a>"
  'addto iBody, "</p>"

Your Answer must be somewhere in this RFC :slight_smile:

So there’s a limit in Size and you can request this Value from the Server:

Taken from the RFC:

[quote]4. The Message Size Declaration service extension

An SMTP server may have a fixed upper limit on message size. Any
attempt by a client to transfer a message which is larger than this
fixed upper limit will fail. In addition, a server normally has
limited space with which to store incoming messages. Transfer of a
message may therefore also fail due to a lack of storage space, but
might succeed at a later time.

A client using the unextended SMTP protocol defined in Paragraph 1, can only
be informed of such failures after transmitting the entire message to
the server (which discards the transferred message). If, however,
both client and server support the Message Size Declaration service
extension, such conditions may be detected before any transfer is
attempted.

An SMTP client wishing to relay a large content may issue the EHLO
command to start an SMTP session, to determine if the server supports
any of several service extensions. If the server responds with code
250 to the EHLO command, and the response includes the EHLO keyword
value SIZE, then the Message Size Declaration extension is supported.

If a numeric parameter follows the SIZE keyword value of the EHLO
response, it indicates the size of the largest message that the
server is willing to accept. Any attempt by a client to transfer a
message which is larger than this limit will be rejected with a
permanent failure (552) reply code.[/quote]

Here’s a Website which will request the EHLO from a Server

Thanks for your answer, but is not clear for me
Given that for testing I mail to google and a mail server which I set with no limits at all, below code is a little over 600 bytes, which cannot be the limit.

In fact, the htmlviewer displays it normally.

My viewpoint is that is something else, in the bodyHtml assigment.

Regards

<img src = '" + iURL + "' width='75%'> </img>  

<h3>SUSCRIPCIN</h3>  

<p>
Muchas gracias por suscribirse a nuestro sistema de compras y newsletters online.
<br>
Este mensaje le provee de un cdigo de validacin que sirve para activar su cuenta en nuestro sistema.
</p>

<p>
Por favor, copie el cdigo a continuacin:<b>1234</b>  Seleccione y pulse ctrl-C</p>
<p>Para ingresar el cdigo, simplemente haga clic <a href='http://mirtos.bartus.ec:9280?page=vmanual&email=anu@mail.com' target='_blank'> aqu </a>
</p>

google limits to 150kb, and bartus.ec (our site) 50kb…
well over 600 bytes

link text

Please post your full code. Do you send your mail with Xojo, curl or Chilkat? Do you get an error message? If the mail doesn’t get sent you should get an error at some point. Have you tried to send the mails with something else than Gmail even only for testing? Which credentials do you use - your own or the one from the customer? Gmail doesn’t like to be used for mail sending.

Hello Beatrix
Thanks

But it is not a matter of credentials, because mails go perfectly as long as they do not excede de 400 bytes. I can send mails with bodyHtml code smaller de 400 bytes.

If they excede 400 bytes, simply the mails are not send.

The first screen capture shows the sent mail, not delivered.
The second capture, shows the sent mail that was delivered
the third capture show the mail received.



Quite a few here on the forum send mails and most mails will be longer than 400 bytes. If there is no error message than the problem most likely is not with Xojo. Post your code or even better an example. And try something else than Gmail for sending mail.

Hi Nieves, I’ve been sending emails from Xojo without problems these days… May the problem be in your HTML composition passed certain point?

As been said, it’s very difficult try to find the solution without access to the code involved…

Javier

The most common mistake that is made with SMTPSocket is that the Send command is Asynchronous. What this means is that if the socket is stored in a local variable, it can literally go out of scope and get destroyed before the email is sent. Make sure that you store the socket in a property that’s defined in the session or page.