Discussion:
Message body reading from a file not giving new lines
(too old to reply)
raaamu.mca@gmail.com [blat]
2017-05-31 07:00:09 UTC
Permalink
Hello all,
I am reading mail body from a text file. When blat sending an email, it is not giving new lines as it is in text file, instead it is appending everything. Here is my code, can any one help me here.


C:\Users\ramu\blat>blat.exe mailbody.txt -t ***@abc.com -f ***@abc.com -s mailbodysending -server smtp.abc.com -debug


mailbody.txt:

This one is using for testing new line with blat.
This one is using for testing new line with blat.
This one is using for testing new line with blat.


Actual Mail body:
This one is using for testing new line with blat. This one is using for testing new line with blat. This one is using for testing new line with blat.
Chip chip.programmer@att.net [blat]
2017-05-31 17:06:43 UTC
Permalink
If you use -superdebug option, you should see that Blat does include the carriage returns and line feeds.  The client program that reads your emails may well be the one to reformat the output you see.

If your debug output does not show the 0D 0A bytes for each original text line, then we may have something to look at in your text file.

Chip

<div>-------- Original message --------</div><div>From: "***@gmail.com [blat]" <***@yahoogroups.com> </div><div>Date:05/31/2017 1:00 AM (GMT-07:00) </div><div>To: ***@yahoogroups.com </div><div>Subject: [blat] Message body reading from a file not giving new lines </div><div>
</div>

Hello all,
I am reading mail body from a text file. When blat sending an email, it is not giving new lines as it is in text file, instead it is appending everything. Here is my code, can any one help me here.


C:\Users\ramu\blat>blat.exe mailbody.txt -t ***@abc.com -f ***@abc.com -s mailbodysending -server smtp.abc.com -debug


mailbody.txt:

This one is using for testing new line with blat.
This one is using for testing new line with blat.
This one is using for testing new line with blat.


Actual Mail body:
This one is using for testing new line with blat. This one is using for testing new line with blat. This one is using for testing new line with blat.
ramu makkena raaamu.mca@gmail.com [blat]
2017-06-02 16:06:59 UTC
Permalink
I just added one line space after each line while writing the content file,

which solved the issue as of now.


Best Regards,
Ramu
http://www.makkenaramu.com
Post by Chip ***@att.net [blat]
If you use -superdebug option, you should see that Blat does include the
carriage returns and line feeds. The client program that reads your emails
may well be the one to reformat the output you see.
If your debug output does not show the 0D 0A bytes for each original text
line, then we may have something to look at in your text file.
Chip
-------- Original message --------
Date:05/31/2017 1:00 AM (GMT-07:00)
Subject: [blat] Message body reading from a file not giving new lines
Hello all,
I am reading mail body from a text file. When blat sending an email, it is
not giving new lines as it is in text file, instead it is appending
everything. Here is my code, can any one help me here.
mailbodysending -server smtp.abc.com -debug
This one is using for testing new line with blat.
This one is using for testing new line with blat.
This one is using for testing new line with blat.
This one is using for testing new line with blat. This one is using for
testing new line with blat. This one is using for testing new line with
blat.
Geoff Brown geoff.b.d.brown@gmail.com [blat]
2017-06-03 05:30:31 UTC
Permalink
Are you sending the message between a DOS based system and a Unix based system? One use CR/LF and the other uses LF as line a terminator. You can get strange effects if they aren't handled correctly.
Continue reading on narkive:
Loading...