SMTPSendText

Started by seckner, August 29, 2014, 02:10:47 PM

Previous topic - Next topic

seckner

When using the SMTPSendText function I'm seeing a small message body problem. I'm sending a simple report - 1 line per. Each line begins with a CRLF. What I'm getting in the body is:

Aug 31 2014, at 09:14 for Name Here
Sep 08 2014, at 16:00 for Name Here
Sep 04 2014, at 11:41 for Name Here Sep 04 2014, at 09:02 for Name Here Sep 08 2014, at 13:10 for Name Here Sep 08 2014, at 14:33 for Name Here

Seems to miss the CRLF after the 3rd entry. If I do a "CRLF : CRLF : data" it reliably sets the entire thing to 2x line spacing. Any ideas?


td

Tried the SmtpSenText example with a modified message:

Code (winbatch) Select

damsg = "Have you noticed... it's raining." :@crlf:"Which is nothing New."
rc = SmtpSendText ( mserver, whofrom, whoto, dasubj, damsg )


The resulting email was formated with two lines when received by the Email client.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

Quote from: seckner on August 29, 2014, 02:10:47 PM
Each line begins with a CRLF.

What if you try each line ending with CRLF.

JTaylor

I tried it with 15-20 lines like you posted and viewed the message in a web mail client and outlook and they both were as you want.  Perhaps you could post the part of the script that generates the report and sends it?  Someone might see something.

or maybe try the following.  If it works then the problem may be that the formatting of your text isn't quite what you think.   Either way we'll at least be looking at the same code.


Code (winbatch) Select

AddExtender( "wwwsk44I.dll" )
damsg = ""
damsg = damsg:@CRLF:"Aug 31 2014, at 09:14 for Name Here"
damsg = damsg:@CRLF:"Sep 08 2014, at 16:00 for Name Here"
damsg = damsg:@CRLF:"Sep 04 2014, at 11:41 for Name Here"
damsg = damsg:@CRLF:"Sep 04 2014, at 09:02 for Name Here"
damsg = damsg:@CRLF:"Sep 08 2014, at 13:10 for Name Here"
damsg = damsg:@CRLF:"Sep 08 2014, at 14:33 for Name Here"
damsg = damsg:@CRLF:"Sep 08 2014, at 14:33 for Name Here"
damsg = damsg:@CRLF:"Sep 08 2014, at 14:33 for Name Here"
damsg = damsg:@CRLF:"Sep 08 2014, at 14:33 for Name Here"
damsg = damsg:@CRLF:"Sep 08 2014, at 14:33 for Name Here"
damsg = damsg:@CRLF:"Sep 08 2014, at 14:33 for Name Here"
damsg = damsg:@CRLF:"Sep 08 2014, at 14:33 for Name Here"
damsg = damsg:@CRLF:"Sep 08 2014, at 14:33 for Name Here"


mserver = "mail.xxxxxx.xxx"
whofrom = "xxxxxxx@xxxxxx.xxx"
whoto = "xxxxxxx@xxxxxx.xxx"
dasubj = "Greetings"

rc = smtpSendText ( mserver, whofrom, whoto, dasubj, damsg )
Message( "Mail sent Return code is",rc )



Jim

td

Quote from: stanl on August 30, 2014, 03:18:49 AM
Quote from: seckner on August 29, 2014, 02:10:47 PM
Each line begins with a CRLF.

What if you try each line ending with CRLF.

Beginning each line with a CRLF doesn't affect anything.  Actually, you don't even need to use a CRLF.  A CR is sufficient to demarcate each line as the extender function looks for CRs and discards trailing LFs.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

seckner

First, sorry for the long delay - beginning our season and things get a bit nuts...

And, I don't feel very smart today -it was 100% my problem: Outlook - Remove extra line breaks. Duh!  :-[

Thanks to everyone for their help! This is STILL the best support forum anywhere!

DAG_P6

David A. Gray
You are more important than any technology.