Hi,
could you explain and verify the handling of carrige return and line feed according to your CRBasic EmailRelay() example in the help. I assume, that mutiple usage of CRLF will be handled incorrectly.
I have confirmed that all CRLF are sent when using the CRBasic example. The problem is that most email clients will remove extra lines when displaying the message. The other issue is that the message is actually sent as a multi-part message with both plain text and html formats. The HTML version of the message strips the extra CRLF and puts each line in a <p></p>.
Here is the raw content from the message source without the headers:
------------=_1489000570-5523-46 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Warning! This is a automatic email message from the datalogger station TYLER-CR6. An= alarm condition has been identified. The temperature is 24.64749 degrees C= . Datalogger time is 03/08/2017 12:15:49=20 -------------------------------- =20 Provided as a free service by Campbell Scientific ------------=_1489000570-5523-46 Content-Type: text/html; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable <html><body> <p>Warning!</p> <p>This is a automatic email message from the datalogger station TYLER-CR6.= An alarm condition has been identified. The temperature is 24.64749 degree= s C.</p> <p>Datalogger time is 03/08/2017 12:15:49</p> <pre>-------------------------------- Provided as a free service by Campbell Scientific</pre> </body></html> ------------=_1489000570-5523-46--
Hi tmecham, you are right.
The "Content-Type: text/plain; charset=UTF-8" will be formatted correctly and according to the CRBasic instructions of CRLF.
The "Content-Type: text/html; charset="UTF-8", does not validate the multiple CRLF correctly.
Are there possibilities to control this by calling the functions with extra parameters, maybe in later OS updates? Or can you provide a best practice of formatting the mail. Sending mail only as text/plain is fine, having the option of text/html would offer the opportunity to bring some corporate design or style in it, if it will be parsed correctly. ;)
edit:
Just read some docs on: https://sendgrid.com/docs/Classroom/Build/Format_Content/plain_text_emails_converted_to_html.html It ends in more complex subject as you have to change sendgrids global settings.
Anyhow, maybe you can extend your CRBasic help to show examples corresponding to your sendgrid settings to format mails, which will look as the CRBasic instructions.
Hi,
did you changed global settings?
I received an email only in text.
Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 23 Mar 2017 21:54:18 +0000 From: emailrelay@konectgds.com Mime-Version: 1.0
Now it looks like it is coded in CRBasic.
Thx
A change was made yesterday to try and reduce the risk of the email being detected as SPAM. I will check but I do not think that should have supressed the HTML version altogether.
Hi aps,
now mails will only be send as text, instead of multi-part message. (Which is by the way, fine.)