TidSMTP Body TStrings all on one line

I'm using a Memo.Lines component as message Body in a text email, but every line is joined together as continuous text.  Is there a property I failed to set?
0
Ross
4/23/2015 6:06:12 AM
embarcadero.delphi.winsock 1874 articles. 2 followers. Follow

5 Replies
618 Views

Similar Articles

[PageSpeed] 38

Ross wrote:

> I'm using a Memo.Lines component as message Body in a text
> email, but every line is joined together as continuous text.
> Is there a property I failed to set?

Please show your actual code.  The only way I could see that happening is 
if you are doing something like this:

{code}
IdMessage.Body.Add(Memo1.Text);
{code}

Instead of doing this:

{code}
IdMessage.Body.Assign(Memo1.Lines);
{code}

Or this:

{code}
IdMessage.Body.Text := Memo1.Text;
{code}

-- 
Remy Lebeau (TeamB)
0
Remy
4/23/2015 4:55:19 PM
I'm using code I found on the internet which handles attachments, etc.

with TIdText.Create(IdMessage.MessageParts, aMsgBody) do
   ContentType := 'text/html';

aMsgBody is a TStringList.
0
Ross
4/24/2015 1:33:09 AM
Ross wrote:

> I'm using code I found on the internet which handles attachments, etc.
> 
> with TIdText.Create(IdMessage.MessageParts, aMsgBody) do
> ContentType := 'text/html';

There is no way that such code would generrate a single line of text from 
a list of multiple strings.  Where exactly are you seeing the single-line 
text?  Please show what you are seeing.

-- 
Remy Lebeau (TeamB)
0
Remy
4/24/2015 4:39:18 AM
I have been receiving the emails using Microsoft Outlook but just tested now sending to a GMail account, and same problem.

The Memo that contained the TStrings shows this on the screen.

24/04/2015 4:47:04 p.m. Connected to SPL [127.0.0.1] on ports 8558/56136.
24/04/2015 4:47:53 p.m. Not playing in live assistance mode. Switching to automation.
24/04/2015 4:47:57 p.m. eMail sent successfully

These lines were added using Memo.Lines.Add().  Here is a copy/paste from the received email...

24/04/2015 4:47:04 p.m. Connected to SPL [127.0.0.1] on ports 8558/56136. 24/04/2015 4:47:53 p.m. Not playing in live assistance mode. Switching to automation. 24/04/2015 4:47:57 p.m. eMail sent successfully

The mail server is an HMailServer if that makes any difference.

Any ideas?
0
Ross
4/24/2015 5:26:44 AM
Ross wrote:

> I have been receiving the emails using Microsoft Outlook but just
> tested now sending to a GMail account, and same problem.

To be sure, I would have to see the RAW email data that your TIdMessage is 
generating, but I can pretty much guarantee that TIdMessage DOES NOT do what 
you describe.  TStrings data is encoded and sent line-by-line with CRLF breaks 
in between them.

> The mail server is an HMailServer if that makes any difference.

It might, if it is corrupting the email data before delivering it to the 
recipient(s).

-- 
Remy Lebeau (TeamB)
0
Remy
4/24/2015 6:20:20 AM
Reply:

Similar Artilces:

I can to install one not delphi program foir iOS into one iOS for delphi?
For example i have one programm builded as xcode for iOS, and i build one program as delphi for iOS. I want to have only one instalation, i can to add this xcode program into my delphi installer of my ios program? I can to do the same as android? how i can to to this? > {quote:title=oscar mejia wrote:}{quote} > For example i have one programm builded as xcode for iOS, and i build one program as delphi for iOS. I want to have only one instalation, i can to add this xcode program into my delphi installer of my ios program? > > I can to do the same as android? how i can to to...

How to make a long sql statement on Multiple lines instead of one long statement on one line
what code would i use to put this update statement on more than one lines. I can't figure it out set10 = "UPDATE " + databasenow + " SET 1= '" + 1.ToString + "', 2= '" + 2.ToString + "', 3= '" + 4.ToString + "', 5= '" + 5.ToString + "', 6= '" + 6.ToString + "', 7= '" + 7+ "' WHERE (new= '" + new.tostring+ "') "  set10 = "UPDATE " +  _ databasenow + _ " SET 1= '" + 1.ToString + "', 2= '" + 2...

Combine multiple lines into one line
Hi all, I have the file, which looks like: *RECORD* *ID* 001 *TITLE* Here is title number one. *ABSTRACT* First sentence of the abstract. Second sentence of the abstract... Second line of the abstract. *RECORD* *ID* 002 *TITLE* Here is title number one. *ABSTRACT* First sentence of the abstract. Second sentence of the abstract... Second line of the abstract. Is there any simple way to transform this file to look like: *RECORD* *ID* 001 *TITLE* Here is title number one. *ABSTRACT* First sentence of the abstract. Second sentence of the abstract. Second line of the...

Make multiple line into one line
Hi I can a HTML code in string that contains this: <tr class="bgWhite"> <td align="center" width="50"><nobr>OMX &#160;</nobr></td> <td align="center">Q2&#160;2000</td> <td align="center">$ 0.45&#160;</td> <td align="center">$ 0.46&#160;</td> <td align="center">$ 0.52&#160;</td> <td align="center"><nobr>10-Aug-99 BMO</nobr></td> </tr> How do I make it ...

One liner to change one line
Greetings; I have, conservatively, dozens of html files to change. I can find them and pass the file name to perl and do the usual s/// changes but there is one change I can't figure out. There is a line in each file that looks like <H1>This-Is-The-Title</H1> of course, they are all different! How can I change the hyphens to spaces in this line only? Complicating the task is: 1. I don't know that there is only one such line per file. I need to get them all. 2. I don't know that all <H1> are upper case. 3. No...

Combining unique data from several lines to one line
I am looking to send a mail message to a large group of users and indicate which groups they are assigned to. Currently I have a tab deliniated file which has in column 1 the email address, column 2 the group, and column 3 the user's name. Using sample data I would like: s.t.dog@nowhere.com\tFootball\tSpot T. Dog jon.doe@nowhere.com\tFootball\tJonathon Doe s.t.dog@nowhere.com\tBaseball\tSpot T. Dog jon.doe@nowhere.com\tBaseball\tJonathon Doe jane.doe@nowhere.com\tBaseball\tJane Doe s.t.dog@nowhere.com\tHockey\tSpot T. Dog jane.doe@nowhere.com\tHockey\tJane Doe dick.doe@nowhere...

Why is there no delphi.debugger newsgroup but there is one for delphi.php.debugger?
I assume the proper place to post questions about the debugger is delphi.ide? Larry Hengen wrote: > I assume the proper place to post questions about the debugger is > delphi.ide? Yes -- John Kaster http://blogs.embarcadero.com/johnk Embarcadero Developer Network: http://edn.embarcadero.com Features and bugs: http://qc.embarcadero.com Got source? http://cc.embarcadero.com ...

One to Many to One to One
I have a kinda small problem; if someone could help me that' would be niceTo keep things simplier, allow me to give the following exampleI have two tables one-to-many relationship,table1: itemtable2: itemhistoryitem has many itemhistorybasically i want retrieve all the records in 'item' sorted by 'name', along with ONE "latest" itemhistory" (date). If there aren't any historyhistory for a particular 'item', just allow null values. egcreate table #item(itemid int, name varchar(10))create table #itemhistory(itemhistoryid int, itemid int, date...

One-to-One or Many-to-One?
 Hi Friends,I've made huge database for Learning Management Systems which has around 30 - 40 tables.I was checking all the relationships between tables and everything seems fine and well defined. But, it's 4:22 AM here and I'm bit sleepy but I was thinking which of the following relationship is true between the following two tables:Table1: tbl_users (PK username, password, name, surname, email, address1, address2, phNumb)Table2: tbl_testAttempts (PK Id, username, testId, attempt, timeStart, timeEnd)As you see, the Primary key of tbl_users is foreign key in tbl_testAttempts. ...

Is possible import one android library in one delphi project?
I have one library for android for to do calls peer to peer or app to app as skype. I use this library in one eclipse project, this library in one .jar file. I can to import this .jar file in my delphi project for reuse? If not is possible, what i can to do for to have one advanced function as to do app to app calls as skype? Regards, Edgar Mejia oscar wrote: > I can to import this .jar file in my delphi project for reuse? Have a look at these articles: Every Android API for Delphi http://delphi.org/2014/01/every-android-api-for-delphi/ Utility To Generate Java Andr...

Off by one line?
Sir: I've noticed that the text lines in trunk SeaMonkey appear to be off by about one whole line from the tick marks where the line should be. This can be seen in preferences or in mail header listing in Mail-news. Is this cross platform or OS/2 only? -- Bill Thanks a Million! On 11.04.08 22:07, William L. Hartzell wrote: > I've noticed that the text lines in trunk SeaMonkey appear to be off by > about one whole line from the tick marks where the line should be. This > can be seen in preferences or in mail header listing in Mail-news. Is > this cross pl...

Line-To-Line
I have one string like this: Hello, I am a shopkeeper (linefeed) Thus, I like to say... (linefeed) Good Morning (linefeed) How can I put this string line-to-line recording it into a file? How about something like this.... long ln_pos,ln_filenum,ln_start_point string tmp_part ln_start_point = 1 //fileopen ln_filenum = FileOpen("c:\export.txt",LineMode!,Write!,LockWrite!,Replace!) ln_pos = Pos(ls_your_string,'~n',1) //~r~n if CR LF for ln_pos > 0 tmp_part = Mid(ls_your_string,ln_start_point,ln_pos) FileWrite(filenum,tmp_part) ln_start_...

all in one line...
Hi I use this code to write an xml file.... Sub Page_Load() ' initialize a XmlTextWriter object Dim objXmlWriter As XmlTextWriter = Nothing ' location to the XML file to write Dim strXmlFile As [String] = Server.MapPath("testfile.xml") objXmlWriter = New XmlTextWriter(strXmlFile, Nothing) ' start writing the XML document objXmlWriter.WriteStartDocument(False) ' start with the root element objXmlWriter.WriteStartElement("library" & vbCrlf) ' firs...

How to force a new line to keep one line only have 10 characters?
For example, user may input text as below: AAAAAAAAAABBBBBBBBBBCCCCCCCCCC But to make it as: AAAAAAAAAA BBBBBBBBBB CCCCCCCCCC string wholeLine = "AAAAAAAAAABBBBBBBBBBCCCCCCCCCC";List<string> lines = new List<string>();while ( wholeline.Length > 0){    if (wholeline.length >= 10)    {        lines.Add( wholeline.Substring(0, 10);        wholeline = wholeline.Substring (10);    }    else    {       &nb...

Web resources about - TidSMTP Body TStrings all on one line - embarcadero.delphi.winsock

Issues - dwscript - Delphi Web Script general purpose scripting engine - Google Project Hosting
My favorites ▼ - Sign in dwscript Delphi Web Script general purpose scripting engine Project Home Downloads Wiki Issues Source New issue Search ...

Ladies - H&M GB
Store Locator Customer Service Order from catalogue Newsletter signup United Kingdom All prices in GBP Checkout Shopping bag Dressing Room My ...

Wall Street Beat: RIM, Oracle, spending buoy markets
Better news about the economy and online spending capped off by strong quarterly results and robust forecasts from Oracle and Research In Motion ...

JVCL Help:TJvPluginManager - Project JEDI Wiki
TJvPluginManager is the plugin manager for an application. It's the core of a plugin enabled (or host) application. The component takes care ...

Ladies - New Arrivals - H&M GB
Store Locator Customer Service Order from catalogue Newsletter signup United Kingdom All prices in GBP Checkout Shopping bag Dressing Room My ...

Ladies - Lingerie - H&M GB
Store Locator Customer Service Order from catalogue Newsletter signup United Kingdom All prices in GBP Checkout Shopping bag Dressing Room My ...

H&M offers fashion and quality at the best price - H&M GB
Store Locator Customer Service Order from catalogue Newsletter signup United Kingdom All prices in GBP Checkout Shopping bag Dressing Room My ...

Wall Street Beat: IT investors eye bellwether financials
Earnings season has begun in earnest, with investors scrutinizing reports from IT stalwarts like IBM, Dell, Google, Nokia and Sun for reasons ...

Wall Street Beat: Earnings season so far shows signs of hope
As quarterly financial reports start to pour in from IT bellwethers like Google, Nokia and Intel, industry insiders are not worried so much about ...

Resources last updated: 1/21/2016 1:51:33 AM